Forums / Addon Shipping Modules / Big Royal Mail 3.0

Big Royal Mail 3.0

Views: 98,541

Results 341 to 360 of 363
18 Oct 2023, 9:51 PM
#341
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Big Royal Mail 3.0

Sorry for the delay in replying.
The issue is Maximum Order Value -1.
I forgot that it is stored as a string.

If you change includes\modules\shipping\BigRoyalMail\quote.php line 47
from

} elseif (constant('MODULE_SHIPPING_' . $module . '_MAX_ORDERVALUE') !== -1 && $sales_value > constant('MODULE_SHIPPING_' . $module . '_MAX_ORDERVALUE')) {

to

} elseif (constant('MODULE_SHIPPING_' . $module . '_MAX_ORDERVALUE') !== '-1' && $sales_value > constant('MODULE_SHIPPING_' . $module . '_MAX_ORDERVALUE')) {

Put quotes around the -1.
This will fix the issue.
I have changed it on github https://github.com/brittainmark/BigRoyalMail/tree/3.8.1
I will issue an update later.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

19 Oct 2023, 12:39 AM
#342
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,862
Plugin Contributions:
18

Re: Big Royal Mail 3.0

Works a charm.

Thank you!:clap:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

9 Nov 2023, 1:44 PM
#343
daxtheman avatar

daxtheman

New Zenner

Join Date:
Jun 2023
Location:
UK
Posts:
21
Plugin Contributions:
0

Re: Big Royal Mail 3.0

Hi Mark,

Really like this plugin which has been working ZC 1.5.7. However, I upgraded to ZC 1.5.8a and PHP 8.2 and now getting fatal error using BRM 3.8.0. This is typical of what I am seeing.

Appreciate any guidance on what I've missed to cause this error.

Thanks.

[09-Nov-2023 12:26:14 Europe/London] PHP Fatal error:  Uncaught Error: Undefined constant "MODULE_SHIPPING_RMPFGPRIORITY_ZONES_COST0_9" in /var/www/vhosts/httpdocs/includes/modules/shipping/BigRoyalMail/quote.php:110
Stack trace:
#0 /var/www/vhosts/httpdocs/includes/modules/shipping/BigRoyalMail/quote.php(110): constant()
#1 /var/www/vhosts/httpdocs/includes/modules/shipping/rmpfgpriority.php(89): require('...')
#2 /var/www/vhosts/httpdocs/includes/classes/shipping.php(201): rmpfgpriority->quote()
#3 /var/www/vhosts/httpdocs/includes/modules/pages/checkout_shipping/header_php.php(184): shipping->quote()
#4 /var/www/vhosts/httpdocs/index.php(35): require('...')
#5 {main}
  thrown in /var/www/vhosts/httpdocs/includes/modules/shipping/BigRoyalMail/quote.php on line 110
9 Nov 2023, 3:42 PM
#344
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

If sounds like you are missing some entries from the configuration table.
Can you check the configuration table on the database to make user that there in an entry with configuration_key =
MODULE_SHIPPING_RMPFGPRIORITY_ZONES_COST0_9.
If it is missing you could uninstall and reinstall that module to get the value set up.
I have it working on mysite with php 8.2.4.

If it is more than one module then uninstall and reinstall the modules that are causing a problem. If that does not fix it let me know, and I'll see if I can find anything else to look at.
Regards
Mark

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

10 Nov 2023, 10:57 AM
#345
daxtheman avatar

daxtheman

New Zenner

Join Date:
Jun 2023
Location:
UK
Posts:
21
Plugin Contributions:
0

Re: Big Royal Mail 3.0

Hi Mark

Perfect! No entry in database and reinstalling it added the entry.

Thank you. Appreciate the quick response.

23 Mar 2024, 11:33 AM
#346
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

I have just submitted a new update 3.9.0 to include

  • Update to rates.php and rVersion.php for April 2024 price rise
  • Added Royal Mail Tracked 24 and 48. **Please check with your post office before using these rates.
  • PrintedPapers.sql updated for April 2024 prices rise
  • apr2024Update.sql created for April 2024 prices rise
  • Refactored style for PHP 8.3

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

11 May 2024, 5:54 AM
#347
heresy_miniatures avatar

heresy_miniatures

New Zenner

Join Date:
Jul 2011
Posts:
59
Plugin Contributions:
0

Re: Big Royal Mail 3.0

Since I installed BRM on a clean 2.0 site, something weird has happened and all of the links on my site now point to one product page, literally every link redirects to the one product. Someone suggested it might be a URI error, and in the error logs I'm getting a lot of messages like this:

[11-May-2024 05:32:02 UTC] Request URI: /shop/zcadmin/index.php?cmd=modules&set=shipping&module=rm1stletter, IP address: 81.105.228.234, Language id 1
#1 require(/zcadmin/modules.php) called at [/zcadmin/index.php:11]
--> PHP Warning: Undefined property: rmamteulargeletter::$sort_order in /zcadmin/modules.php on line 224.

[11-May-2024 05:32:02 UTC] Request URI: /shop/zcadmin/index.php?cmd=modules&set=shipping&module=rm1stletter, IP address: 81.105.228.234, Language id 1
#1 require(/zcadmin/modules.php) called at [/zcadmin/index.php:11]
--> PHP Warning: Undefined property: rmamteulargeletter::$sort_order in /zcadmin/modules.php on line 230.

[11-May-2024 05:32:02 UTC] Request URI: /shop/zcadmin/index.php?cmd=modules&set=shipping&module=rm1stletter, IP address: 81.105.228.234, Language id 1
#1 require(/zcadmin/modules.php) called at [/zcadmin/index.php:11]
--> PHP Warning: Undefined property: rmamteuparcel::$sort_order in /zcadmin/modules.php on line 224.

[11-May-2024 05:32:02 UTC] Request URI: /shop/zcadmin/index.php?cmd=modules&set=shipping&module=rm1stletter, IP address: 81.105.228.234, Language id 1
#1 require(/zcadmin/modules.php) called at [/zcadmin/index.php:11]
--> PHP Warning: Undefined property: rmamteuparcel::$sort_order in /zcadmin/modules.php on line 230.

I have no idea hwo to fix it, I've reuploaded all the module files and made sure to delete the old non 'lang.' files, is there some sort of uninstall sql to run or something?

11 May 2024, 6:37 AM
#348
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

DaxtheMan:

Hi Mark,

Really like this plugin which has been working ZC 1.5.7. However, I upgraded to ZC 1.5.8a and PHP 8.2 and now getting fatal error using BRM 3.8.0. This is typical of what I am seeing.

Appreciate any guidance on what I've missed to cause this error.

Thanks.

[09-Nov-2023 12:26:14 Europe/London] PHP Fatal error: Uncaught Error: Undefined constant "MODULE_SHIPPING_RMPFGPRIORITY_ZONES_COST0_9" in /var/www/vhosts/httpdocs/includes/modules/shipping/BigRoyalMail/quote.php:110
Stack trace:
#0 /var/www/vhosts/httpdocs/includes/modules/shipping/BigRoyalMail/quote.php(110): constant()
#1 /var/www/vhosts/httpdocs/includes/modules/shipping/rmpfgpriority.php(89): require('...')
#2 /var/www/vhosts/httpdocs/includes/classes/shipping.php(201): rmpfgpriority->quote()
#3 /var/www/vhosts/httpdocs/includes/modules/pages/checkout_shipping/header_php.php(184): shipping->quote()
#4 /var/www/vhosts/httpdocs/index.php(35): require('...')
#5 {main}
thrown in /var/www/vhosts/httpdocs/includes/modules/shipping/BigRoyalMail/quote.php on line 110


There is a later version 3.9.0 which might be a better starting point. That said.

I suspect that you have not deleted the old eu modules which are no longer used. 
**To Remove EU modules.**

    Delete the following files:
        rmamteuletter.php, rmamteulargeletter.php, rmamteuparcel.php from
                            YOUR_SHOPPING_CART_DIRECTORY/includes/modules/shipping
                            and
                            YOUR_SHOPPING_CART_DIRECTORY/includes/languages/english/modules/shipping

You can also run the RemoveEU.Sql to remove the values from your configuration file. 
1. Backup your database before  running update.
2.Login to your zen cart admin
3. Use Tools > Install SQL Patches
4. Copy the contents of RemoveEU.Sql and paste into the text window 
    or
   Use the Browse button to load RemoveEU.Sql into zen cart.
5. Press send button to execute script.


I assume that you have updated from an older version of big royal mail. These instruction should have been in the doc UPGRADES.htm.

Let me know if you have any more issues.

Mark

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

31 May 2024, 10:02 AM
#349
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Big Royal Mail 3.0

Hello there,

I am moving to a new template and just wondered which file controls the following from being displayed on the shopping cart page:-

... Invalid Option Values Selected

It also shows the packaging format of parcel or large letter underneath each item. I just can't recall which file it is, I am sure its a global and not template file as it does the same on other template switches. I had a developer alter the code somewhere and these things stopped displaying to the customer. I set to read-only also as in readme. Thanks in advance.

31 May 2024, 11:06 AM
#350
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

Not really connected with big royal mail.
The error message is in lang.english.php in the includes/languages folder may also be under your template. It is used by shopping_class.php which is in includes/classes.

If you need any more info probably best to raise the question under General Questions.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

31 May 2024, 2:02 PM
#351
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Big Royal Mail 3.0

brittainmark:

Not really connected with big royal mail.
The error message is in lang.english.php in the includes/languages folder may also be under your template. It is used by shopping_class.php which is in includes/classes.

If you need any more info probably best to raise the question under General Questions.

Many thanks for your reply, sorry about that. It was only showing Minimum Delivery Method attributes on the cart, but I appreciate you giving me pointers on what to edit.

3 Feb 2025, 12:40 AM
#352
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Big Royal Mail 3.0

Hello there,
I get the following error, which weirdly only gives blank page when using shipping estimator on shopping cart page, so far only United States and Canada upon testing:-

PHP Fatal error: Uncaught TypeError: Unsupported operand types: float + string in /includes/modules/shipping/BigRoyalMail/quote.php:151

Its fine in php 7.x , the issue only occurs on php 8.x . I guess its something to do with rest of world zones. I read on google that it just needs parentheses adding at certain points, but that was for a different system to zencart. I swtiched back to php 7.x for now, trying to suss it out but the code seems to spread over 2 lines that it refers to.

3 Feb 2025, 12:16 PM
#353
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

I assume you are using the latest version 3.9.
I have it on my site working with php 8.2.

Can you check your handling fee is numeric, if zero, make sure it's not letter o.

if it is numeric try changing line 151 from

            $shipping_cost = ($shipping * $shipping_num_boxes) + (defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) : 0) +
                (defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') : 0);

to

            $shipping_cost = ($shipping * $shipping_num_boxes) + (float)(defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) : 0) +
                (float)(defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') : 0);

If that works do you have strict mode set? Let me know what happens.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

3 Feb 2025, 9:25 PM
#354
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Big Royal Mail 3.0

brittainmark:

I assume you are using the latest version 3.9.
I have it on my site working with php 8.2.

Can you check your handling fee is numeric, if zero, make sure it's not letter o.

if it is numeric try changing line 151 from

        $shipping_cost = ($shipping * $shipping_num_boxes) + (defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) : 0) +
            (defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') : 0);
> to
> ```
            $shipping_cost = ($shipping * $shipping_num_boxes) + (float)(defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone) : 0) +
                (float)(defined('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') ? constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING') : 0);

If that works do you have strict mode set? Let me know what happens.

Thanks that worked great! I am testing rest of the world countries and it is working as on 7.4 php.

I do have this one, is this the database strict on you meant?

innodb_strict_mode ON

Thanks again!

4 Feb 2025, 4:07 AM
#356
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

I cannot replicate the issue unless I put a letter into the handling fee. Check your world zone 3 handling fee to see if any of them have a non numeric entry. The letter 'o' is most likely instead of zero.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

4 Feb 2025, 9:12 AM
#357
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Big Royal Mail 3.0

brittainmark:

I cannot replicate the issue unless I put a letter into the handling fee. Check your world zone 3 handling fee to see if any of them have a non numeric entry. The letter 'o' is most likely instead of zero.

I did double check the fields and even deleted and re-entered and it was still the same. But I just checked the two modules I disabled for airmail (standard airmail), and the handling fees are a minus fee, i.e -2.50. I did this I recall a while ago, as we are on business Royal Mail account and it was two to three pounds cheaper on average than the normal prices. Sorry, I didn't think to check disabled modules, it must be looking up all entries if installed, it was just set to false instead of uninstalled.

4 Feb 2025, 9:20 AM
#358
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

Interesting I have never tried negative handling fees. You know you can alter the rates to suit your situation. I know most of the other shipping modules don't allow -ve fees. Do you want me to leave this ability as I was thinking of adding validation to force fees to be greater than or equal to zero. I'll test with a -ve fee to see if it replicates you issue.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

4 Feb 2025, 5:45 PM
#359
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Big Royal Mail 3.0

Hi Mark. I think maybe keep as it is, just that airmail has such a lot of band rate prices, I did a bodge job fix lol. Of course only need to edit if on the account system for lower prices in some cases. I will probably alter each price in future, so yes maybe do the validation thing I say. I didn't realise php 8 was so picky, it was fine for the last year or so.

29 Mar 2025, 11:49 AM
#360
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Big Royal Mail 3.0

Version 3.9.1 has just been released. I have submitted it to zen cart. In the mean time it is available on git hub.
Changes:

Update to rates.php and rVersion.php for April price rise
Update insuramce rates
Change max values to match net insurance max values
Corrected attribute pricing for Royal Mail Tracked 24 and 48.
PrintedPapers.sql updated for April 2025 prices rise
apr2024Update.sql created for April 2025 prices rise
Created wiki for documentation

Mark Brittain
http:\innerlightcrystals.co.uk\sales\