We have a site built in 1.5.1.3 at www.spraygunshop.co.uk . Shipping methods include the standard Royal Mail module. An order placed with a UK address is provided with a range of shipping options including (incorrectly) International Signed For.
Is this a known bug and if so, has there been a fix for it ?
Is this a known bug and if so, has there been a fix for it ?
Airmail, International Signed for v.1.5.1.3 only (Didn't see that "International Signed" has the correct code entered in v1.5.2.1 but not for the others), Airsure and Surface still show if the customer is from the UK even in the latest version of Opencart. A work around is as follows:
View the following depending on which version of the two versions of Opencart you have:
For v1.5.1.3 go to:
http://www.mcasoft.talktalk.net/upload/ ... .5.1.3.txt
For v1.5.2.1 go to:
http://www.mcasoft.talktalk.net/upload/ ... .5.2.1.txt
Select all of the text, copy and paste into "Notepad" and save as royal_mail.txt on your harddrive.
Rename the file to:
royal_mail.php
Back up your existing file from the server located at:
catalog/model/shipping/royal_mail.php
and replace the file on the server with the one you created above!
Replace with your backed up copy of royal_mail.php if you want to return to the original.
View the following depending on which version of the two versions of Opencart you have:
For v1.5.1.3 go to:
http://www.mcasoft.talktalk.net/upload/ ... .5.1.3.txt
For v1.5.2.1 go to:
http://www.mcasoft.talktalk.net/upload/ ... .5.2.1.txt
Select all of the text, copy and paste into "Notepad" and save as royal_mail.txt on your harddrive.
Rename the file to:
royal_mail.php
Back up your existing file from the server located at:
catalog/model/shipping/royal_mail.php
and replace the file on the server with the one you created above!
Replace with your backed up copy of royal_mail.php if you want to return to the original.
Last edited by mcamca on Sat Apr 07, 2012 6:24 pm, edited 1 time in total.
you have added UK for international_signed.
if ($this->config->get('royal_mail_international_signed_status') && $address['iso_code_2'] != 'GB') {
$cost = 0;
$insurance = 0;
$countries = explode(',', 'AL,AD,AM,AT,AZ,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GI,GR,GL,HU,IS,IE,IT,KZ,KG,LV,LI,LT,LU,MK,MT,MD,MC,NL,NO,PL,PT,RO,RU,SM,SK,SI,ES,SE,CH,TJ,TR,TM,UA,UZ,VA');
if (in_array($address['iso_code_2'], $countries)) {
$rates = explode(',', $this->config->get('royal_mail_international_signed_rate_1'));
} else {
$rates = explode(',', $this->config->get('royal_mail_international_signed_rate_2'));
}
$countries = explode(',', 'GB');
if (in_array($address['iso_code_2'], $countries)) {
$rates = explode(',', '2');
}
if ($this->config->get('royal_mail_international_signed_status') && $address['iso_code_2'] != 'GB') {
$cost = 0;
$insurance = 0;
$countries = explode(',', 'AL,AD,AM,AT,AZ,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GI,GR,GL,HU,IS,IE,IT,KZ,KG,LV,LI,LT,LU,MK,MT,MD,MC,NL,NO,PL,PT,RO,RU,SM,SK,SI,ES,SE,CH,TJ,TR,TM,UA,UZ,VA');
if (in_array($address['iso_code_2'], $countries)) {
$rates = explode(',', $this->config->get('royal_mail_international_signed_rate_1'));
} else {
$rates = explode(',', $this->config->get('royal_mail_international_signed_rate_2'));
}
$countries = explode(',', 'GB');
if (in_array($address['iso_code_2'], $countries)) {
$rates = explode(',', '2');
}
OpenCart®
Project Owner & Developer.
Sorry but the code entered in my text files basically says that if the country is GB then the rates do not exist!Daniel wrote:this pecie of code should stop it showing:
$this->config->get('royal_mail_international_signed_status') && $address['iso_code_2'] != 'GB'
This stops Airmail, International Signed, Airsure and Surface showing for buyers/addresses in the UK.
I suggest you try it!
I've been using this code to remove the above Royal Mail International Services from the shipping options for UK customers for 18 months now and I assure you it works!
The following are text files to Daniel's suggestion (which is neater and was in v.1.5.2 for "International Signed" but for some reason was left out of "Airmail" and "Surface").Daniel wrote:this pecie of code should stop it showing:
$this->config->get('royal_mail_international_signed_status') && $address['iso_code_2'] != 'GB'
I have also added a correction in "Surface" which probably stopped "Surface" from showing at all:
//NEXT LINE APPEARS TO BE INCORRECT SO CHANGED TO NEXT LINE!
//$quote_data['airsure'] = array(
$quote_data['surface'] = array(
I have added Daniel's suggestion to "Airsure" just in case someone adds an "else" clause to its rates in the future:
http://www.mcasoft.talktalk.net/upload/ ... 1.3_V2.txt
http://www.mcasoft.talktalk.net/upload/ ... 2.1_V2.txt
Proceed with these as in my first post above!
PS. Have'nt checked these files for workability as I have no problem with my previously posted text files!
Note: Royal Mail Prices increase as from 30th April 2012.
View these at:
http://c435158.r58.cf3.rackcdn.com/Roya ... Prices.pdf
Airmail will then have 3 zone rates instead of 2:
Europe, Zone 2 (Papua New Guinea - PG, Australia - AU and New Zealand - NZ including their outlying islands) and Zone 1 (The Rest of the World)
royal_mail.php and other files will need changing to incorporate the 3rd zone including adding of new database fields!
Have'nt checked differences for their other 3 international Services yet - in the middle of doing it!
Who is online
Users browsing this forum: No registered users and 11 guests