Post by neil » Fri Jan 27, 2017 12:35 am

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

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by neil » Mon Jan 30, 2017 11:01 pm

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

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by uksitebuilder » Tue Jan 31, 2017 1:53 am

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

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

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by neil » Thu Feb 02, 2017 11:09 pm

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?

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by neil » Tue Feb 07, 2017 11:59 pm

Is there any way to add the channel Island Countries to the First Class Royal Mail? Specifically the ones mentioned

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by uksitebuilder » Wed Feb 08, 2017 12:44 am

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')

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by neil » Wed Feb 08, 2017 4:06 pm

Works perfectly thanks uksitebuilder just had to take the fist '(' out of the new code by the way your extensions work perfectly as well.

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by uksitebuilder » Wed Feb 08, 2017 4:28 pm

Could you just post the entier code block for that if statement you have so I can check as that bracket was required

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by neil » Thu Feb 09, 2017 4:01 pm

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.

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by uksitebuilder » Thu Feb 09, 2017 4:10 pm

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')) {

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by neil » Thu Feb 09, 2017 10:47 pm

Super thank's

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm

Who is online

Users browsing this forum: No registered users and 3 guests