Page 1 of 1

Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Fri Jan 27, 2017 12:35 am
by neil
Hi any thanks in advance.

We are using Opencart V2.3.0.2 and we are having trouble with the Royal Mail Extension, it works fine for Uk, Eu and as far as I am aware the only trouble is when customers try to place an order from Jersey, Guernsey or Ireland

The problem is when any of the 3 countries are selected the royal mail delivery options disappear all that is left is Parcelforce.

I gather this is controlled by catalog/model/shipping/royal_mail.php do I need to add some code somewhere?

Our store is http://www.angliaclipperservices.com

Regards

Neil

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Mon Jan 30, 2017 11:01 pm
by neil
Ok so V2.3.0.2 doesnt have- catalog/model/shipping/royal_mail.php

So anyone know what I should be looking for the only files I can see which relate to the Royal Mail setup are


/public_html/admin/controller/extension/shipping/royal_mail.php

/public_html/admin/view/template/shipping/royal_mail.tpl

/public_html/admin/view/template/extension/shipping/royal_mail.tpl

/public_html/admin/language/en-gb/extension/shipping/royal_mail.php

/public_html/catalog/model/extension/shipping/royal_mail.php

/public_html/catalog/language/en-gb/extension/shipping/royal_mail.php

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Tue Jan 31, 2017 1:53 am
by uksitebuilder
/public_html/catalog/model/extension/shipping/royal_mail.php

everything was moved into the extension folder in 2302 for some reason

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Thu Feb 02, 2017 11:09 pm
by neil
Super I have added the countries to the list and can get them to show up for International Standard and International Tracked, but how can I get them to have the option for normal Royal mail 1st class?

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Tue Feb 07, 2017 11:59 pm
by neil
Is there any way to add the channel Island Countries to the First Class Royal Mail? Specifically the ones mentioned

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Wed Feb 08, 2017 12:44 am
by uksitebuilder
You can try the following in catalog/model/extension/shippping/royal_mail.php

Find the following in the relevant section - The code is commented nicely, so you can see what service it relates to

Code: Select all

&& $address['iso_code_2'] == 'GB'
Change to

Code: Select all

&& ($address['iso_code_2'] == 'GB' || $address['iso_code_2'] == 'GG' || $address['iso_code_2'] == 'IE' || $address['iso_code_2'] == 'IM' || $address['iso_code_2'] == 'JE')

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Wed Feb 08, 2017 4:06 pm
by neil
Works perfectly thanks uksitebuilder just had to take the fist '(' out of the new code by the way your extensions work perfectly as well.

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Wed Feb 08, 2017 4:28 pm
by uksitebuilder
Could you just post the entier code block for that if statement you have so I can check as that bracket was required

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Thu Feb 09, 2017 4:01 pm
by neil

Code: Select all

// 1st Class Signed
			if ($this->config->get('royal_mail_1st_class_signed_status') && $address['iso_code_2'] == 'GB' || $address['iso_code_2'] == 'GG' || $address['iso_code_2'] == 'IE' || $address['iso_code_2'] == 'IM' || $address['iso_code_2'] == 'JE') {


Works fine with no error codes, but with the extra bracket it just creates an error.

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Thu Feb 09, 2017 4:10 pm
by uksitebuilder
Here you go - Notice the double bracket at the end

This now checks that

(a) RM 1st Class is enabled
and (b) if the country chosen matches any of those listed

Without the bracket it is possible that the module would show up even if it were disabled at a later date

Code: Select all

// 1st Class Signed
			if ($this->config->get('royal_mail_1st_class_signed_status') && ($address['iso_code_2'] == 'GB' || $address['iso_code_2'] == 'GG' || $address['iso_code_2'] == 'IE' || $address['iso_code_2'] == 'IM' || $address['iso_code_2'] == 'JE')) {

Re: Royal Mail Extension- Jersey, Guernsey, Ireland

Posted: Thu Feb 09, 2017 10:47 pm
by neil
Super thank's