Deceased
- Join Date:
- Jan 2007
- Location:
- Australia
- Posts:
- 6,263
- Plugin Contributions:
- 4
ozpost shipping module
robax:
Hi Rod
This is a fresh post, not following on from any previous on in this thread.
:)
Apologies for the delayed reply, I needed a little time to investigate some of this.
robax:
On first visit from any browser, when then the estimator is meant to display the results, the page breaks and no results are displayed. When I examine the HTML source, the div with id="shippingEstimatorContent" is missing.
That looks like this: http://s21.postimg.org/l6m3xsjmv/ozpost_1.jpg
If you 'view paqe source' of this same page you can get a better idea of what you are (and aren't) seeing.
<br class="clearBoth" />
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
<script language="javascript" type="text/javascript"><!--
function update_zone(theForm) {
// if there is no zone_id field to update, or if it is hidden from display, then exit performing no updates
if (!theForm || !theForm.elements["zone_id"]) return;
if (theForm.zone_id.type == "hidden") return;
// set initial values
var SelectedCountry = theForm.zone_country_id.options[theForm.zone_country_id.selectedIndex].value;
var SelectedZone = theForm.elements["zone_id"].value;
// reset the array of pulldown options so it can be repopulated
var NumState = theForm.zone_id.options.length;
while(NumState > 0) {
NumState -= 1;
theForm.zone_id.options[NumState] = null;
[I]..... lines deleted for brevity -------------[/I]
function showStateField(theForm) {
theForm.state.disabled = false;
theForm.state.className = 'inputLabel visibleField';
theForm.state.setAttribute('className', 'visibleField');
document.getElementById("stateLabel").className = 'inputLabel visibleField';
document.getElementById("stateLabel").setAttribute('className', 'inputLabel visibleField');
document.getElementById("stBreak").className = 'clearBoth visibleField';
document.getElementById("stBreak").setAttribute('className', 'clearBoth visibleField');
}
//--></script><!-- shipping_estimator //-->
<script language="javascript" type="text/javascript">
function shipincart_submit(){
document.estimator.submit();
return false;
}
</script>
This is all standard/default Zencart code for the country/state dropdown menus. The ozpost module doesn't make any changes to this code. It appears that the page is being aborted trying to load whatever comes next. (possibly the tpl_modules_shipping_estimator.php file, which does get modified by ozpost.
Try reverting this (tpl_modules_shipping_estimator.php) back to the unmodified copy to see if the problem goes away. The ozpost module should still function, but it will be missing the code to select the suburb name, and that is only really needed for the courier services, Australia Post quotes don't need this. Even the courier quotes will still work for most destinations
robax:
If I then revisit or refresh the page, the estimator shows, but does not show any of the OZ Post results. However in this case, the HTML source does in fact contain estimator code.
That looks like this: http://s11.postimg.org/ggy5dc7sj/ozpost_2.jpg
This isn't really surprising. The 'refreshed' page is obtaining the quotes from a local cache, and since no quotes were returned from the original request, there are none to display on the refteshed page. Under normal circumstances the ozpost module would have flagged this as an error so as to force a fresh quote request rather than displaying the non quote result, but because the ozpost code didn't complete, this flagging never took place.
robax:
To quickly see this happening live, please add this example product to cart and then go to checkout and use 3000 as the post code:
http://www.saxandwoodwind.com.au/index.php?main_page=product_info&cPath=80_116_175&products_id=1289
Thanks. That has allowed me to verify the problem and report my findings. Always a step in the right directlion. :)
robax:
The second issue has to do with the OZ Post results - I'm not getting any.
I briefly enabled the debug message option in the module it makes the page show this:
http://s7.postimg.org/kkkgxjmx7/ozpost_3.jpg
This confirms what I said above. The quote (or lack of) that you are seeing here are being retieved from a local cache (specifically, the SESSION data).
robax:
Try adding this product to cart and then get a shipping estimate with post code 3000:
http://www.saxandwoodwind.com.au/index.php?main_page=product_info&products_id=474
According to our logs, your store is both sending and recieving valid data for this item.
robax:
This example should give plenty of Australia Post results, but it does not show any. Enabled parcels are: Australia Post PrePaid Satchels, 500g Satchel., 500g Express Satchel, 3kg Satchel., 3kg Express Satchel
Although the satchels should be showing, I would suggest that you also enable the Aust Post regular parcels (at least for the time being). IF for some reason the satchels are being disallowed via the client code, the regular parcels would be a more suitable fallback rather than resorting to one of the static rates (or no rates at all).
robax:
This worked fine with the previous version of the module, even after the upgrade to ZC 1.5.1
Let me know what you think.
Although ozpost V3.5.1 does have a known display issue (the quote items not all lining up) I've not come across this particular problem before, so about all I can suggest at this stage is
- restore the rpl_modules_shipping_estimator.php file back to a zencart original, and
- Enable the australia post parcel methods.
Hopefully one or the other may shed more light on the problem.
Cheers
Rod