Postage Calculation goes where?

Results 1 to 2 of 2

Thread: Postage Calculation goes where?

  1. #1
    Join Date
    Dec 1969

    Default Postage Calculation goes where?

    When a customer proceeds to the checkout of the store I&#039;m working on, the customer&#039;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.<BR><BR>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 code, do some calculations, and then update the order?<BR><BR>Having this code in the 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.<BR><BR>Any thoughts?

  2. #2
    Join Date
    Dec 1969

    Default I doubt it makes much difference...

    ...unless you are and finalizing thousands of orders per second.<BR><BR>The roundtrip back to the DB server surely won&#039;t add more than a millisecond or two to your servicing time.<BR><BR>But...<BR><BR>Why not do it all in the SP???<BR><BR>Only reason I can think of is that you want to give the user a view of his/her total order and then offer multiple shipping options. But if you *always* ship one and only one way...&#060;shrug /&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts