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

ozpost shipping module

Views: 403,047

Results 1,961 to 1,980 of 2,251
14 Feb 2014, 6:43 AM
#1961
rodg avatar

rodg

Deceased

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

ozpost shipping module

vandiermen:


Current OzPost versions have a display problem during checkout. I have tested 1.3.9h and 1.5.1 etc. see screenshot links below. I fixed this once, now I forget how I fixed it (something in the checkout_shipping template), can you offer any quick fix for me.

http://www.zen-cart.com/showthread.php?122637-ozpost-shipping-module&p=1226105#post1226105

Cheers
Rod

28 Feb 2014, 2:16 PM
#1962
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Ozpost V3.5.4
Now available for download http://ozpost.net.au/downloads/?did=1
It should be available from here http://www.zen-cart.com/downloads.php?do=file&id=899 shortly.

$Id: ozpost.php,V3.5.4 Feb 24 2014
Fixed display formating when est days and/or handling fees enabled
Fixed incorrect handling fees being apllied to overseas prepaid satchels
Fixed issue of icons and formatting data being inserted into database when single method was selected
Fixed install/upgrade error with ZenCart V1.5.2
Added option to provide bulk discount satchel prices from Australia Post
Fixed issue of weight settings being lost with some upgrades
Fixed syntax error in clicknsend.php
Added checks to see whether to use CUSTOM tpl_modules_shipping.php file or whether to copy and use the default one.
Fixed problem with module aborting if svr1.ozpost responds with incorrect data.
Added color backgrounds to break configuration options into sections
Added special rates for FastWay
Added Fastway Boxes
Added support for Dangerous Goods.
Added TNT ONFC Satchels

2 Apr 2014, 12:26 AM
#1963
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: ozpost shipping module

I am using the Ozpost module to calculate my shipping. I would like to offer free standard shipping on all orders over a certain amount. And still have the option to choose Express Post if they are in a hurry.
I can see how you can do free shipping in the Order Total section but this offers no other shipping options.
Is this option possible?

2 Apr 2014, 3:49 AM
#1964
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: ozpost shipping module

robbie269:

I am using the Ozpost module to calculate my shipping. I would like to offer free standard shipping on all orders over a certain amount. And still have the option to choose Express Post if they are in a hurry.
I can see how you can do free shipping in the Order Total section but this offers no other shipping options.
Is this option possible?
Worked it out by using the freeshipping options instead. Would really like to discount the Express Post option if they are entitled to free shipping though and not show the standard shipping option.

2 Apr 2014, 9:25 AM
#1965
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

robbie269:

Worked it out by using the freeshipping options instead.

Glad you figured it out. Off the top of my head I didn't have a solution to your problem.

robbie269:

Would really like to discount the Express Post option if they are entitled to free shipping though and not show the standard shipping option.

This would only be possible by modifying the ozpost code. I don't think it'd be too difficult to do. The 'hard' part would be adding the checks needed to determine if a discounted rate is applicable for any given order. The ozpost code itself (V3.5.4+) already contains code that applies discount rates for the bulk purchase of prepaid satchels so this can be copied/modified so discounts can be applied to the various express post methods.

