Forums / Addon Shipping Modules / [Old] Royal Mail Modules

[Old] Royal Mail Modules

Locked

Views: 221,284

Results 81 to 100 of 936
This thread is locked. New replies are disabled.
2 Oct 2006, 2:25 PM
#81
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

[Old] Royal Mail Modules

Distance across UK is irrelevant to charge for delivery with the Royal Mail. It's only the size and weight that count.

That's true for 'Standard Parcels' (3 to 5 days). For other ParcelForce services (such as 9am, 10am, 12am, ParcelForce 24 and ParcelForce 48) the UK is split into 3 zones:

Zone 1: Most of mainland UK
Zone 2: Highlands and Islands of Scotland
Zone 3: Northern Ireland, Isle of Man and Isles of Scilly

(the Channel Islands are in Zone 4, and the Republic of Ireland in Zone 5, then the rest of the world in subsequent zones)

It might be rare to receive an order from a customer in Zone 2 or Zone 3 who wanted next day or 48 hour delivery, but if you did, you wouldn't want to pay the extra zone rate for the carriage yourself :smile:

What problems are you having installing? Your screenshot is a bit too small to read, but it looks like either your language files aren't being found or you haven't run the SQL.

2 Oct 2006, 3:11 PM
#82
faulkns avatar

faulkns

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

I haven't run any sql query, can you expand on that as I am very limited on sql stuff.

Agree on Special delivery that is relevant if you are going to use it, which many UK zenners might.

A mini & wargaming service to trust
War Paint

2 Oct 2006, 3:22 PM
#83
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Philip's mod includes an SQL insert (called: upgrade_1.2_to1.3.sql) which you will need to run to have the necessary parameters installed into the configuration table of your database.

Go into PHPMyAdmin on your server, select your database, click on the 'SQL tab, paste the contents of the SQL file in the box and click 'Go'.

2 Oct 2006, 3:27 PM
#84
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Pixxi:

Philip's mod includes an SQL insert (called: upgrade_1.2_to1.3.sql) which you will need to run to have the necessary parameters installed into the configuration table of your database.

Go into PHPMyAdmin on your server, select your database, click on the 'SQL tab, paste the contents of the SQL file in the box and click 'Go'.

NO NO, He should be okay, he was doing a fresh install so he should not need to updgrade. I agree that the screen shots are too small though. But what I'm wondering is whether its a window's/ Unix line ending thing since I'm only using Linux. Can you cut and paste the first few lines of text from the errors ?

Thank you

2 Oct 2006, 7:57 PM
#85
faulkns avatar

faulkns

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

bouncingltd:

NO NO, He should be okay, he was doing a fresh install so he should not need to updgrade. I agree that the screen shots are too small though. But what I'm wondering is whether its a window's/ Unix line ending thing since I'm only using Linux. Can you cut and paste the first few lines of text from the errors ?

Thank you

I am using on local Wamp server at the moment. here are the first bits of text (Yellow warning message fixed now)

