Jump to content
stu2000

[CONTRIB] UK Royal Mail & Overseas Shipping Methods

Recommended Posts

James,

 

I have tried the updgrade/re-install again and found the same error, so ran a 'site wide' search for the class firstrec and can only find one instance of it in catalog/includes/modules/shipping/rmfistrec.php on line 32 - so I'm a little bit puzzled!

 

I think I may tackle this again in the morning when my brain is less tired! I'll report back with any findings..

 

Thanks for your help thus far,

I found the problem when I got back from my night trunk, the archive had the method file in the languages directory for some reason which caused the duplicate class definition error.

 

I have uploaded a new archive v2.1.0 uploaded 27 May 2009 which has the correct language file in place, and asked the osCommerce team to remove the faulty release.

 

Either download the top archive, or replace your existing language file with the one from v2.06, to solve your problem.

 

Sorry to cause you all the head scratching and confusion, it really shouldn't have happened. :blush:

 

Once you have the correct files in place then I hope you will enjoy the benefit of the 60 hours or so of development and testing that went into the creation of this new version.


LABBS Web Services

Share this post


Link to post
Share on other sites

Hi Chris,

 

Thanks for all you hard work and effort on this release, it's greatly appreciated! I'm back at my 'day job' now so will download and install your updated version this evening and report back.

 

Thank you for revisiting the problem last night, it's always good to know that you're not going mad! :-)

 

Once again, I shall report back once installed.

 

Kind regards,

James

Share this post


Link to post
Share on other sites

Hi Chris,

 

Back from the 'day job' now and gave the new install a go. Your fix has addressed the duplicate class definition error as stated yesterday - which is great - thank you!

 

I won't be using any international shipping methods in my store (as totally UK based), but thought I'd instate the option for international signed for to test. In doing so, there was an error returned within the admin control panel as stated below:

 

Warning: Division by zero in C:\Program Files\EasyPHP 3.0\www\xxxx\includes\modules\shipping\rmintsig.php on line 159

 

line 159 being:

 