Example:

 if ((in_array("500g Express Satchel", $this->allowed_methods)) && ($quote->id == "PPSE5")) {
                       $handlingFee = MODULE_SHIPPING_OZPOST_PPSE_HANDLING;
                           if (defined('PPSE5_description')) $quote->description = PPSE5_description; 
                           if ( MODULE_SHIPPING_OZPOST_AP_DISCOUNT1E == '1') { 
                                   $quote->cost = (float)$quote->cost - ((float)$quote->cost * 0.05 ); } 
                            elseif (MODULE_SHIPPING_OZPOST_AP_DISCOUNT1E == '2') {
                                 $quote->cost =  (float)$quote->cost - ((float)$quote->cost * 0.125) ;  }
                           elseif (ADD YOUR CHECK HERE) {
                                  $quote->cost =  (ADD YOUR REQUIRED COST OR FORMULA HERE)   ;  }

This example is for the 500gm Express Satchels. It will need to be replicated/added for each of the other satchels and Express parcels.

Unfortunately you will need to re-do this whenever the ozpost module is upgraded.

Cheers
RodG

3 Apr 2014, 2:12 AM
#1966
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: ozpost shipping module

I looked at some other websites that offer free postage beyond a certain amount and they don't seem to discount the Express Post. So maybe I won't bother either. I may just see how it goes for now.

3 Apr 2014, 9:17 AM
#1967
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

robbie269:

I looked at some other websites that offer free postage beyond a certain amount and they don't seem to discount the Express Post. So maybe I won't bother either. I may just see how it goes for now.

Perhaps they don't offer it because they don't have the same kind of support that will allow them to do it.

Little things like this could give you the edge over your competitors.

Just saying.

Cheers
RodG

8 Apr 2014, 6:19 AM
#1968
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: ozpost shipping module

RodG:

elseif (ADD YOUR CHECK HERE) {$quote->cost = (ADD YOUR REQUIRED COST OR FORMULA HERE) ; }
The Check would be that Free Postage has been activated. The formula would be Express Postage minus Standard Postage but I am not sure what terms I need to use. Total novice at PHP.

9 Apr 2014, 9:35 AM
#1969
catching_angels avatar

catching_angels

New Zenner

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

Re: ozpost shipping module

Hi ROBG

I am using the latest ZEN Cart Version and have had your Ozpost Module installed when i go to the product and enter the dimensions and weights that's fine then go to and preview update i went back in to the product to find the measurements are blank i entered L 8.50 W 5.50 H 3.50 and when i returned they all read 0.00 could please give me some idea as to the cause please
Thanks John

9 Apr 2014, 9:59 AM
#1970
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Catching Angels:

I am using the latest ZEN Cart Version and have had your Ozpost Module installed when i go to the product and enter the dimensions and weights that's fine then go to and preview update i went back in to the product to find the measurements are blank i entered L 8.50 W 5.50 H 3.50 and when i returned they all read 0.00 could please give me some idea as to the cause please
Thanks John

This sounds like the file /youradmin/includes/modules/update_product.php either didn't get modified during the install/update, or perhaps it was modified or replaced by another add-on that you've installed?

The 1st thing to do is navigate you way to the shipping module settings, click the button to uninstall ozpost, then click again to re-install. Most (if not all) of your current settings will be retained during this process.

The ozpost installation code will attempt to (re)modify the files it needs to function and all should be good. It will generate warnings about any files can't be updated (which would typically be caused if the file or folder permissions are too restrictive).

Please let me know if you still have the problem after doing this because if it is caused from changes made to the file(s) by another module it may require a manual approach to merge the changes. We'll cross that bridge if we come to it.

Cheers
RodG

9 Apr 2014, 10:18 AM
#1971
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

robbie269:

The Check would be that Free Postage has been activated.

I'm afraid I can't offer much advice here. It isn't something I've needed to do before. I have no idea how easy/hard it is for one shipping module to determine what another shipping module is doing.

robbie269:

The formula would be Express Postage minus Standard Postage but I am not sure what terms I need to use.

This should be quite easy. The ozpost servers return quotes in the order lowest to highest, which means it will be possible to save the Standard postage cost into a variable and then subtract this value from the Express postage cost for the adjustment.

IOW, the second part of the calculation will read something like
$quote->cost = ( $quote->cost - $STDcostVariable. ) ;

robbie269:

Total novice at PHP

I wish I could help more, but at the moment I'm flat out updating the client modules for the other shopping carts that ozpost supports so my mindset is in a completely different place.

It's quite possible that someone like Ajeh (who has more experience with the other shipping modules than I) could provide advice as to the easiest way for ozpost to detect if the Free Postage is applicable or not.

Cheers
RodG

9 Apr 2014, 10:13 PM
#1972
catching_angels avatar

catching_angels

New Zenner

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

Re: ozpost shipping module

Hi Rodg
Thank you for your reply
I did as you suggested uninstalled and reinstalled and i still have the same problem it will not hold the dimensions
thanks john

10 Apr 2014, 8:02 AM
#1973
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Catching Angels:

Hi Rodg
Thank you for your reply
I did as you suggested uninstalled and reinstalled and i still have the same problem it will not hold the dimensions
thanks john

Question time. :)

  1. Please confirm that the uninstall/reinstall that you did was via the store configuration and NOT by removing/replacing the ozpost files.
  2. What versions of ZenCart and Ozpost are you using?
  3. With the ozpost module installed does the file /YOURADMIN/includes/modules/update_product.php_ozpRestore exist?
  4. If this file DOES exist, is it the same size, larger, or smaller than /YOURADMIN/includes/modules/update_product.php?
  5. With the ozpost module uninstalled (via admin) does the date/timestamp of /YOURADMIN/includes/modules/update_product.php match the date/timestamp of most (if not all) of the other files in the folder?