Shipping Modules
code = 'rm1stlargeletter'; $this->title = MODULE_SHIPPING_RM1STLARGELETTER_TEXT_TITLE; $this->description = MODULE_SHIPPING_RM1STLARGELETTER_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_RM1STLARGELETTER_SORT_ORDER; $this->icon = (( defined('DIR_WS_ICONS') ? DIR_WS_ICONS : 'images/icons/' ) . 'shipping_ukrm.jpg'); $this->tax_class = MODULE_SHIPPING_RM1STLARGELETTER_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_RM1STLARGELETTER_STATUS == 'True') ? true : false); // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_zones = 1; // inspired by Jim Barrington (JollyJim) if( isset($order) && MODULE_SHIPPING_RM1STLARGELETTER_HIDE_SHIPPING_ERRORS == 'True' ){ switch(isset($order->info['subtotal'])){ case true: if( $order->info['subtotal'] < MODULE_SHIPPING_RM1STLARGELETTER_MIN_ORDERVALUE){ $this->enabled = false; return ; }else if(MODULE_SHIPPING_RM1STLARGELETTER_MAX_ORDERVALUE != -1 && $order->info['subtotal'] > MODULE_SHIPPING_RM1STLARGELETTER_MAX_ORDERVALUE){ $this->enabled = false; return ; } break; case false: if($order->info['total'] < MODULE_SHIPPING_RM1STLARGELETTER_MIN_ORDERVALUE){ $this->enabled = false; return ; }else if(MODULE_SHIPPING_RM1STLARGELETTER_MAX_ORDERVALUE != -1 && $order->info['total'] > MODULE_SHIPPING_RM1STLARGELETTER_MAX_ORDERVALUE){ $this->enabled = false; return ; } break; } // end of switch on subtotal // check that it is a valid country being shipped to. $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; for ($i=1; $i<=$this->num_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COUNTRIES_' . $i); $country_zones = preg_split("/,/", preg_replace('/\s*/','',$countries_table) ); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } // ship to country is invalid for this service if ($dest_zone == 0) { $this->enabled = false; return ; }else{ $this->enabled = false; // enabled set to true if valid shipping weight found $zones_cost = constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST0_' . $dest_zone) . ',' . constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST1_' . $dest_zone) . ',' . constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST2_' . $dest_zone) . ',' . constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST3_' . $dest_zone); $zones_table = preg_split("/[:,]/" , preg_replace('/\s*/','',$zones_cost) ); $size = sizeof($zones_table); for ($i=0; $i<$size; $i+=2) { if ($total_weight <= $zones_table[$i]) { $this->enabled = true; break; } } // end of looping through return ; } // end of valid country } // end of if hide invalid shipping methods is set } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes, $currency; $currencies = new currencies(); $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($i=1; $i<=$this->num_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COUNTRIES_' . $i); $country_zones = preg_split("/,/", preg_replace('/\s*/','',$countries_table) ); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } //12 FEB 04 MBeedell NO specified country (or ) then use this zone for all shipping rates if ($dest_zone == 0) { for ($i=1; $i<=$this->num_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COUNTRIES_' . $i); if ($countries_table == '' or $countries_table == '') { $dest_zone = $i; break; } } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; //12 FEB 04 MBeedell 'glue' together the rates from the 10 cost data entry boxes $zones_cost = constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST0_' . $dest_zone) . ',' . constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST1_' . $dest_zone) . ',' . constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST2_' . $dest_zone) . ',' . constant('MODULE_SHIPPING_RM1STLARGELETTER_ZONES_COST3_' . $dest_zone); $zones_table = preg_split("/[:,]/" , preg_replace('/\s*/', '', $zones_cost) ); $size = sizeof($zones_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $zones_table[$i]) { $shipping = $zones_table[$i+1]; //12 Feb 04 MBeedell - correctly format the total weight... if the weight exceeds the max // weight, then it is divided down over a number of separate packages - so the weight could end // up being a long fraction. $sw_text = number_format($shipping_weight, 3, $currencies->currencies[DEFAULT_CURRENCY]['decimal_point'], $currencies->currencies[DEFAULT_CURRENCY]['thousands_point']); $shipping_method = MODULE_SHIPPING_RM1STLARGELETTER_TEXT_WAY . ' ' . $dest_country . ' : ' . $sw_text . ' ' . MODULE_SHIPPING_RM1STLARGELETTER_TEXT_UNITS; $shipping_method = MODULE_SHIPPING_RM1STLARGELETTER_TEXT_WAY . ' :

If no luck I will load everything up to my remote server and see if it works

Stewart

A mini & wargaming service to trust
War Paint

2 Oct 2006, 8:31 PM
#86
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Okay now that is certainly my code, it's from

includes/languages/english/modules/shipping/rm1stlargeletter.php

what happens if you remove the file ? it is truly weird I don't actually know what a "wamp" is as I'm a linux/ php/ mysql person myself. could you private message me with your email, I'll try and provide you with a version with different line endings or charcater encoding, to see what happens.

Thank you for your patience

Philip.

7 Oct 2006, 6:39 PM
#87
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Hi Philip,

Just noticed a small duplication in the code of the modules:

$shipping_method = MODULE_SHIPPING_RM2NDLARGELETTER_TEXT_WAY . ' ' . $dest_country . ' : ' . $sw_text . ' ' . MODULE_SHIPPING_RM2NDLARGELETTER_TEXT_UNITS;
$shipping_method = MODULE_SHIPPING_RM2NDLARGELETTER_TEXT_WAY . ' : ' . $sw_text . ' ' . MODULE_SHIPPING_RM2NDLARGELETTER_TEXT_UNITS;

$shipping_method is being defined twice - first with the destination country, and secondly with the ... _text-way from the language file. Works even better if the second line is commented out :smile:

7 Oct 2006, 7:33 PM
#88
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Evening,

That probably came out of something or other that I was doing somewhere, the code in the modules isn't very clean, as something just weren't working at all. I'll have to check it through but one thing that did pop up was that there is a difference between the session information stored as a guest and as someone logged in so the $dest_country may very well disappear, on the other hand I could be talking rot.

I should have version 2.0-beta ready tomorrow with the UK zone systems as discussed in this thread, it's going to involve work for the installation as mentioned before, because of all of the various zones people will have installed over the years and the way mysql has handled sql patches. There's no easy way around this unfortunately, the installer will have to decide for example, if MZMT was ever installed on a 3.23 mysql server then "Belgium" may turn up as a county of England as the SQL used LAST_INSERT_ID() in onesql statement 48 times, in version 4, this is the insert id of the first sql statement processed, unfortunately in 3.23 it is the preceeding SQL argument, so Belgium gets inserted with a geographical_zone for Austria, but Austria hasn't been defined as it's one shipping zone, and so it pops up in the next shipping zone to be installed, which would be the UK.

Also if the zones available from the download sections here have been installed, then they are lacking some counties in Northern Ireland like "Antrim", someone may have noticed this on their own machine and then added it, but in that case they may have added "County Antrim". The maximum I have done is set up a set of Postal Zones (that can be expanded), Rates based on Parcel force (that can be changed), added Zones to correspond to these Postal Zones, and tried to place United Kingdom, Wales (if defined), Scotland (if defined), England (if Defined) and Northern Ireland (in the correct places).

Learning about what people could have installed, and the testing processes involved have taken more time than coding, but the documentation is taking the most time, since I've got to explain what to do in most scenarios, because it's not as simple as deleting the current zones, as that would probably cause havoc in existing customer's addresses, reports, shipping details etc....

I will report back when ready.

Thank you

Philip

7 Oct 2006, 7:48 PM
#89
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

... so the $dest_country may very well disappear ...

Doesn't seem to - logged in or not, it still appears :smile:

Will the version 2.0 beta be just the ParcelForce modules, or have you also updated/changed the Royal Mail ones?

Just checking before I go through all the Royal Mail ones to (finally) edit the titles/text. :wink2:

Great! - sounds like you've been working hard again Philip, well done and thanks :smile:

7 Oct 2006, 8:05 PM
#90
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Not sure if I've made any modifications to the individual modules before I started up, but you zip the things you change up and I'll do a diff, also don't forget to take credit for your work.

As for the "parcelforce modules", there is only 1, for parcel force 48, there are instructions for how to add more services/ different couriers based on the module.

Oh and there are more second class services that faulkns has been modifying/ adding

Who wants to do "standard parcels " then ?

Thanks

Philip.

7 Oct 2006, 8:31 PM
#91
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Not sure if I've made any modifications to the individual modules before I started up

Ok. No problem, I'll just do a diff then. :smile:

Who wants to do "standard parcels " then ?

Errm ... most UK customers? :smile:

Eg. Weight up to 2kg:

ParcelForce Standard £5.31
1st Class small packet £7.29
ParcelForce 48 (up to 10kg) £14.25

Ie. there isn't a band below 10kg for PF48, plus you can send up to 20kg on ParcelForce Standard for £12.46, compared to £22.25 on PF 48.

Maybe if you have a lot of business customers they might want to save the extra 2/3 days (and pay more) if the order is urgent, but I'm thinking most non-business UK customers would rather wait a bit longer and save themselves a few pounds (or shop somewhere else). And perhaps that does depend to some extent on what you're selling.

But in any case, those of us who want one could probably create a Standard PF module based on the PF48 (as you said), so no problem. :smile:

7 Oct 2006, 9:22 PM
#92
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

OH bother and damnation about the parcelforce, I might change it to the 24 rates or the standard rates or something, doesn't matter really as long as the basis for the rates are there, in fact I could probably come up with a cunning set of sql for whichever rates people choose, but I've honestly not been looking at the prices because I never use parcel force. I could have launched my own site a month ago. I think I may be doing this because it's more intellectually taxing than lens caps.

7 Oct 2006, 9:26 PM
#93
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Pixxi:

ParcelForce Standard for £12.46

Do you have a parcelforce standard tarriff ? because I was donated the spreadsheets for retail pricing and the cheapest showing up on there is parcelforce 48 ?

7 Oct 2006, 9:52 PM
#94
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Hi Philip,

