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

ozpost shipping module

Views: 403,097

Results 1,521 to 1,540 of 2,251
8 Apr 2011, 3:16 PM
#1521
mike_dean avatar

mike_dean

Totally Zenned

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

ozpost shipping module

Mike_Dean:

Thanks Rod,

This is what I ended up with, ??

Not sure if its what you intended, but it seems to be working and I end up with a description eg,

Registered Parcel (Bulk Service) or Registered Courier (Bulk Service)

I understand your point re Admin, and I may reconsider above, so thanks for the heads up..

Thanks,
Mike

Would help if I showed you what I edited it too !!

if ( $description == "Registered Parcel Service(x2)") { $quote->description = "Registered Parcel (Bulk Service)" ; $description = "Registered Parcel (Bulk Service)" ; }
if ( $description == "Registered Courier Service(x2)") { $quote->description = "Registered Courier (Bulk Service)" ; $description = "Registered Courier (Bulk Service)" ; }

9 Apr 2011, 5:57 AM
#1522
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Mike_Dean:

Would help if I showed you what I edited it too !!

if ( $description == "Registered Parcel Service(x2)") { $quote->description = "Registered Parcel (Bulk Service)" ; $description = "Registered Parcel (Bulk Service)" ; }
if ( $description == "Registered Courier Service(x2)") { $quote->description = "Registered Courier (Bulk Service)" ; $description = "Registered Courier (Bulk Service)" ; }

Line 659 currently/originally reads:

  if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) {  $description .= "(x".$shipping_num_boxes.")"; $quote->description = $quote->description." (x".$shipping_num_boxes.")" ;}