This info should be enough to allow me to determine the best way for you to proceed.

Cheers
RodG

10 Apr 2014, 10:01 PM
#1974
catching_angels avatar

catching_angels

New Zenner

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

Re: ozpost shipping module

HI Rodg

Thanks for the reply

the uninstall/install was done via the store configuration
I am using Zen cart Ver 1.5.1 and your ver 3.5.5
and the file /YOURADMIN/includes/modules/update_product.php_ozpRestore this file does not exist

regards John

12 Apr 2014, 9:21 AM
#1975
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Catching Angels:

the uninstall/install was done via the store configuration

Are there any error messages or warnings shown during the install?

Catching Angels:

the file /YOURADMIN/includes/modules/update_product.php_ozpRestore this file does not exist

This has me somewhat puzzled. There are only a couple of reasons why this file won't exist (most notably file or folder permissions), and I think I've tried just about everything I can think of to force the non-creation of this backup file, and with everything I've tried, the ozpost installer has always (correctly) reported that there is an issue and that it can't proceed with the installation until the issue has been rectified.

Apparently you aren't getting these warnings.

I think you'll need to humour me a little more to figure this one out.

With the ozpost module installed, do these files exist..
/YOURADMIN/includes/modules/product/collect_info.php_ozpRestore
/YOURADMIN/includes/languages/english.php_ozpRestore

Does the FOLDER /cache/ozpost/ exist?

Also:
Does the file
/YOURADMIN/includes/modules/update_product.php have the same date/timestamp as most of the other files in this folder?

If this file has a different date/timestamp than the other files, please replace it with a copy of the original file that came with your zencart distribution files and try the ozpost installation again.

I'm really quite at a loss with this one at the moment. I pretty confident I know why your dimensions aren't being updated/retained, but rather than provide you with replacement files, or instructions as to the changes needed to the original files, it is in both our interests to figure out the cause of the issue so as to prevent a similar issue with future updates.

Cheers
RodG

14 Apr 2014, 2:29 PM
#1976
wakeleymb avatar

wakeleymb

New Zenner

Join Date:
Sep 2011
Location:
Sydney, Australia
Posts:
48
Plugin Contributions:
0

Re: ozpost shipping module

Im suffering from the same issues too. Will look into it with what you have said Rod.

14 Apr 2014, 2:35 PM
#1977
wakeleymb avatar

wakeleymb

New Zenner

Join Date:
Sep 2011
Location:
Sydney, Australia
Posts:
48
Plugin Contributions:
0

Re: ozpost shipping module

Okay, the first thing I've noticed is that the collect_info.php is slightly larger than the collect_info.pho_ozpRestore.

Cache OzPost does not exist.

English.php_ozpRestore exists

14 Apr 2014, 2:50 PM
#1978
wakeleymb avatar

wakeleymb

New Zenner

Join Date:
Sep 2011
Location:
Sydney, Australia
Posts:
48
Plugin Contributions:
0

Re: ozpost shipping module

Also the update_product.php has a new time and datestamp.

The update_product.php_ozpRestore exists.

I've tried renaming the restore files, uninstalling and reinstalling but it doesn't work.

