Vote up!
Vote down!

Where is the Tax variable stored?

I'm trying to make a custom tax rule that will tax only certain items.

I've got total sales tax for the order all figured out in my rules. I just need to know where to put the value.

For example commerce-line-item:order:commerce-order-total stores the total of the line items. Just can't find the sales tax!


Asked by: therealjjj77
on January 16, 2014

1 Answer

Vote up!
Vote down!

So I figured out the way to accomplish what I needed.

First, I went to Line Item Types:Product and added a boolean called "Add Tax at Checkout".

Second, I went to every product type and added the same field.

Third, created a rule that reacted after a product is added to the cart. It required three conditions: 1. that the product had the field "Add Tax at Checkout". 2. that the commerce line item had the field "Add Tax at Checkout". 3. That the field of the product was checked.
Finally, created an action in the rule to set the value for the commerce-line-item: "Add Tax at Checkout" to the checked value.

Fourth, in the tax rules, I clicked on the component and included two conditions, that the commerce-line-item had the field "add Tax at Checkout" and that the field was set as checked.

Working now!

Answer by: therealjjj77
Posted: Jan 20, 2014