```Change like this: 

if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) {
$description .= "(Bulk Service)";
$quote->description = $quote->description." (Bulk Service)" ;
}


What this code is doing is first checking that the quote consists of multiple parcels, doing nothing if not, but *appending* the '(Bulk Service)" to the existing description(s) if the conditions match. 
The modified code is simpler than the original because it doesn't use any variables in the text strings (the variable being the $shipping_num_boxes.

The code that you used could never work in place of the original line because 
 

if ( $description == "Registered Parcel Service(x2)")


would never evaluate as TRUE since the "(x2)" hasn't been set at this point. 

I can see how you may have opted to add this code *after* the line I suggested be modified, and it would work, but only under the specific condition that the quote is/was for 2 parcels, no more, no less. 

In order to allow for a variable number of parcels using this method will require the code to read something like 

if ( $description == "Registered Parcel Service(x".$shipping_num_boxes.")")
etc, etc


This way the text to be matched is constantly kept updated with the same data that was used to create the original text string, in which case why not use and change where the text is/was created in the first place and avoid this additional check?  (Rhetorical question)
 
Cheers
Rod
9 Apr 2011, 10:11 PM
#1523
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

RodG:

Line 659 currently/originally reads:

if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" && $shipping_num_boxes > 1 ) { $description .= "(x".$shipping_num_boxes.")"; $quote->description = $quote->description." (x".$shipping_num_boxes.")" ;}

> 
> ```
  if ( MODULE_SHIPPING_OZPOST_CORE_WEIGHT == "Yes" &&  $shipping_num_boxes > 1 ) { 
 $description .=  "(Bulk Service)"; 
$quote->description =  $quote->description." (Bulk Service)" ;
}
```If you are lucky you should even be able to cut/paste this code snippet (I haven't tested it though).
> Cheers
> Rod

Thanks Rod,

Modded as per your suggestion and all good.

Will keep testing on my local site before putting live.

Thanks again,
Mike
12 Apr 2011, 11:19 AM
#1524
ch4is avatar

ch4is

New Zenner

Join Date:
Aug 2009
Posts:
31
Plugin Contributions:
0

Re: ozpost shipping module

Hi, after being unable to find a suitable module or modify one to suit I am prepared to give this module a go.

I am just wondering is the server which the module relies on for the quotes ect. located in Australia?

12 Apr 2011, 1:30 PM
#1525
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Ch4iS:

I am just wondering is the server which the module relies on for the quotes ect. located in Australia?

I know why you are asking, but your arguments are invalid.

The primary servers are both located in the USA. The backup server is located in Adelaide.

Rod

18 Apr 2011, 2:48 AM
#1526
gam avatar

gam

Zen Follower

Join Date:
Aug 2007
Posts:
116
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod

Getting 'flat rate' shipping in the last 30mins or so. Can you check please.

No changes on my end that I am aware of.

Cheers
Greig

18 Apr 2011, 3:01 AM
#1527
gam avatar

gam

Zen Follower

Join Date:
Aug 2007
Posts:
116
Plugin Contributions:
0

Re: ozpost shipping module

GAM:

Hi Rod

Getting 'flat rate' shipping in the last 30mins or so. Can you check please.

No changes on my end that I am aware of.

Cheers
Greig

Further to above... Getting the following messages in OzPost Admin:

cURL communication ERROR: couldn't connect to host
Unable to connect to Ozpost server

I haven't changed anything but not sure whether this could stem from my host side?

18 Apr 2011, 3:06 AM
#1528
tim_ware avatar

tim_ware

New Zenner

Join Date:
Dec 2007
Posts:
25
Plugin Contributions:
0

Re: ozpost shipping module

GAM:

Further to above... Getting the following messages in OzPost Admin:

cURL communication ERROR: couldn't connect to host
Unable to connect to Ozpost server

I haven't changed anything but not sure whether this could stem from my host side?

Same has just started happening to me.. :(

18 Apr 2011, 3:39 AM
#1529
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Tim Ware:

Same has just started happening to me.. :(

The main server has suddenly stopped responding (reasons unknown), and for reasons also to be determined the automatic switchover to the backup server didn't take place. :censored:

I've just manually switched to the tertiary backup server and things should start working any minute now :-)

Cheers
Rod

18 Apr 2011, 3:42 AM
#1530
gam avatar

gam

Zen Follower

Join Date:
Aug 2007
Posts:
116
Plugin Contributions:
0

Re: ozpost shipping module

GAM:

Further to above... Getting the following messages in OzPost Admin:

cURL communication ERROR: couldn't connect to host
Unable to connect to Ozpost server

I haven't changed anything but not sure whether this could stem from my host side?

Seems to be fixed now. Thanks Rod.

Cheers
Greig

18 Apr 2011, 11:37 AM
#1531
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod,

Quick question I am using the ozpost V2.0.6 however Australia Post rates have just gone up. Question is can I adjust rates in this module in a table somewhere? or am I stuck with the rates hard coded into this module?

Reason I ask is I didn't want to upgrade to new monthly fee version at the moment, spent enough on setting up shop at this point and I just want to get it online and running for a few month before looking at upgrading modules.

Look forward to reply, thanks Cheryl.

18 Apr 2011, 3:21 PM
#1532
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

cherylam1103:

Hi Rod,

Quick question I am using the ozpost V2.0.6 however Australia Post rates have just gone up. Question is can I adjust rates in this module in a table somewhere? or am I stuck with the rates hard coded into this module?

Neither. The rates are obtained from the ozpost.net servers, which means you never need to update them... thats my job.

Have you noticed a discrepency somewhere?

cherylam1103:

Reason I ask is I didn't want to upgrade to new monthly fee version

One (or both) of us is confused. If you are using any version of ozpost you will need to subscribe or it will cease to work after your 60 day trial.

Cheers
Rod

19 Apr 2011, 11:26 AM
#1533
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod,

First, thanks for quick reply. I re-checked some test products and rates look to be correct now with cost of postage being covered. Going to run store live for one month to see how much business I do before changing anthing as all looks to be running fine.

Thanks for assistance, regards Cheryl.:smile:

5 May 2011, 12:50 PM
#1534
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: ozpost shipping module

Hi Rod

  1. please correct me if I am wrong but in v2.2.2 your

admin\includes\modules\product\collect_info.php

does not incorporate the changes of 139h, notwithstanding the following bugfix issued for those running php 5.2.3 or less:

http://www.zen-cart.com/forum/showpost.php?p=953964&postcount=6.

  1. in includes\modules\shipping\ozpost.php, the following switch to localhost (around Line 81) still seems to require a live curl connection just to install the mod.

// $this->SERVER = 'ozpost.net';
$this->SERVER = 'localhost/zencart/' ; // local testing

Having got the error message, I pressed the back button and the mod allowed me to install, and it works but only with the default rates as well as the flat, weight and the other option - which is what I expected.

However, when I am come to go live, am I good to go by just reversing the switch, or will I also need to uninstall/reinstall the mod.

Cheers

5 May 2011, 1:17 PM
#1535
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

dw08gm:

Hi Rod

  1. please correct me if I am wrong but in v2.2.2 your

admin\includes\modules\product\collect_info.php
does not incorporate the changes of 139h,

No correction needed...V2.2.2 was coded long before the 1.3.9h changes.

dw08gm:

  1. in includes\modules\shipping\ozpost.php, the following switch to localhost (around Line 81) still seems to require a live curl connection just to install the mod.

// $this->SERVER = 'ozpost.net';
$this->SERVER = 'localhost/zencart/' ; // local testing

That 'switch' is what I use for development. It won't do you (or anyone else) any good whatsoever, and yes, the module does require a 'live curl connection' to install. This is/was intentional because it helps with diagnosis of problems... simply put, when it was possible to install without the cURL check people were forever reporting that that could only get the flat/static rates, and it used to take several messages to determine they were lacking this very basic requirement for cURL - Even though it is clearly mentioned in several places.

By adding this check as/when the module is installed has saved me many, many hours of asking "is your cURL working" before I can progress onto other possible problems that would cause the eaxct same symptoms.

dw08gm:

Having got the error message,

Err, exactly waht is THE error message? the ozpost module could produce dozens of them, each detailing a different problem.

I'm guessing you are referring to the one that says it couldn't connect to the server asnd asks if cURL is installed?

dw08gm:

I pressed the back button and the mod allowed me to install, and it works but only with the default rates as well as the flat, weight and the other option - which is what I expected.

Good :)

dw08gm:

However, when I am come to go live, am I good to go by just reversing the switch, or will I also need to uninstall/reinstall the mod.

As I said above, that 'switch' is really only useful for me, but to answer the question I think I need to ask what you mean by 'go live'. For some people this is just a mattter of taking the store out of maintainance mode, but for others they are talking about copying the files, etc from their local host over to a live server.

If the former, then yes, setting the server back where it was should be all you need to do, but if you are talking about migrating the files to a live server you will need to keep in mind that you'll also need to migrate the database too, otherwise you will need to uninstall/reinstall the mod as it is this action that updates the database records.

Cheers
Rod

5 May 2011, 2:33 PM
#1536
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: ozpost shipping module

RodG:

No correction needed...V2.2.2 was coded long before the 1.3.9h changes.

I have had no trouble merging any of the files to 139h.

IIRC there is also a missing closing </td> in there somewhere.

That 'switch' is what I use for development. It won't do you (or anyone else) any good whatsoever, and yes, the module does require a 'live curl connection' to install. This is/was intentional because it helps with diagnosis of problems... simply put, when it was possible to install without the cURL check people were forever reporting that that could only get the flat/static rates, and it used to take several messages to determine they were lacking this very basic requirement for cURL - Even though it is clearly mentioned in several places.

By adding this check as/when the module is installed has saved me many, many hours of asking "is your cURL working" before I can progress onto other possible problems that would cause the eaxct same symptoms.

I was aware of the history of curl problems, even had one myself, but upon discovering the switch, I thought that it may have been put there for those wishing to work on localhost.

Err, exactly waht is THE error message? the ozpost module could produce dozens of them, each detailing a different problem.

I'm guessing you are referring to the one that says it couldn't connect to the server asnd asks if cURL is installed?

Yes, the "could not connect to server" message.

Good :)

As I said above, that 'switch' is really only useful for me, but to answer the question I think I need to ask what you mean by 'go live'. For some people this is just a mattter of taking the store out of maintainance mode, but for others they are talking about copying the files, etc from their local host over to a live server.

If the former, then yes, setting the server back where it was should be all you need to do, but if you are talking about migrating the files to a live server you will need to keep in mind that you'll also need to migrate the database too, otherwise you will need to uninstall/reinstall the mod as it is this action that updates the database records.

Cheers
Rod

I have both live and localhost test setups, where the former is currently running an early 2 version of ozpost and the latter now has the latest version. The upgrading of the shipping module has been left til last as I have had other issues to deal with. Eventually everything on localhost, including the database, will be transfered to the live setup. Then the fun will really begin.

Thanks for the clarity

8 May 2011, 7:43 AM
#1537
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: ozpost shipping module

RodG,

Now that Australia post has added a $9.00 fee for any item shipped to the USA do we need to do any adjustments as this is the only country that has this that I know of.

Our will you have an update to correct this because I can not see any option.

8 May 2011, 11:33 AM
#1538
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Bruce1952:

RodG,

Now that Australia post has added a $9.00 fee for any item shipped to the USA do we need to do any adjustments as this is the only country that has this that I know of.

Our will you have an update to correct this because I can not see any option.

This fee is automatically added when/where applicable. You don't need to set anything.

Cheers
Rod

9 May 2011, 12:42 AM
#1539
peter_homann avatar

peter_homann

Zen Follower

Join Date:
Jun 2006
Location:
Melbourne, VIC
Posts:
106
Plugin Contributions:
0

Re: ozpost shipping module

Hi Rod,

I'm finding that if I have debug turned on, I get the proper shipping quotes. It I turn debuf off, I only get the default flat rates.

I have just set up on a new server and I seem to recall this occurring before but cannot remember the solution?

Cheers,

Peter.

10 May 2011, 5:13 AM
#1540
rodg avatar

rodg

Deceased

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

Re: ozpost shipping module

Peter Homann:

Hi Rod,

I'm finding that if I have debug turned on, I get the proper shipping quotes. It I turn debuf off, I only get the default flat rates.

I have just set up on a new server and I seem to recall this occurring before but cannot remember the solution?

Cheers,

Peter.

remove/install?

Also check that you don't have any methods 'hidden'.

Cheers
Rod