Zen Cart Logo
Forums / Addon Shipping Modules / ozpost shipping module

ozpost shipping module

Views: 403,032

Results 2,101 to 2,120 of 2,251
29 Mar 2015, 5:45 PM
#2101
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

ozpost shipping module

lat9:

Does the distribution file that will be available in the Plugins list the file-related changes that are made?

Yes and no.

Yes, one of the files does list all of the files that the module updates.
No, there isn't a file that details what changes have been made to any of the files listed.

lat9:

I keep a copy of all the site's files locally and I really don't want to have to go through directory-by-directory to find out what files have been changed in the update.:blink:

With almost all of the ozpost updates, the only changes have been to the 'main' ozpost.php file.

Where the installer needs to modify any core code it creates a backup called filename.php_ozpRestore, so to quickly find the changed files just search for the *_ozpRestore files.

Cheers
RodG

29 Mar 2015, 6:42 PM
#2102
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ozpost shipping module

Another question: Shipping weights.

I've got a product that is defined with a weight of 0. The ozPost Weight factor is kilos, the "Tare Weight" is 500:+90,1000:20,2000:15,10000:+2000. the "Action on 0 Weight" is default, the default weight is 2900.

When I estimate shipping, the weight of the product is shown as 4.9kg. Where did that number come from?

30 Mar 2015, 4:26 PM
#2103
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

lat9:

Another question: Shipping weights.
I've got a product that is defined with a weight of 0. The ozPost Weight factor is kilos,

0kg or 0gm, its all the same :-)

lat9:

the "Tare Weight" is 500:+90,1000:20,2000:15,10000:+2000.

These are applied to the parcel, not the individual items.

lat9:

the "Action on 0 Weight" is default, the default weight is 2900.

Uhuh.

lat9:

When I estimate shipping, the weight of the product is shown as 4.9kg. Where did that number come from?

The defined product weight is '0' so the 'Action on Zero Weight' is applied, giving this item a weight of 2900gm and a tare weight of 15% = +435gm = 3.335Kg...

Nope. That's not it. Perhaps something has gone amiss with the tare calculations, and they are seeing the assigned weight as 2900kg, and therefore giving a tare weight of 2kg... At least that will explain the 4.9kg.

Enabling the debug should indicate the tare weight being applied, as well as whether its a fixed amount or a percentage, so it shouldn't be hard to verify this suspicion.

Cheers
RodG

30 Mar 2015, 5:37 PM
#2104
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ozpost shipping module

Rod, I've copied and pasted the debug-information HTML, confirming your suspicions regarding the tare weight:

Weight	  2900g 	Items	 1	Weight	 4900g
Dimensions	  29 x 25 x 2.5 	 29 x 25 x 2.5
Cube / Weight	  1812.5cc / 0.453125kg 	 1812.5cc / 0.453125kg
Calculated: Length=29.20cm, Width=25.20cm, Height=2.70cm, Weight=4900g, NumBoxes=1
Using a tare weight of +2000gms
31 Mar 2015, 4:43 PM
#2105
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

lat9:

Rod, I've copied and pasted the debug-information HTML, confirming your suspicions regarding the tare weight:

Weight 2900g Items 1 Weight 4900g
Dimensions 29 x 25 x 2.5 29 x 25 x 2.5
Cube / Weight 1812.5cc / 0.453125kg 1812.5cc / 0.453125kg
Calculated: Length=29.20cm, Width=25.20cm, Height=2.70cm, Weight=4900g, NumBoxes=1
Using a tare weight of +2000gms



So, after a lot of testing and checking, I couldn't find anything wrong with the code, and it turns out that these are the correct results to be expected. 

With the "Tare Weight" Setting of  500:+90,1000:20,2000:15,10000:+2000

Parcels up to 500gm have 90gm added 
Parcels 501gm - 1000gm have 20% added 
Parcels 1001gm - 2000gm have 15% added 
Parcels 2001gm - 10000gm (and over) have 2000gm added  

So with your zero weight product, using the default weight of 2.9kg plus 2kg tare = 4.9kg 

Cheers
RodG
31 Mar 2015, 10:45 PM
#2106
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: ozpost shipping module

Thanks, RodG, for doing the math! I was being lazy ...

6 Apr 2015, 10:22 PM
#2107
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: ozpost shipping module

Hi Rod

This may be a bit convulouted, but i am trying to give all info I can to hopefully see if you can spot where I have gone wrong

We have just moved servers (to iinet hosting) and ozpost dropped dead taking out the cart page and the admin shipping modules page so i couldn't disable it
What i have done
I used the highly unscientific method of deleting one by one the shipping module files out of /includes/modules/shipping as soon as i deleted the ozpost one the admin shipping modules page appeared again (obviously sans ozpost),
I then tried uploading a fresh set of ozpost files (both module and language) matching the version(3.5.2?) that was already there. the admin/modules/shipping page broke again.
I deleted these and uploaded the latest version (3.6.5) files of ozpost, and eureka the admin page worked however the cart kept hanging and not working.
so next through the /admin/modules/shipping page I did an uninstall reinstall (making sure the settings were saved) and now it is working in the cart
However in admin if I click the "test ozpost server" I just end up with a broken /admin/modules/shipping page, no info is returned from the ozpost server

/admin/modules.php?set=shipping&module=ozpost&action=test

How would i test to see what is going on

6 Apr 2015, 11:11 PM
#2108
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: ozpost shipping module

Should add, this is something to do with my server as i tested in another clients zencart (they also use ozpost) and the ": Click here to test the ozpost Servers" worked perfectly on their site, I guess i have to work out if it is something in my admin that is blocking it or something else

7 Apr 2015, 11:49 AM
#2109
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

nigelt74:

We have just moved servers (to iinet hosting) and ozpost dropped dead taking out the cart page and the admin shipping modules page so i couldn't disable it

I've no idea why this would have happened. A bad file copy perhaps?

nigelt74:

What i have done
I used the highly unscientific method of deleting one by one the shipping module files out of /includes/modules/shipping

Works for me :-)

nigelt74:

as soon as i deleted the ozpost one the admin shipping modules page appeared again (obviously sans ozpost),
I then tried uploading a fresh set of ozpost files (both module and language) matching the version(3.5.2?) that was already there. the admin/modules/shipping page broke again.
I deleted these and uploaded the latest version (3.6.5) files of ozpost, and eureka the admin page worked however the cart kept hanging and not working.

For what its worth, the only file from the ozpost distribution package that has been changed in the V3.x.x series is the /modules/shipping/ozpost.php file.

nigelt74:

so next through the /admin/modules/shipping page I did an uninstall reinstall (making sure the settings were saved) and now it is working in the cart
However in admin if I click the "test ozpost server" I just end up with a broken /admin/modules/shipping page, no info is returned from the ozpost server

Clearly something isn't right, but this is a new one to me.

nigelt74:

How would i test to see what is going on

Good question, but before I answer, is the problem currently limited to the server testing? If you don't invoke this option can you still make config changes to the ozpost module?
Is the store able to provide quotes?
Are there any error messages during the uninstall/reinstall process?

What is the name of the store (so I can check the server logs for any clues).

Cheers
RodG

8 Apr 2015, 2:34 AM
#2110
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: ozpost shipping module

Cheers Rob

No error messages whatsoever I am still trying to figure out the log system on iinet, but I don't see anything obvious in there or in zencarts own logs

The only errors i get relate to me running zen 1.5.1 on php 5.4

store is

nagstoriches.com.au

8 Apr 2015, 10:32 AM
#2111
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

nigelt74:

No error messages whatsoever I am still trying to figure out the log system on iinet, but I don't see anything obvious in there or in zencarts own logs

The only errors i get relate to me running zen 1.5.1 on php 5.4

store is

nagstoriches.com.au

So I've been able to answer "Is the store able to provide quotes?" - Yes.

That still leaves:
Is the problem currently limited to the server testing?
If you don't invoke this option can you still make config changes to the ozpost module?

and
Are there any error messages during the uninstall/reinstall process? (these are displayed only, not logged anywhere)

Cheers
RodG

8 Apr 2015, 10:56 AM
#2112
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: ozpost shipping module

There seem to be a large number of other issues that are cropping up with this install, so i don' think it is ozpost, it is literally melting down before my eyes

