When following conditions are met, you may face following warning message
- DEV mode is enabled
- Seller Shipping module is enabled
- There is any products that does not have a delivery carrier available
( ! ) Warning: Invalid argument supplied for foreach() in C:wamp64wwwdev16xclassesCart.php on line 2211 |
---|
( ! ) Notice: Undefined variable: total_price_without_tax_with_rules in C:wamp64wwwdev16xclassesCart.php on line 2319 |
---|
( ! ) Warning: Division by zero in C:wamp64wwwdev16xclassesCart.php on line 2320 |
---|
To fix those errors, you will need to modify file /classes/Cart.php
A. add following line before line #2211 : foreach ($common_carriers as $id_carrier) {
if(!$common_carriers)$common_carriers = array();
B. changed line #2319 as following
From:
$delivery_option_list[$id_address][$key]['is_free'] = !$total_price_without_tax_with_rules ? true : false;
To:
if(isset($total_price_without_tax_with_rules))$delivery_option_list[$id_address][$key]['is_free'] = !$total_price_without_tax_with_rules ? true : false;
C. change line #2320 as following
From:
$delivery_option_list[$id_address][$key]['position'] = $position / count($value['carrier_list']);
To:
if(count($value['carrier_list'])>0)$delivery_option_list[$id_address][$key]['position'] = $position / count($value['carrier_list']);