Commerce Server General - Basket Definition

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > November 2004 > Basket Definition





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Basket Definition
Gabriel Matos

2004-07-30, 5:49 pm

Now, in my current project, I’m using a catalog that contains some items with variable weight. We have mapped two possibilities to deal with those products. The user can buy choosing how many units of the product he wants or selecting the weight.
My problem: I have, adding an item to user’s basket, include the information if its quantity means kilograms or units. Thinking as a database it is just one field to be added to the table that controls the products in baskets. However I haven’t found
a way to edit the basket structure using the Business Desk.
If it doesn’t have how to edit its structure, any ideas of how can I deal with that will be welcome.

Regards,
Gabriel Matos Pereira

Nihit Kaul [MSFT]

2004-08-02, 8:47 pm

Hi Gabriel,

You can simply use a weakly-typed property for storing this information
with the LineItem. Lookup "LineItem.Item Property " in the CS 2002 Help.

The usage would simply be something like (not compiled code):

LineItem li = new LineItem();
b["ItemInfo"] = "Kilos";
or
b["ItemInfo"] = "Units";

You could use enumerated values for better design. Also please note that
this data will simply be put in the Blob (marshaled_data column which is an
image type in the SQL database). Thus it will not be searchable directly
from SQL.

If you need the ability to be able to search and view this information from
the SQL side as well you will need to map this data to an explicit column
using DBStorage. Please see the help sections on DBStorage for more details
on that object.

Thanks,

Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
Thread-Topic: Basket Definition
thread-index: AcR2fnskK6515+mDTBO0ye7KiNWySg==
X-WBNR-Posting-Host: 200.248.206.130
From: "=?Utf-8?B?R2FicmllbCBNYXRvcw==?=" <Gabriel
Matos@discussions.microsoft.com>
Subject: Basket Definition
Date: Fri, 30 Jul 2004 14:45:07 -0700
Lines: 7
Message-ID: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14386
X-Tomcat-NG: microsoft.public.commerceserver.general

Now, in my current project, I’m using a catalog that contains some items
with variable weight. We have mapped two possibilities to deal with those
products. The user can buy choosing how many units of the product he wants
or selecting the weight.
My problem: I have, adding an item to user’s basket, include the
information if its quantity means kilograms or units. Thinking as a
database it is just one field to be added to the table that controls the
products in baskets. However I haven’t found a way to edit the basket
structure using the Business Desk.
If it doesn’t have how to edit its structure, any ideas of how can I deal
with that will be welcome.

Regards,
Gabriel Matos Pereira


Marcéu Schulte Leite - MCSD

2004-08-03, 5:51 pm

Soory Nihit, but with a variable of type Microsoft.CommerceServer.Runtime.Orders.LineItem is not possible and I don´t no any way to add a property for the lineitem. The article you mencioned does not have any aditional information.
I´m having the same problem, so, if you could explain more about I thank you.

"Nihit Kaul [MSFT]" wrote:

> Hi Gabriel,
>
> You can simply use a weakly-typed property for storing this information
> with the LineItem. Lookup "LineItem.Item Property " in the CS 2002 Help.
>
> The usage would simply be something like (not compiled code):
>
> LineItem li = new LineItem();
> b["ItemInfo"] = "Kilos";
> or
> b["ItemInfo"] = "Units";
>
> You could use enumerated values for better design. Also please note that
> this data will simply be put in the Blob (marshaled_data column which is an
> image type in the SQL database). Thus it will not be searchable directly
> from SQL.
>
> If you need the ability to be able to search and view this information from
> the SQL side as well you will need to map this data to an explicit column
> using DBStorage. Please see the help sections on DBStorage for more details
> on that object.
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> Thread-Topic: Basket Definition
> thread-index: AcR2fnskK6515+mDTBO0ye7KiNWySg==
> X-WBNR-Posting-Host: 200.248.206.130
> From: "=?Utf-8?B?R2FicmllbCBNYXRvcw==?=" <Gabriel
> Matos@discussions.microsoft.com>
> Subject: Basket Definition
> Date: Fri, 30 Jul 2004 14:45:07 -0700
> Lines: 7
> Message-ID: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14386
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Now, in my current project, I’m using a catalog that contains some items
> with variable weight. We have mapped two possibilities to deal with those
> products. The user can buy choosing how many units of the product he wants
> or selecting the weight.
> My problem: I have, adding an item to user’s basket, include the
> information if its quantity means kilograms or units. Thinking as a
> database it is just one field to be added to the table that controls the
> products in baskets. However I haven’t found a way to edit the basket
> structure using the Business Desk.
> If it doesn’t have how to edit its structure, any ideas of how can I deal
> with that will be welcome.
>
> Regards,
> Gabriel Matos Pereira
>
>

