Re: Add a subtotal without tax before adding the tax

Posts: 555
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

As my client ask me to add this feature very quickly on his store, I tried on the hack of core tax module to implement this function.

in uc_taxes_javascript(), I added some lines :

<?php
  $taxes
= uc_taxes_calculate($order);
   
$total = uc_order_get_total($order);
     
$taxes[] = array(
       
'id' => 'taxes_subtotal',
   
'name' => t('Taxes subtotal'),
   
'amount' => $total,
   
'weight' => 8,
      );
?>

My goal ATM is to test where to implement in this subtotal in the code, I will take care admin options later. My problem is that this code works, the line item is successfully added to the line item, but the subtotal take care of this line.

So I'm asking about some opinions : what is the best way to don't take care of this subtotal ? DO I have to hack the order module to say to total calculation function to don't add the 'taxes_subtotal' line item or is there a better solution ?

Add a subtotal without tax before adding the tax By: zmove (17 replies) Fri, 09/21/2007 - 10:11