|
Home > Archive > Commerce Server General > January 2006 > Shipping Total Problem
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 |
Shipping Total Problem
|
|
|
| Hi,
I'm using Commerce Server 2002 on Windows 2000 Server.
I have modified total.pcf in order to overwrite shipping total based on a
rule.
I added following script at the end of Shipping pipeline in total.pcf.
If sub_total >200 and (ship_method="Ground" or ship_method="USPS Priority
Mail") Then
orderform.value("_cy_shipping_total") = sub_total * 0.05
End If
The problem is that, in summary.asp (order review) page, it always get
previous shipping amount, not updated amount.
Here's how I got it:
1. Added a product to the shopping cart.
2. Proceed to summary page (after shipping method pick)
3. Shipping total is, let's say, $12
4. Back to the cart, remove item, add a new item and proceed checkout.
5. I still get $12 in order review page.
6. If I refresh the page or go back to the previous page and come back to
the order review page, I get updated shipping total.
Anyone has any idea what I'm doing wrong?
I checked subtotal and it is updated correctly everytime.
Thanks,
JL
| |
| Nihit Kaul [MSFT] 2006-01-04, 6:04 pm |
| Seems as if the pipeline is not getting executed in the 2nd case, so you
should put breakpoints and check if the path getting executed will result
in the total being calculated or not.
Also - since you are storing this to an indexer property starting with "_"
the property will not be persisted to the database. Are you saving and
reloading the Basket or is this all an in-memory operation?
There is no else in the If-Then loop as well, so I am not sure what the
intended behavior is when sub_total is < 200 - could it be that the
previous value is getting used due to that?
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: Shipping Total Problem
thread-index: AcYNiyAP6HjSXo5iRASjs7Ok7qLwUA==
X-WBNR-Posting-Host: 63.124.79.33
From: "=?Utf-8?B?Skw=?=" <JL@discussions.microsoft.com>
Subject: Shipping Total Problem
Date: Fri, 30 Dec 2005 13:51:01 -0800
Lines: 31
Message-ID: <68FC78E6-0AEC-469F-A2C3-08599E0BE5D7@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
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.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.general:17294
X-Tomcat-NG: microsoft.public.commerceserver.general
Hi,
I'm using Commerce Server 2002 on Windows 2000 Server.
I have modified total.pcf in order to overwrite shipping total based on a
rule.
I added following script at the end of Shipping pipeline in total.pcf.
If sub_total >200 and (ship_method="Ground" or ship_method="USPS Priority
Mail") Then
orderform.value("_cy_shipping_total") = sub_total * 0.05
End If
The problem is that, in summary.asp (order review) page, it always get
previous shipping amount, not updated amount.
Here's how I got it:
1. Added a product to the shopping cart.
2. Proceed to summary page (after shipping method pick)
3. Shipping total is, let's say, $12
4. Back to the cart, remove item, add a new item and proceed checkout.
5. I still get $12 in order review page.
6. If I refresh the page or go back to the previous page and come back to
the order review page, I get updated shipping total.
Anyone has any idea what I'm doing wrong?
I checked subtotal and it is updated correctly everytime.
Thanks,
JL
|
|
|
|
|