Commerce Server General - When to run basket pipeline ?

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > October 2006 > When to run basket pipeline ?





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 When to run basket pipeline ?
Steve

2006-10-04, 7:30 pm

My original code has the Basket.Save() method before the Basket.RunPipeline()
method... This method succeeded by adding new items to basket but failed when
I call the Basket.SubTotal() : I don't seem to get the latest updated
subtotal value !!!

If I run the pipeline before saving the basket, the subtotal is successfully
calculated but the lineItem is not longer added to basket.

The StarterSite, sometimes has the runpipeline before the savebasket and
sometimes after...

Is there a rule (maybe a rule of thumb) to when should the pipeline be
called and what pipeline should be called before the other ??
Colin Bowern

2006-10-04, 7:30 pm

Hi Steve,

The basket pipeline is responsible for populating catalog information on the
line item, removing unavailable line items, and calculating sub-totals. You
will want to run the pipeline if you need to calculate (or re-calculate) the
sub-total, or as part of a basket refresh.

There are two approaches you might want to consider:
1. Add the item to the basket, save the basket. Transfer/redirect to a view
cart page which runs the basket pipeline and displays any resulting basket
messages along with the contents of the basket.
2. Add an item to the basket, refresh the basket, save the basket, and bind
any basket errors to the page.

Hope that helps!
Colin

"Steve" <Steve@discussions.microsoft.com> wrote in message
news:1EBD57EA-CE77-42FA-828F-D99B74F98F1A@microsoft.com...
> My original code has the Basket.Save() method before the
> Basket.RunPipeline()
> method... This method succeeded by adding new items to basket but failed
> when
> I call the Basket.SubTotal() : I don't seem to get the latest updated
> subtotal value !!!
>
> If I run the pipeline before saving the basket, the subtotal is
> successfully
> calculated but the lineItem is not longer added to basket.
>
> The StarterSite, sometimes has the runpipeline before the savebasket and
> sometimes after...
>
> Is there a rule (maybe a rule of thumb) to when should the pipeline be
> called and what pipeline should be called before the other ??



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com