You are correct - I found the bug in domestic shipping - where the first option is always selected regardless of the selection on the previous page.
I attached a bugfix version here.
I didn't expect zencart to retrieve the quote twice.
It seems that when the shipping selection page is loaded all quotes are retrieved.
Once the customer makes a selection that shipping module is loaded again and asked to retrieve that specific selection again. I would understand retrieving quotes again if the address or order quantity changed. I don't understand why it's done in this scenario.
It needlessly adds an extra few seconds to the load time.
After displaying shipping quotes on the 'checkout_shipping' page:
Customer -> ZenServer: submits selected shipping option
ZenServer -> USPS-APIS: additional quote request to USPS
USPS-APIS -> ZenServer: Quote Response
ZenServer: Stores selected quote in customer session variable.
ZenServer -> Customer: Send redirect header to "checkout_payment" page
Customer -> ZenServer: Send request for "checkout_payment" page
ZenServer -> Customer: Send "checkout_payment" page
It's a little inefficient
Really the shipping quotes could be stored server side in the session and cleaned up when they are no longer needed. If people are already going to the checkout they are worth more than a couple kb (max) of session storage when you can save a few seconds on a pages load time. Especially load times in a checkout process.


Reply With Quote
