DefinitionName in the Basket Line Item
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > DefinitionName in the Basket Line Item




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    DefinitionName in the Basket Line Item  
Colin Bowern


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-02-05 11:03 PM

Without having to do a lookup to the database I was hoping that the basket
LineItem object would store the value of DefinitionName from a product
catalog item.  However looking into it I cannot see this.  Even when I
manually stuff a value in the LineItem dictionary prior to adding it to the
basket the value disappears.

The reason behind this is that the checkout process appears differently
depending on the types of items that are in the cart.  I was going to
discern this information straight from the basket LineItem object instead of
having to go back to the product catalog to look it up.  Any thoughts on
adding additional information to the line item in the basket?

Thanks,
Colin







[ Post a follow-up to this message ]



    RE: DefinitionName in the Basket Line Item  
Nihit Kaul [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-27-05 07:46 AM

Hi,

You can add this information as a indexer property on the LineItem class
and store it with the Basket itself. However if the value of this property
is not already present even in the weakly-typed property set on the
LineItem class then it probably needs to be pulled in the pipeline
components which actually do the catalog lookup such as QueryCatalogInfo.
You might have to add a custom component to lookup and add this propery
value after the QCI component.

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
--------------------
From: "Colin Bowern" <colin.bowern@nospam.officialcommunity.com>
Subject: DefinitionName in the Basket Line Item
Date: Wed, 2 Mar 2005 18:38:56 -0500
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Message-ID: <u4aWHE4HFHA.3760@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: mail.officialcommunity.net.77.188.207.in-addr.arpa
207.188.77.211
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.general:15698
X-Tomcat-NG: microsoft.public.commerceserver.general

Without having to do a lookup to the database I was hoping that the basket
LineItem object would store the value of DefinitionName from a product
catalog item.  However looking into it I cannot see this.  Even when I
manually stuff a value in the LineItem dictionary prior to adding it to the
basket the value disappears.

The reason behind this is that the checkout process appears differently
depending on the types of items that are in the cart.  I was going to
discern this information straight from the basket LineItem object instead
of
having to go back to the product catalog to look it up.  Any thoughts on
adding additional information to the line item in the basket?

Thanks,
Colin








[ Post a follow-up to this message ]



    Re: DefinitionName in the Basket Line Item  
Colin Bowern


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-05 11:13 PM

Hi Nihit,

I ended up writing a scriptor component to save the information:

<code>
Function MSCSExecute(config, orderform, context, flags)

Dim item

' Cache item-level data
For Each item In orderform.value("items")
item.value("saved_product_name") =
item.value("_product_displayname")
item.value("saved_product_definitionname") =
item.value("_product_definitionname")
item.value("saved_product_deliverymethod") =
item.value("_product_deliverymethod")
Next

' Cache form-level data
orderform.value("saved_cy_oadjust_subtotal") =
orderform.value("_cy_oadjust_subtotal")

MSCSExecute = 1

End Function
</code>

It would be nice to see in CS2006 the ability to control what gets saved in
the basket versus what is flushed out after the HTTP request is completed as
opposed to having to workaround it by duplicating the data.

Cheers,
Colin

"Nihit Kaul [MSFT]" <nihitk@online.microsoft.com> wrote in message
news:IEiPOeoMFHA.3944@TK2MSFTNGXA03.phx.gbl...
> Hi,
>
> You can add this information as a indexer property on the LineItem class
> and store it with the Basket itself. However if the value of this property
> is not already present even in the weakly-typed property set on the
> LineItem class then it probably needs to be pulled in the pipeline
> components which actually do the catalog lookup such as QueryCatalogInfo.
> You might have to add a custom component to lookup and add this propery
> value after the QCI component.
>
> 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
> --------------------
> From: "Colin Bowern" <colin.bowern@nospam.officialcommunity.com>
> Subject: DefinitionName in the Basket Line Item
> Date: Wed, 2 Mar 2005 18:38:56 -0500
> Lines: 16
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
> X-RFC2646: Format=Flowed; Original
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
> Message-ID: <u4aWHE4HFHA.3760@TK2MSFTNGP12.phx.gbl>
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: mail.officialcommunity.net.77.188.207.in-addr.arpa
> 207.188.77.211
> Path:
> TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNG
P1
> 2.phx.gbl
> Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.general:15698
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Without having to do a lookup to the database I was hoping that the basket
> LineItem object would store the value of DefinitionName from a product
> catalog item.  However looking into it I cannot see this.  Even when I
> manually stuff a value in the LineItem dictionary prior to adding it to
> the
> basket the value disappears.
>
> The reason behind this is that the checkout process appears differently
> depending on the types of items that are in the cart.  I was going to
> discern this information straight from the basket LineItem object instead
> of
> having to go back to the product catalog to look it up.  Any thoughts on
> adding additional information to the line item in the basket?
>
> Thanks,
> Colin
>
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:51 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register