14 Apr 2014, 3:53 PM
#1979
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

wakeleymb:

Okay, the first thing I've noticed is that the collect_info.php is slightly larger than the collect_info.pho_ozpRestore.

This implies that the file has the additional code needed for ozpost to function.

Would I be wrong in assuming pre-existing dimensions are being correctly displayed if the product is edited?
When resaving this product, do the dimensions then revert to zero, or do the pre-exiting dimensions get retained.

The collect_info.php file is the one that reads the database for existing dimensions and displays them on the edit screen.
The update_product.php file is responsible for taking what is on the edit screen and writing them back to the database.

Depending on what is going on will determine which of these files is at fault.

wakeleymb:

Cache OzPost does not exist.

That's good (I think). This should only exist if the installation code detects that there was a problem copying the modified files to their intended locations.

wakeleymb:

English.php_ozpRestore exists

The mystery deepens, as it seems that in your case the installer has successfully created its backup files.
"Catching Angels" is apparently missing the update_product.php_ozpRestore file.

> wakeleymb:


I've tried renaming the restore files, uninstalling and reinstalling but it doesn't work.

Time to get your hands dirty. :)

Could you please check the update_product.php file (not the backup) and let me know if the following lines of code exist?

```
$tmp_value = zen_db_prepare_input($_POST['products_height']);
$products_height = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['products_width']);
$products_width = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['products_length']);
$products_length = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$dangerous_goods = (($_POST['dangerous_goods']) == 1) ? 1:0 ;



                        'products_weight' => $products_weight,
                         'products_height' => $products_height,
                         'products_width'  => $products_width,
                         'products_length' => $products_length,
                         'dangerous_goods' => $dangerous_goods,



And that the collect_info.php file contains 
```
             'products_weight' => '',
                       'products_height' => '',
                       'products_width'  => '',
                       'products_length' => '',
                       'dangerous_goods' => '',
```

If they don't, then the ozpost installer has failed to patch them for some reason. If this is the case, and you are feeling adventurous then adding these lines yourself will probably take care of the problem.   
The weight related lines won't need to be added as they are already a part of the files. I've included them above as a guide as to where these new lines should/need to be inserted.  

There are *other* lines in the collect_info.php files that may/will also need to be added, but they are a little messy to deal with, and from the sounds of things these aren't missing from your installation (If they were, the dimension fields wouldn't be showing up at all when editing a product). 

I would also be interested in knowing if the Dangerous Goods checkbox appears on your edit screen (just below the dimension fields) as this will tell me if these 'other lines' exist due to the previous install, or whether they've been added by the upgrade.  

Just as a FYI,  the code that does these updates is/was a little tricky, in that with some installs all four fields need to be added (length, width, height & Dangerous Goods), but with other installations only the Dangerous goods needed to be added because the dimensions exist from a previous install.  
 
If you find doing any of this troublesome, or if you would simply prefer to not go this route I will be more than happy to take a first hand look at it and rectify the problem for you.  If so, please go to 
<http://shop.vcsweb.com/index.php?main_page=product_info&cPath=43_47_45&products_id=219> and fill in the order details. Select Cheque or money order as your payment method, but DO NOT PAY. I consider this to be my problem to solve so it will be a freebie.   

This offer is also open to John@Catching Angels too.   I really need to get to the bottom of this ASAP.  
 
Cheers
RodG
15 Apr 2014, 4:07 AM
#1980
wakeleymb avatar

wakeleymb

New Zenner

Join Date:
Sep 2011
Location:
Sydney, Australia
Posts:
48
Plugin Contributions:
0

Re: ozpost shipping module

Hey rod,

I assumed that the files were being overwritten with the new code.

You are correct in saying I can view existing products with dimensions in them. I haven't tried to edit them in case hey get overwritten, but I guess if it was saving the data to the tables, we wouldn't be having this problem. :D

Dangerous goods field DOES exist.

I'm comfortable with the code, I understand it but cant program from scratch. So fire away and I will test for you. I will modify the file with what you have given me and provide a report shortly.