if (($order->info['subtotal']/MODULE_SHIPPING_RMINTSIG_MAX_VALUE) > $insurance) {

 

I won't be using any international shipping methods, so the above is just an FYI and to report back for testing purposes (this may however just be my set up - if so, apologies in advance!).

 

Thanks again for the 'fix' to the initial problem and thanks for the contribution as a whole!!

 

Kind regards,

James

Share this post


Link to post
Share on other sites
Back from the 'day job' now and gave the new install a go. Your fix has addressed the duplicate class definition error as stated yesterday - which is great - thank you!

Thank you pointing out the error.

 

I won't be using any international shipping methods in my store (as totally UK based), but thought I'd instate the option for international signed for to test. In doing so, there was an error returned within the admin control panel as stated below:

 

Warning: Division by zero in C:\Program Files\EasyPHP 3.0\www\xxxx\includes\modules\shipping\rmintsig.php on line 159

 

line 159 being:

 

if (($order->info['subtotal'] / MODULE_SHIPPING_RMINTSIG_MAX_VALUE) > $insurance) {

I can see what you mean, line# 159 should be

if (($order->info['subtotal']/$my_shipping_num_boxes) > $insurance) {

I'll zip up the changes and post them to the contribution when I get the time.

Edited by labbs

LABBS Web Services

Share this post


Link to post
Share on other sites
I won't be using any international shipping methods in my store (as totally UK based), but thought I'd instate the option for international signed for to test. In doing so, there was an error returned within the admin control panel as stated below:

 

Warning: Division by zero in C:\Program Files\EasyPHP 3.0\www\xxxx\includes\modules\shipping\rmintsig.php on line 159

Thank you for pointing out the error.

 

A new archive has been uploaded as v2.1.0.1 to UK Royal Mail & Overseas Shipping Methods 21st Aug Prices which fixes the problem.


LABBS Web Services

Share this post


Link to post
Share on other sites
Thank you for pointing out the error.

 

A new archive has been uploaded as v2.1.0.1 to UK Royal Mail & Overseas Shipping Methods 21st Aug Prices which fixes the problem.

 

Hi Chris,

Thanks for the great contribution.

I've just uploaded v2.1.0.1 on top of the previous version - however - my airmail international signed for appears to be picking up & displaying the regular airmail prices.

 

Cheers

Jason

Share this post


Link to post
Share on other sites

Hi Jason,

Thanks for the great contribution.

I've just uploaded v2.1.0.1 on top of the previous version - however - my airmail international signed for appears to be picking up & displaying the regular airmail prices.

Doh!

 

The wrong constants were being used in the rmintsig file, they have now been renamed from the incorrect RMAIRMAIL to the correct RMINTSIG.

 

A new archive has been uploaded as v2.1.0.2 to UK Royal Mail & Overseas Shipping Methods 21st Aug Prices which fixes the problem.

 

Thank you for your feedback, without it this and other errors would have gone unnoticed.


LABBS Web Services

Share this post


Link to post
Share on other sites
Hi Jason,

 

Doh!

 

The wrong constants were being used in the rmintsig file, they have now been renamed from the incorrect RMAIRMAIL to the correct RMINTSIG.

 

A new archive has been uploaded as v2.1.0.2 to UK Royal Mail & Overseas Shipping Methods 21st Aug Prices which fixes the problem.

 

Thank you for your feedback, without it this and other errors would have gone unnoticed.

 

Thanks Chris - that's fixed the issue - the contrib works a treat now.

Cheers

Jason

Share this post


Link to post
Share on other sites

I have installed the following:

 

Royal Mail 1st Class Standard v2.1.0

Royal Mail 1st Class Recorded v2.1.0

Royal Mail 2nd Class Standard v2.1.0

Royal Mail 2nd Class Recorded v2.1.0

Royal Mail Special Delivery v2.1.0

Royal Mail Standard Parcels v2.1.0

 

I followed the instructions and changed the part in catalog/checkout_shipping.php

 

I then went into admin/modules/shipping and removed all the weight limits

 

However when I did a test run it showed the postage as zero and I am now at my witts end as it took me several days to figure out that you had to go into admin/modules/shipping to remove the weight limit, I spent three days looking at the php files because I thought that was where you removed the weight limit. I even sent a couple of emails asking where the weight code was (didn't get a reply) Eventually I stumpled across them in the admin/modules/shipping.

 

So I finally felt great until I did the test purchase and found that even though you could choose a shippping method there was no postage cost listed.

 

Can someone please switch the light on for me and explain where I am going wrong.

 

Thanks Sue

Share this post


Link to post
Share on other sites
I even sent a couple of emails asking where the weight code was (didn't get a reply)

 

 

Well at least I know why I didn't get a reply to my emails... my email address was no longer valid and I had forgotten to update it... :blush:

 

I'd claim a blonde moment only I'm not blonde :blink:

Share this post


Link to post
Share on other sites

I uninstalled the contribution and reinstalled it to make sure it was complete, however if I place an order for £13.98 below is what I get:

 

 

Please select the preferred shipping method to use on this order. Please Select

 

 

Royal Mail 1st Class Standard Royal Mail 1st Class Standard v2.1.0

Delivery Weight : 0 package of Kg's (Ships normally within 1 to 3 days) £0.00

 

 

Royal Mail 1st Class Recorded Royal Mail 1st Class Recorded v2.1.0

Delivery Weight : 0 package of Kg's (Insured upto £39, ships normally within 1 to 3 days) £0.00

 

 

Royal Mail 2nd Class Standard Royal Mail 2nd Class Standard v2.1.0

Delivery Weight : 0 package of Kg's (Ships normally within 3 to 5 days) £0.00

 

 

Royal Mail 2nd Class Recorded Royal Mail 2nd Class Recorded v2.1.0

Delivery Weight : 0 package of Kg's (Insured upto £39, ships normally within 3 to 5 days) £0.00

 

 

Royal Mail Special Delivery Royal Mail Special Delivery v2.1.0

Delivery Weight : 0 package of Kg's (Insured upto £500, ships normally Nextday) £0.00

 

 

Royal Mail Standard Parcels Royal Mail Standard Parcels v2.1.0

Delivery Weight : 0 package of Kg's (Insured upto £39, ships normally within 3 to 5 days) £0.00

Share this post


Link to post
Share on other sites

Never mind I finally figured out the problem was one of my own making....

 

What I had done was when I went to edit the tare rating and Larger packages - percentage increase I also some how removed the value in Enter the Maximum Package Weight you will ship.

 

Having put the value back in everything appears to work just fine.

Share this post


Link to post
Share on other sites

Hi All,

 

This is a really great contribution and I first wanted to say a huge thanks for making it.

 

I have this morning noticed a problem though - I have a customer from South Africa wanting to buy an item weighing 5.3kg. For some reason it's not quoting the right price ( ie £10) for any of the international services I'm offering its as if its not recognising the country (if I tell it netherlands for example its ok at £40-60 but for South Africa it should be quoting £70-£120)

 

I checked for example the international signed for and the zone ZA isn't listed in the zone 1 so I presume in falls into the zone to ' All others' - do all other the zones need to be listed or is 'All others' sufficient ??

 

Any ideas please??

Edited by Sapphire09

Share this post


Link to post
Share on other sites
This is a really great contribution and I first wanted to say a huge thanks for making it.
You are welcome, v2.x grew out of v1.2 by Stewart Newton and user requests.

 

I have this morning noticed a problem though - I have a customer from South Africa wanting to buy an item weighing 5.3kg. For some reason it's not quoting the right price ( ie £10) for any of the international services I'm offering its as if its not recognising the country (if I tell it netherlands for example its ok at £40-60 but for South Africa it should be quoting £70-£120)

 

I checked for example the international signed for and the zone ZA isn't listed in the zone 1 so I presume in falls into the zone to ' All others' - do all other the zones need to be listed or is 'All others' sufficient ??

 

Any ideas please??

You are right in your assumption that South Africa will fall into the All Others category.

 

The rmairmail and rmintsig methods determine the shipping zone as follows:

 

1. Check against Invalid Zones list (we don't ship there!)

 

2. Check against Zone 1 list (i.e. Europe)

 

3. If neither of the above then Zone MUST be in 'All Others'

 

Both these methods in their default install also have a weight limit of 2kg, so they just won't show for an order of 5.3kg. If you use split shipment by methods maximum weight, then you get 3 packages of 1.81 Kg's.

 

I have had a look at the methods and they are working out the right price, but I have found a bug in the text displayed which I have corrected. There is a new archive available as v2.1.0.3 from UK Royal Mail & Overseas Shipping Methods 21st Aug Prices which provides a fix.


LABBS Web Services

Share this post


Link to post
Share on other sites
You are welcome, v2.x grew out of v1.2 by Stewart Newton and user requests.

 

You are right in your assumption that South Africa will fall into the All Others category.

 

The rmairmail and rmintsig methods determine the shipping zone as follows:

 

1. Check against Invalid Zones list (we don't ship there!)

 

2. Check against Zone 1 list (i.e. Europe)

 

3. If neither of the above then Zone MUST be in 'All Others'

 

Both these methods in their default install also have a weight limit of 2kg, so they just won't show for an order of 5.3kg. If you use split shipment by methods maximum weight, then you get 3 packages of 1.81 Kg's.

 

I have had a look at the methods and they are working out the right price, but I have found a bug in the text displayed which I have corrected. There is a new archive available as v2.1.0.3 from UK Royal Mail & Overseas Shipping Methods 21st Aug Prices which provides a fix.

 

Thanks for the reply and the help.

 

I'm still running version 2.0.6 - Can I just download 2.1.0.3 or do I need the patch from 2.0.3 to 2.1???

Share this post


Link to post
Share on other sites
Thanks for the reply and the help.

 

I'm still running version 2.0.6 - Can I just download 2.1.0.3 or do I need the patch from 2.0.3 to 2.1???

Just download the new version and overwrite the existing files.


LABBS Web Services

Share this post


Link to post
Share on other sites
Just download the new version and overwrite the existing files.

 

ok - I tried it with two - 1st class standard and int signed for and both give me and error with the version number and the admin panal has extra boxes but no info to say what the boxes mean???

I've put screenshot up so you can see what I mean?

screenshotpostage.jpg

 

Am I the only one with this problem??? Have I done something wrong?

Share this post


Link to post
Share on other sites
ok - I tried it with two - 1st class standard and int signed for and both give me and error with the version number and the admin panal has extra boxes but no info to say what the boxes mean???

I've put screenshot up so you can see what I mean?

screenshotpostage.jpg

 

Am I the only one with this problem??? Have I done something wrong?

Try doing 'remove' and 'install' this will ensure that all the config variables are initialised in osCommerce.


LABBS Web Services

Share this post


Link to post
Share on other sites
Try doing 'remove' and 'install' this will ensure that all the config variables are initialised in osCommerce.

 

 

Excellent - yep thats works wahoo!!!

 

Ok next question please - I made some extra ones of my own from the last version (hope thats ok?) - ie RM airsure and surface mail - is there an easy way to update these files without redoing all over again please??

ie is there a find 'this' and replace with 'that' sheet you have done maybe???

Share this post


Link to post
Share on other sites
Excellent - yep thats works wahoo!!!

Glad to hear it was that simple. I'ts always something worth considering when there is a major version change.

 

 

Ok next question please - I made some extra ones of my own from the last version (hope thats ok?) - ie RM airsure and surface mail - is there an easy way to update these files without redoing all over again please??

ie is there a find 'this' and replace with 'that' sheet you have done maybe???

You could use the rmintsig method as a template for international insured shipping, and rmairmail as a template for uninsured international shipping.

 

Basically you'll want to search and replace 'rmintsig' and 'RMINTSIG' with your method name (case is important), the method name also has to be the same as the file name. You'll need to do this for both the method file and the language file.

 

Both rmintsig and rmairmail use only 2 zones, 1 for Europe and 1 for the rest of the world, but it is possible to create more zones if your method requires it. You'll need to change $this->num_zones = 2; in the class definition, to the number of zones you need, as well as adding an extra if block in function install for the zone information.

 

When you get something up and running for these additional methods please upload them to the contribution at UK Royal Mail & Overseas Shipping Methods 21st Aug Prices.

 

When you get something working I'll adopt it into the full archive, and work out how to update the prices spreadsheet too...

Edited by labbs

LABBS Web Services

Share this post


Link to post
Share on other sites

Hi Chris,

 

I'm using your module, however for any total order weights above 1.5KG, both the AirMail and Surface mail return "The shipping rate cannot be determined at this time". But for anything under that weight, it calculates the price. In the admin settings for the two shipping modules I've set the maximum weight to 100. And for the general store maximum weight is a high amount as well.

 

So what do you think would be cause of it not calculating the shipping for weights above that amount?

 

Thanks mate.

Share this post


Link to post
Share on other sites
I'm using your module, however for any total order weights above 1.5KG, both the AirMail and Surface mail return "The shipping rate cannot be determined at this time". But for anything under that weight, it calculates the price. In the admin settings for the two shipping modules I've set the maximum weight to 100. And for the general store maximum weight is a high amount as well.

 

So what do you think would be cause of it not calculating the shipping for weights above that amount?

Royal Mail generally don't ship small packets larger than 2kg by Airsure or Surface.

 

You should set the maximum weight in the methods to 2, and if necessary split shipments on Method Maximum Weight. Each Zone has a cost table as weight:price pairs, and if you set a maximum weight for the method higher than the largest weight in the costs table then you will have situations where a cost can not be found and the error message will be displayed.

 

I have tested the methods with a test product weighing 1.6 and the cost is calculated correctly, so I can't replicate your error with a weight above 1.5...


LABBS Web Services

Share this post


Link to post
Share on other sites

UK Royal Mail & Overseas Shipping Methods

 

Version 2.2.0 - 15 June 2009

 

Created by Chris Lander from an original contribution

by Stuart Newton (http://addons.oscommerce.com/info/4473).

 

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation; either version 2 of the License, or

(at your option) any later version.

 

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

 

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

 

 

=======================================================================

 

INFORMATION:

 

This contribution is for UK Stores ONLY. What it will do is add several

shipping zones to your osCommerce store. If your customer is UK based, it will

not show any of the International Shipping Options, and vice versa, if your

customer is International it will not show any UK based shipping methods.

 

Shipping Methods Added:

 

(1) Royal Mail First Class Standard Post

(2) Royal Mail First Class Recorded Post

(3) Royal Mail Second Class Standard Post

(4) Royal Mail Second Class Recorded Post

(5) Royal Mail Standard Parcels

(6) Royal Mail Airmail

(7) Royal Mail International Signed for

(8) Royal Mail Airsure

(9) Royal Mail Surface

(10) Parcelforce 48

(11) Citylink Next Day

 

 

All the Royal Mail methods along with the Parcelforce 48 method allow you to:-

Set minimum and maximum delivery weights.

Set minimum and maximum delivery values.

Split shipments based on maximum delivery weight, maximum delivery value, or both, in combination with the built in osCommerce shipment splitting.

Shipping methods wich have insurance options now allow you to set different charges for different compensation levels.

 

=======================================================================

 

CHANGELOG:

 

+ Added RM Airsure method

+ Added RM Surface method

* Corrected logic in rmairsure so that zones are identified correctly.


LABBS Web Services

Share this post


Link to post
Share on other sites
Royal Mail generally don't ship small packets larger than 2kg by Airsure or Surface.

 

You should set the maximum weight in the methods to 2, and if necessary split shipments on Method Maximum Weight. Each Zone has a cost table as weight:price pairs, and if you set a maximum weight for the method higher than the largest weight in the costs table then you will have situations where a cost can not be found and the error message will be displayed.

 

I have tested the methods with a test product weighing 1.6 and the cost is calculated correctly, so I can't replicate your error with a weight above 1.5...

 

Ok thanks, that solved the problem. Don't you people in the UK ship packages above 2kg? :P

Share this post


Link to post
Share on other sites

Hi All

 

I am abit stuck and I have been searching this forum for an answer for days. I have installed the Royal Mail module for my online shop but the problem I have is that when I select an address outside of the UK at check_out the Royal Mail Airmail and Royal Mail International Signed For methods kick in but with the error The shipping rate cannot be determined at this time and shows that customer has to pay nothing £0.00. What I have done is install the Royal mail module v 2.0 and updated it using the bug fixes from the contribution 4473 up to v 2.2.0. I am not sure were I am missing it. Also my admin page does not show the version numbers of the methods except for the Royal Mail Airsure v2.2.0, which I think must be the case for all methods. All other methods show question marks were version number is supposed to show e.g Royal Mail Standard Parcels v?.?

 

Please can you help me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×