Nihit Kaul [MSFT]

2004-08-06, 5:51 pm

Hi,

Are you developing an ASP.Net site or an ASP site?

The objects and code that I mentioned applies only to ASP.Net.

The article I mentioned, is in the Help file and I qoute from it below. You
should be able to use this to add key/value pairs to your LineItem object.

LineItem.Item Property (BCL) [C#]Requirements
Namespace: Microsoft.CommerceServer.Runtime.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Runtime.dll
Language
C#
Visual Basic .NET

Show all
The Item property sets or retrieves the specified property on the line item.

Definition
[Visual Basic .NET]
Public Property Item( _
ByVal keyName As System.String _
) As System.Object

[C#]
public System.Object Item(
System.String keyName
) {get; set;}
Parameters

[Visual Basic .NET]
keyName
The name of the property to set.

[C#]
keyName
The name of the property to set.
Property Value
The value of the specified property on the line item.

Requirements
Namespace: Microsoft.CommerceServer.Runtime.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Runtime.dll

Thanks,

Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
Thread-Topic: Basket Definition
thread-index: AcR5kGjXM1GBbZHeSdOzc5goHpjnLA==
X-WBNR-Posting-Host: 200.248.206.130
From: "=?Utf-8?B? TWFyY8OpdSBTY2h1bHRlIExlaXRlIC0gTUNTRA==
?=" <Marcéu
Schulte Leite - MCSD@discussions.microsoft.com>
References: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
<Lk3Oo6OeEHA.3916@cpmsftngxa10.phx.gbl>
Subject: RE: Basket Definition
Date: Tue, 3 Aug 2004 12:31:01 -0700
Lines: 77
Message-ID: <CADDA88A-F941-42A5-8523-AD8A74C3B656@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14414
X-Tomcat-NG: microsoft.public.commerceserver.general

Soory Nihit, but with a variable of type
Microsoft.CommerceServer.Runtime.Orders.LineItem is not possible and I
don´t no any way to add a property for the lineitem. The article you
mencioned does not have any aditional information.
I´m having the same problem, so, if you could explain more about I thank
you.

"Nihit Kaul [MSFT]" wrote:

> Hi Gabriel,
>
> You can simply use a weakly-typed property for storing this information
> with the LineItem. Lookup "LineItem.Item Property " in the CS 2002 Help.
>
> The usage would simply be something like (not compiled code):
>
> LineItem li = new LineItem();
> b["ItemInfo"] = "Kilos";
> or
> b["ItemInfo"] = "Units";
>
> You could use enumerated values for better design. Also please note that
> this data will simply be put in the Blob (marshaled_data column which is

an
> image type in the SQL database). Thus it will not be searchable directly
> from SQL.
>
> If you need the ability to be able to search and view this information

from
> the SQL side as well you will need to map this data to an explicit column
> using DBStorage. Please see the help sections on DBStorage for more

details
> on that object.
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> Thread-Topic: Basket Definition
> thread-index: AcR2fnskK6515+mDTBO0ye7KiNWySg==
> X-WBNR-Posting-Host: 200.248.206.130
> From: "=?Utf-8?B?R2FicmllbCBNYXRvcw==?=" <Gabriel
> Matos@discussions.microsoft.com>
> Subject: Basket Definition
> Date: Fri, 30 Jul 2004 14:45:07 -0700
> Lines: 7
> Message-ID: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14386
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Now, in my current project, I’m using a catalog that contains some

items
> with variable weight. We have mapped two possibilities to deal with those
> products. The user can buy choosing how many units of the product he

wants
> or selecting the weight.
> My problem: I have, adding an item to user’s basket, include the
> information if its quantity means kilograms or units. Thinking as a
> database it is just one field to be added to the table that controls the
> products in baskets. However I haven’t found a way to edit the

basket
> structure using the Business Desk.
> If it doesn’t have how to edit its structure, any ideas of how can

I deal
> with that will be welcome.
>
> Regards,
> Gabriel Matos Pereira
>
>


barry flamm

2004-10-27, 5:49 pm

Hi,

I'm having the same problem but I'm using ASP, Commerce Server 2000 and I'm
adding the new column to the OrderFormLineItem table.
The other difference is that the new column gets populated in my test
environment and when I move the code and create the column in production it
stores the data to the marshalled column not the new column.

Any ideas?

Thanks in advance

Barry

"Nihit Kaul [MSFT]" wrote:

> Hi,
>
> Are you developing an ASP.Net site or an ASP site?
>
> The objects and code that I mentioned applies only to ASP.Net.
>
> The article I mentioned, is in the Help file and I qoute from it below. You
> should be able to use this to add key/value pairs to your LineItem object.
>
> LineItem.Item Property (BCL) [C#]Requirements
> Namespace: Microsoft.CommerceServer.Runtime.Orders
>
> Platforms: Windows 2000, Windows Server 2003
>
> Assembly: Microsoft.CommerceServer.Runtime.dll
> Language
> C#
> Visual Basic .NET
>
> Show all
> The Item property sets or retrieves the specified property on the line item.
>
> Definition
> [Visual Basic .NET]
> Public Property Item( _
> ByVal keyName As System.String _
> ) As System.Object
>
> [C#]
> public System.Object Item(
> System.String keyName
> ) {get; set;}
> Parameters
>
> [Visual Basic .NET]
> keyName
> The name of the property to set.
>
> [C#]
> keyName
> The name of the property to set.
> Property Value
> The value of the specified property on the line item.
>
> Requirements
> Namespace: Microsoft.CommerceServer.Runtime.Orders
>
> Platforms: Windows 2000, Windows Server 2003
>
> Assembly: Microsoft.CommerceServer.Runtime.dll
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> Thread-Topic: Basket Definition
> thread-index: AcR5kGjXM1GBbZHeSdOzc5goHpjnLA==
> X-WBNR-Posting-Host: 200.248.206.130
> From: "=?Utf-8?B? TWFyY8OpdSBTY2h1bHRlIExlaXRlIC0gTUNTRA==
?=" <Marcéu
> Schulte Leite - MCSD@discussions.microsoft.com>
> References: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
> <Lk3Oo6OeEHA.3916@cpmsftngxa10.phx.gbl>
> Subject: RE: Basket Definition
> Date: Tue, 3 Aug 2004 12:31:01 -0700
> Lines: 77
> Message-ID: <CADDA88A-F941-42A5-8523-AD8A74C3B656@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14414
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Soory Nihit, but with a variable of type
> Microsoft.CommerceServer.Runtime.Orders.LineItem is not possible and I
> don´t no any way to add a property for the lineitem. The article you
> mencioned does not have any aditional information.
> I´m having the same problem, so, if you could explain more about I thank
> you.
>
> "Nihit Kaul [MSFT]" wrote:
>
> an
> from
> details
> rights.
> items
> wants
> basket
> I deal
>

Nihit Kaul [MSFT]

2004-11-01, 5:50 pm

Try adn see what the differences are betweent he test and dev environments
that are leading to this behavior.

You could check caching, use profiler trace etc. to help narrow this down.

Thanks,

Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
Thread-Topic: Basket Definition
thread-index: AcS8MHgHN/+jgValSOSOYMaEdoywdQ==
X-WBNR-Posting-Host: 12.0.44.29
From: "=?Utf-8?B?YmFycnkgZmxhbW0=?=" <barryflamm@discussions.microsoft.com>
References: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
<Lk3Oo6OeEHA.3916@cpmsftngxa10.phx.gbl>
<CADDA88A-F941-42A5-8523-AD8A74C3B656@microsoft.com>
<FTZQyW#eEHA.3356@cpmsftngxa06.phx.gbl>
Subject: RE: Basket Definition
Date: Wed, 27 Oct 2004 07:23:03 -0700
Lines: 193
Message-ID: <49B3E7D6-4017-4B51-A3AC-14730E01F77E@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15028
X-Tomcat-NG: microsoft.public.commerceserver.general

Hi,

I'm having the same problem but I'm using ASP, Commerce Server 2000 and I'm
adding the new column to the OrderFormLineItem table.
The other difference is that the new column gets populated in my test
environment and when I move the code and create the column in production it
stores the data to the marshalled column not the new column.

Any ideas?

Thanks in advance

Barry

"Nihit Kaul [MSFT]" wrote:

> Hi,
>
> Are you developing an ASP.Net site or an ASP site?
>
> The objects and code that I mentioned applies only to ASP.Net.
>
> The article I mentioned, is in the Help file and I qoute from it below.

You
> should be able to use this to add key/value pairs to your LineItem object.
>
> LineItem.Item Property (BCL) [C#]Requirements
> Namespace: Microsoft.CommerceServer.Runtime.Orders
>
> Platforms: Windows 2000, Windows Server 2003
>
> Assembly: Microsoft.CommerceServer.Runtime.dll
> Language
> C#
> Visual Basic .NET
>
> Show all
> The Item property sets or retrieves the specified property on the line

item.
>
> Definition
> [Visual Basic .NET]
> Public Property Item( _
> ByVal keyName As System.String _
> ) As System.Object
>
> [C#]
> public System.Object Item(
> System.String keyName
> ) {get; set;}
> Parameters
>
> [Visual Basic .NET]
> keyName
> The name of the property to set.
>
> [C#]
> keyName
> The name of the property to set.
> Property Value
> The value of the specified property on the line item.
>
> Requirements
> Namespace: Microsoft.CommerceServer.Runtime.Orders
>
> Platforms: Windows 2000, Windows Server 2003
>
> Assembly: Microsoft.CommerceServer.Runtime.dll
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> Thread-Topic: Basket Definition
> thread-index: AcR5kGjXM1GBbZHeSdOzc5goHpjnLA==
> X-WBNR-Posting-Host: 200.248.206.130
> From: "=?Utf-8?B? TWFyY8OpdSBTY2h1bHRlIExlaXRlIC0gTUNTRA==
?=" <Marcéu
> Schulte Leite - MCSD@discussions.microsoft.com>
> References: <4158546A-6855-49BA-A965-1EA6521A4A22@microsoft.com>
> <Lk3Oo6OeEHA.3916@cpmsftngxa10.phx.gbl>
> Subject: RE: Basket Definition
> Date: Tue, 3 Aug 2004 12:31:01 -0700
> Lines: 77
> Message-ID: <CADDA88A-F941-42A5-8523-AD8A74C3B656@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 8bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14414
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Soory Nihit, but with a variable of type
> Microsoft.CommerceServer.Runtime.Orders.LineItem is not possible and I
> don´t no any way to add a property for the lineitem. The article you
> mencioned does not have any aditional information.
> I´m having the same problem, so, if you could explain more about I

thank
> you.
>
> "Nihit Kaul [MSFT]" wrote:
>
that[vbcol=seagreen]
is[vbcol=seagreen]
> an
directly[vbcol=seagreen]
> from
column[vbcol=seagreen]
> details
> rights.
contains some[vbcol=seagreen]
> items
those[vbcol=seagreen]
> wants
include the[vbcol=seagreen]
the[vbcol=seagreen]
edit the[vbcol=seagreen]
> basket
ideas of how can[vbcol=seagreen]
> I deal
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com