Cheers for the help

15 Apr 2015, 10:15 AM
#2113
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod,

Trust this finds you well.

Have just finished a complete install on 1.5.4, clean database, the lot and installed the current ozpost version.

Just wanted to know how to remove the delivery suburb and the country code from the shipping estimator results so that the user is just left seeing the destination & postcode..

eg;

Was showing:

Suburb Blah 1234, to Suburb XYZ 1234, Australia

To only show:

Suburb XYZ 1234

Cheers,
Mike

16 Apr 2015, 12:55 AM
#2114
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

Mike_Dean:

Just wanted to know how to remove the delivery suburb and the country code from the shipping estimator results so that the user is just left seeing the destination & postcode..

You'll need to edit the /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_shipping_esitmator.php file to do this.

Cheers
Rod

12 May 2015, 2:31 PM
#2115
anthonyh avatar

anthonyh

New Zenner

Join Date:
Jun 2013
Location:
Melbourne, Australia
Posts:
12
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod

I am having great deal of difficulty installing OzPost V3.6.5 on a ZC 1.5.4 site I have recently installed. I imported a 1.3.9 database that was upgraded successfully. I have already installed ckeditor and a template. However, when I try to install OzPost I keep on receiving the following message in my error log after the Admin seizes up (ERROR 500 - INTERNAL SERVER ERROR:) after trying to activate the installation of the module.

12-May-2015 08:46:13 America/Chicago] PHP Warning:  file(/home/SITE/public_html/shop/includes/templates/CUSTOM/templates/tpl_modules_shipping_estimator.php): failed to open stream: No such file or directory in /home/SITE/public_html/shop/includes/modules/shipping/ozpost.php on line 4220

The tpl_modules_shipping_estimator.php file is actually in the custom template directory.

Other files seem to have been backed up during the installation process, but the problem is with the above file. It's not backed up and causes major problems.

Do you require any further information?

Thanks

Anthony

12 May 2015, 2:57 PM
#2116
anthonyh avatar

anthonyh

New Zenner

Join Date:
Jun 2013
Location:
Melbourne, Australia
Posts:
12
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod

Working and (presumably) fixed!

When the admin has seized up previously during this problem, after doing some experiments, I had been deleting the entire store via FTP and then restoring the database and backup (modified archive file with only the store included) via CPanel.

However, this time all I did was a restore of the site via CPanel over the existing site! Don't know why it worked and OzPost is now working! I have had many problems continue when restoring like this before (as it only seems to replace missing files and keeps 'rogue' files) so that is why I usually delete the entire site and do a full restore to a known point. Then I try again (and sometimes again and again and again :-)

Anyway, would still appreciate any advice on why this happened.

Cheers

Anthony

12 May 2015, 6:52 PM
#2117
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

anthonyh:

Working and (presumably) fixed!

Thanks for the update.

anthonyh:

Anyway, would still appreciate any advice on why this happened.

I think this is going to remain a bit of a mystery.

The log entry you provided is showing the path:
/home/SITE/public_html/shop/includes/templates/CUSTOM/templates/tpl_modules_shipping_estimator.php

I'm assuming that you haven't edited this.

This URL is dynamically created by the ozpost installation code with:

$tpl_folder = DIR_FS_CATALOG.DIR_WS_TEMPLATES.$GLOBALS['template_dir']. "/templates/" ; 

For this code to produce that output, the $GLOBALS['template_dir'] variable would need to be set to 'CUSTOM', and although this is quite possible, most templates have more meaningful names.

If you HAVE edited the log entry (something you should never do because it is too easy to be led astray) and the reported path is the same as the actual path, then either you or the computer has made a mistake. Computers don't make mistakes. ;-)

So, if that file is missing (or most likely, it is located in the 'wrong' place), one has to wonder what other files have also been misplaced/relocated.

For what it's worth, the 500 Internal server error, although a generic error message designed to not reveal any sensitive information, is more often than not caused by dissallowed folder permissions (such as '777', which works on many, but not all servers).

Now, having said all that, the tpl_modules_shipping_estimator.php file doesn't need the ozpost modifications and the module will work quite ok using the default tpl_ file, or even one from a different template.