PF's website is down for maintenance at present, so I can't give you the link, but these are the current rates from the August 2006 leaflet:

Weight:
Up to: - Cost:
1kg - £3.85
1.5kg - £4.95
2kg - £5.31
4kg - £7.70
6kg - £8.74
8kg - £9.97
10kg - £10.70
20kg - £12.46

Compensation:
Up to: - Cost:

£100 - £1
£250 - £2.25
£500 - £3.50

But please don't spend time on this if you have other things more pressing - from what you've said it should be simple for people to adapt the PF48 module.

It's just so useful to have the set of RM modules you've already completed in any case. :smile:

7 Oct 2006, 10:35 PM
#95
tonyrobbo avatar

tonyrobbo

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Hi, it seems there is some confusion about the Parcelforce rates, the rates that Pixxi quoted above are for Royal Mail standard parcels not Parcelforce!

These will not be delivered via Parcelforce so are not going to be affected by the Parcelforce zones.

I have an account with Parcelforce and the cheapest service is the 48 hour within the UK and i get a fixed rate for parcels upto 30kg

Hope this helps Philip

7 Oct 2006, 10:40 PM
#96
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

The I shall at some point create a standard parcels module, though I believe that standard parcels is not trackable ? My computer went beeep-biiiip-beeeip just now, odd that since I don't have any sound drivers installed. I shall be releasing version 2.0 beta very shortly hopefully before things start crashing. Maybe those security updates were important after all....

7 Oct 2006, 10:45 PM
#97
tonyrobbo avatar

tonyrobbo

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Yea thats correct Philip, Standard Parcels are not trackable and work just the same way as 1st & 2nd class.

7 Oct 2006, 10:55 PM
#98
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

... are for Royal Mail standard parcels not Parcelforce

Yes, you're absolutely right - my mistake for not noticing the difference. I'm obviously returning to the days when ParcelForce used to be part of Royal Mail :smile:

No, standard parcels is not trackable (no signature or tracking number).

It would still be a very useful module to have in the UK series though for people who only send bigger parcels occasionally and so don't have/need a ParcelForce account for the cheaper volumes/rates. Thinking about it, it would be pretty easy to adapt one of the other RM modules into a 'Standard Parcels' module since standard parcels doesn't use zones - I'll have a go at that tomorrow maybe.

7 Oct 2006, 11:53 PM
#99
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

It's available from here :

http://bouncing.org/big_royalmail_v2.0-beta.zip

I haven't updated anything from 1.5 including installation instructions but it should be vaild, e.g. copy big_royalmail_v2.0-beta/images/* to your images folder and the same with includes. The instructions are in the top level of big_royalmail_v2.0-beta for the module called ukzr, short for UK Zone Records, the rates are parcelforce 48, and the instructions are in pdf format. Sorry about that I know it's breaking with tradition but there are a lot of going into admin > tool > install sql patches and I need my italics.

Now here's a thing, faulkn submitted a rm2ndlargelettersf.php module for second class recorded, I am logged out of zen cart (v 1.3.5 on linux) as a shopper, at the moment and even though the module appears completely correct, I see a little orange status gif to the side of the sort order, and I have no idea why. Strange thing is, is that two weeks ago I fixed this on something else and I have no memory of it (medication again, sometimes things just go) it was a bugger of a thing to track down too.

Pixxi - by all means have a go at standard parcels, should be a case sensitive search and replace I think, so pick a module with not many weights and then redfine them. I personally think you are going to be spending a lot of time trying to work out how to get the 2.0 Beta working, but I will take anyone's recommendations as to bits missing from the instructions etc....

Thank you

Philip.

8 Oct 2006, 12:02 AM
#100
bouncingltd avatar

bouncingltd

Suspended

Join Date:
Aug 2006
Posts:
127
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Bug number 1

Warning: constant(): Couldn't find constant MODULE_SHIPPING_RM2NDLARGELETTER_ZONES_COST0_1 in /var/www/html/lenscaps/zen-cart-v1.3.5-full-fileset/includes/modules/shipping/rm2ndlargelettersf.php on line 105

if you get this, this has now been fixed for the next release, I won't but uploading it yet, BUT don't use 2nd Class Signed for as if 2nd Class is installed, it gives Second class prices, not the signed for ones, and if 2nd Class is uninstalled it throws the above error 4 times. Also I still have not tracked down the mysteriously yellow/ orange gif problem.