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 ?



Joined: 08/13/2007