mylittlereddress Posted January 4, 2010 Share Posted January 4, 2010 I am trying to change the the order total so that it gives Subtotal: Shipping: Subtotal Excl VAT: VAT: Total Incl VAT: At the moment the "Subtotal Excl VAT" does not include the Shipping, and the "VAT" is not being calculated to include VAT on "Shipping". I have been looking at catalog/includes/modules/order_total folder to change how the various totals are calculated. Am I looking at the correct files? Or should I be looking elsewhere please? Many thanks in advance Ali Link to comment Share on other sites More sharing options...
mylittlereddress Posted January 4, 2010 Author Share Posted January 4, 2010 Is there anyone who knows where the code to calculate totals is please? Link to comment Share on other sites More sharing options...
mylittlereddress Posted January 14, 2010 Author Share Posted January 14, 2010 If anyone else has this problem, I have finally worked it out. To give the Sub-Total ex VAT but including the shipping, catalog/includes/modules/order_total/ot_subtotal_ex.php Find: if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($order->info['subtotal']-$order->info['tax'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['subtotal']); } else { $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($order->info['subtotal'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['subtotal']); } Change to: if (DISPLAY_PRICE_WITH_TAX == 'true') { // Changed to added shipping cost to the subtotal - added +$order->info['shipping_cost'] into both lines below $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($order->info['subtotal']-$order->info['tax']+$order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['subtotal']+$order->info['shipping_cost']); } else { // Changed to added shipping cost to the subtotal - added +$order->info['shipping_cost'] into both lines below $this->output[] = array('title' => $this->title . ':', 'text' => $currencies->format($order->info['subtotal']+$order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['subtotal']+$order->info['shipping_cost']); } Basically you are adding +$order->info['shipping_cost'] to anywhere there is $order->info['subtotal'] This may or may not be the correct way of doing it, but it did work for me. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.