What the ozpost installer tries to do, is replace the 'State' dropdown menu on the quote page with a list of dynamically generated suburb names derived from the postcode that the customer enters.
The ozpost module has no need to know the State (this can be derived from the postcode), but most of the courier companies require a postcode and suburb name.
If a suburb name isn't given/provided, the module does a postcode lookup and selects the first name from the list returned.

Anyway, although knowing this doesn't answer the question as to why things went wrong, but it will let you know if the template is/was modified or not. (If it has a State dropdown you are using an unozpostified template. If you have the Suburbs selector then you are using a fully patched tpl_ file.

Cheers
RodG

12 May 2015, 11:53 PM
#2118
anthonyh avatar

anthonyh

New Zenner

Join Date:
Jun 2013
Location:
Melbourne, Australia
Posts:
12
Plugin Contributions:
0

Re: ozpost shipping module

I think this is going to remain a bit of a mystery.

The log entry you provided is showing the path:
/home/SITE/public_html/shop/includes/templates/CUSTOM/templates/tpl_modules_shipping_estimator.php

I'm assuming that you haven't edited this.

Yes, I edited the capitalised entries, ie SITE and CUSTOM, all else is correct. The actual path does exist and the tpl_modules_shipping_estimator.php is in there.

For what it's worth, the 500 Internal server error, although a generic error message designed to not reveal any sensitive information, is more often than not caused by dissallowed folder permissions (such as '777', which works on many, but not all servers).

The folder in that contains the tpl_modules_shipping_estimator.php has a file file permissions of 755.

Now, having said all that, the tpl_modules_shipping_estimator.php file doesn't need the ozpost modifications and the module will work quite ok using the default tpl_ file, or even one from a different template.

Thanks for letting me know this.

Anyway, although knowing this doesn't answer the question as to why things went wrong, but it will let you know if the template is/was modified or not. (If it has a State dropdown you are using an unozpostified template. If you have the Suburbs selector then you are using a fully patched tpl_ file.

By my screenshot below you will see that an un-logged in customer will have to select the State, so the template was not modified.

Attachment #15290

Now, from the information you have supplied, I decided to look at the current tpl_modules_shipping_estimator.php file. It contains no mention of OzPost. I then looked at one of the files that was created when the system was crashing and reporting the error. It contains the following code:

       if(CART_SHIPPING_METHOD_ZIP_REQUIRED == "true"){
echo "<script type=\"text/javascript\" src=\"http://svr0.ozpost.net/ozpost.js\"></script>" ;
if ($order->delivery['country']['iso_code_2'] != 'AU') {  
        $zip_code = '' ; $order->delivery['suburb']  = '' ; $d1 = "none" ; 
   } else { $d1 = "inline" ;}

I then replaced the non-ozpost tpl_modules_shipping_estimator.php in the custom template folder with the one that mentions ozpost and now this is what shows:

Attachment #15291

Once you have selected a suburb the following shows:

Attachment #15292

I have checked the site and there was no crashes or error logs generated after doing this.

Thanks so much for your help Rod. It's really appreciated. Everything appears to be truly working as expected now. Please let me know if there is anything else I should investigate. Also if you ever find out what caused the original problem please let us know.

Cheers

Anthony

15 May 2015, 6:23 PM
#2119
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: ozpost shipping module

anthonyh:

I then replaced the non-ozpost tpl_modules_shipping_estimator.php in the custom template folder with the one that mentions ozpost and now this is what shows:

Attachment #15291

Once you have selected a suburb the following shows:

Attachment #15292

I have checked the site and there was no crashes or error logs generated after doing this.

The screenshots indicate that all is OK as well.

Cheers
Rod

25 May 2015, 7:00 AM
#2120
catching_angels avatar

catching_angels

New Zenner

Join Date:
Mar 2014
Location:
Melbourne Australia
Posts:
7
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod
You helped me out last year hope you can do the same this year
In the last few days we have update our site catchingangels.com from V1.5.1 to V1.5.4 by a third party web developer as we did last year when we moved to Zen cart
anyway when she reinstalled the module all the listings lost there postage data expect for the weight she has told me that she has installed it correctly can you have a look or tell me where to look and what to look for

Many thanks John