Alter commerce views footer;
Hello
I'd like to alter 2 views ouput from Commerce :
1/ In the _Shopping cart block_, there is a line item summary in the footer : I currently use commerce_price_components module to display tax exclusive prices, and i would like the line item summary total to be calculated without taxes as well. How can I alter the calculation / value of this field ?
2/ In the _Shopping cart summary_, there is a Order total in the footer : the current lines displayed are :
Sub-total 200,00 €
VAT 19.6% 40,67 €
Shipping 7,51 €
Order total 248,18 €
I would like the following ouput
Sub-total 200,00 €
Shipping 7,51 €
VAT 19.6% 40,67 €
Order total 248,18 €
OR
Sub-total 200,00 €
VAT 19.6% 39,20 € (which is the sub total VAT amount)
Shipping VAT included 8,98 € (which is the shipping price VAT included)
Order total 248,18 €
How can I alter this output ?
Many thanks
Comments
You could use hook_commerce_price_formatted_components_alter(&$components, $price, $entity), to change the weight property of each component in $components