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 ]
|