0

On my shopping cart page I'd like to display the total (inc tax & discounts!) but not including shipping costs. I can't find a tag for this unless I'm missing something.

Any suggestions?

1

I haven't tested it, but I'm assuming the {exp:cartthrob:cart_subtotal_minus_discount} tag doesn't include the tax? Perhaps then it would be best to calculate the {exp:cartthrob:cart_subtotal_minus_discount} + {exp:cartthrob:cart_tax} values using javascript or an EE math plugin like one of these:

2
0

I did it by creating a partial (includes/cart_subtitle.html):

{!-- Calculate total without delivery --}
{exp:cartthrob:arithmetic expression="({embed:subtotal} - {embed:discount}) + {embed:tax}"}

and in the main template:

{embed="includes/cart_subtotal" discount="{exp:cartthrob:cart_discount prefix="" thousands_sep=""}" tax="{exp:cartthrob:cart_tax prefix="" thousands_sep=""}" subtotal="{exp:cartthrob:cart_subtotal prefix="" thousands_sep=""}" }

Bit ugly, but it works :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.