not to worry,
I have already committed the changes to the 1.3.9 branch.
not to worry,
I have already committed the changes to the 1.3.9 branch.
PHP Code:
function get_order_total() {
global $order;
$order_total_tax = $order->info['tax'];
$order_total = $order->info['total'];
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
if ($this->include_tax != 'true') $order_total -= $order->info['tax'];
if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax'];
$orderTotalFull = $order_total;
$order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax);
return $order_total;
}
Shouldn't the second instance of:
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
actually be:
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_tax'];
So instead it would be:
Or is it supposed to have the shipping_cost in both rows?PHP Code:
function get_order_total() {
global $order;
$order_total_tax = $order->info['tax'];
$order_total = $order->info['total'];
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_tax'];
if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax'];
if ($this->include_tax != 'true') $order_total -= $order->info['tax'];
$orderTotalFull = $order_total;
$order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax);
return $order_total;
}
BTW this is for the includes/modules/order_total/ot_group_pricing.php for anyone reading who isn't sure.
Blessings,
Krisann
in order for group discount to correctly function i had to comment out the one of the new lines of code plus substitute shipping_tax for shipping_cost:
Here is the code as recommended:
and here is what i have -- sorry about all the comments in the code, it helps me to look back and see what came from whereCode:function get_order_total() { global $order; $order_total_tax = $order->info['tax']; $order_total = $order->info['total']; if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost']; if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_tax']; if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax']; if ($this->include_tax != 'true') $order_total -= $order->info['tax']; $orderTotalFull = $order_total; $order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax); return $order_total; }
Code:function get_order_total() { global $order; $order_total_tax = $order->info['tax']; $order_total = $order->info['total']; if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost']; //if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_cost']; //removed see new code below if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_tax']; //changed to shipping_tax per http://www.zen-cart.com/forum/showthread.php?t=120341 //if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax']; //removed due to incorrect discount computation if ($this->include_tax != 'true') $order_total -= $order->info['tax']; $orderTotalFull = $order_total; $order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax); return $order_total; }
Hi all
I'm having a similar problem I wonder if you can help me with.
I offer free shipping on sales of £100 and over but recently had a few sales around the £88 mark with VAT around £13.20 which makes the overall sale £101 and therefore my cart doesn't charge shipping.
In effect it is therefore giving free shipping on sales under £100 due to the VAT being added.
Can anyone advise how to change this so the free shipping is only on sales of £100 excluding vat?
Sorry to crash on here but I've posted several times elsewhere and had no response!
Thanks
Tori
Last edited by pupsandpets; 14 Sep 2009 at 08:47 AM.
What are your settings for Order Totals Modules >> Discount Coupon?
With those settings I can't replicate your problem. I have however installed the code changes suggested in this thread but had to miss out the code from post #9
I also have the Display price with VAT/TAX and Ex VAT/TAX and VAT-mod for European companies installed. Because of the European VAT mod I also made the change suggested here.
I think there is still a bug in ot_coupon.php when running UK stores. If I have Include Shipping set to false in Order Totals>> Discount Coupon the Order Total is wrong. Sub Totals and VAT are correct though. If I set Include Shipping to true the order total is correct.
I think ot_coupon.php needs similar code changes as applied to includes/modules/order_total/ot_group_pricing.php but I've tried to copy them across as they are but it doesn't work.
Sorry I couldn't be more helpful.
Bookmarks