Results 1 to 10 of 415

Threaded View

  1. #11
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    59
    Plugin Contributions
    1

    Default Re: Optional Shipping Insurance Module Support Thread...

    Quote Originally Posted by dennisns7d View Post
    To eliminate the warning when using PHP 7+, change
    Code:
    		function ot_insurance() {
    to
    Code:
    		function __construct() {
    OK, but for Zen-cart version 1.5.8, when you replace the function name with __construct() the following errors are given when the Order Total Modules page is visited in the Admin. Evidently it is trying to get an order delivery country which does not exist

    --> PHP Warning: Attempt to read property "delivery" on null in C:\xampp\htdocs\includes\modules\order_total\ot_insurance.php on line 37.
    --> PHP Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\includes\modules\order_total\ot_insurance.php on line 37.

    Line 37 is like this
    PHP Code:
        $check $db->Execute("select zone_id from " TABLE_ZONES_TO_GEO_ZONES " where geo_zone_id = '" constant('MODULE_ORDER_TOTAL_INSURANCE_ZONE_' $i) . "' and zone_country_id = '" $order->delivery['country']['id'] . "' order by zone_id"); 
    Any ideas how to overcome this? Should there be an Admin page check?
    Last edited by zamzom; 15 Feb 2023 at 05:45 PM.

 

 

Similar Threads

  1. Optional Shipping Insurance Module Question
    By kminnich in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 7 Oct 2008, 01:16 AM
  2. Optional Shipping Insurance Module
    By Darkwander in forum Addon Shipping Modules
    Replies: 2
    Last Post: 9 Oct 2006, 02:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR