Wednesday, March 21, 2012

Postage Calculation goes where?

When a customer proceeds to the checkout of the store I'm working on, the customer's ID is sent to a database stored procedure which returns the details of the order based on the shopping cart and customer account details stored in the database.

Should I have the stored procedure calculate the postage and packing for the order or should I wait till the order details are returned to the asp.net code, do some calculations, and then update the order?

Having this code in the asp.net page would not only require a trip to the server to do the update but also a trip to retrieve p&p information used for the calculations. These extra trips are my concern.

Any thoughts?::These extra trips are my concern.

Why? Are you working for Amazon?

How many hundred CHECKOUTS do you have per minute?

IMHO this is a non-issue, at least with some caching.

No comments:

Post a Comment