manbowead Posted March 23, 2007 Posted March 23, 2007 when the items are in the shopping cart, i need to calculate overall postage for the heaviest item. i already have the weights set up in the table rate. for example if there are 3 items in the cart with postage costs of 3.99, 4.99 and 6.99. i need it to work out a flat rate of 6.99 for all 3 items instead of adding them together 15.97. if you cant do it please dont post comments, i just need it done this way so it works with my supplier. any questions, just ask. Quote
♥bruyndoncx Posted April 21, 2007 Posted April 21, 2007 In catalog/includes/modules/shipping/table.php find $order_total = $shipping_weight; for ($i=1; $i <= sizeof($order->products); $i++ ){ if ( $order->products[$i]['weight'] == '0' ) { $this->quotes['error'] = ''; return $this->quotes; } } replace with $order_total = 0; for ($i=1; $i <= sizeof($order->products); $i++ ){ if ( $order->products[$i]['weight'] > $order_total ) { $order_total = $order->products[$i]['weight']; } } for ($i=1; $i <= sizeof($order->products); $i++ ){ if ( $order->products[$i]['weight'] == '0' ) { $this->quotes['error'] = ''; return $this->quotes; } } Untested, but I think this will do the trick for you ! Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.