Forums / Built-in Shipping and Payment Modules / Dealing with slow shipper server response times

Dealing with slow shipper server response times

Locked

Views: 1,257

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
20 Sep 2007, 6:51 PM
#1
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Dealing with slow shipper server response times

I just want to be able to let the customer know what's going on.

How it seems to work now is the shopping cart waits for the entire page to load, including all external data, before displaying ANYTHING. I'd like to modify that. I want the page to load without waiting for the external data, and just show something like "retrieving shipping rates... please wait" until that data finally arrives, then display it to the user. The "continue" button won't be available until the data is complete, so there has to be some way of knowing when the data has arrived.

I don't even know where to begin. My first problem is how do I get the core code to "ignore" the fact the data isn't all there yet and just display the page without that piece. My next problem is how do I continue to retrieve that data anyway (sort of like multi-threading). My final problem is how do I then replace the "please wait" with the actual data without reloading the page (DHTML?).

Any ideas?

Getting this done would be very valuable to everyone that uses the CanadaPost or UPS or similar modules because right now the customer just sees nothing but a stalled request until the external server responds, which can be upwards of 30 seconds - far too long to expect a customer to wait around that has no indication of what (if anything) is happening.

  • Steven
21 Sep 2007, 12:45 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Dealing with slow shipper server response times

Zen Cart's pages are delivered based on the server's gzip settings and/or the store's gzip settings in Admin->Configuration->GZip.
The GZip support is essentially PHP's "output_buferring" feature.
If you disable output-buffering in your PHP.INI and disable Gzip in your Zen Cart admin, then you can bypass the "whole page shows at once" you're experiencing.
You might also be able to play with ob_flush() commands etc if you understand what's doing what where and why.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Sep 2007, 12:52 AM
#3
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Dealing with slow shipper server response times

ahhh.... g-zip. That explains alot. Thanks! I'll take a look. With that, I should be able to at least put in a "please wait while loading" message.

Cheers.

  • Steven