laravelshoppingcart
laravelshoppingcart copied to clipboard
Item Conditions always applied to subtotal.
In checkout I thought subtotal was the price of the cart before any conditions applied. That appears to be how using a cart condition works. However if you apply a condition to an item the calculated condition price is included in the subtotal making it difficult to show the original cost of the items , then show the discounted amount, and then the total. Am I doing something wrong?
I have the same problem, could you solve it?
I ended up making a $tempTotal which was a calculated cost of all items in cart before conditions and used that as my new "sub total" in the front-end. I do think if I had time I would make a pr to only apply conditions to the total and never the sub total so sub total was always the default calculated cost of items in the cart before anything.
I have made a fork, with several changes, such as for example the taxes are applied after obtaining the subtotal of the item
I have the same problem and was wondering if anyone found out a solution using "native" laravelshoppingcart methods ? If not, I will probably make my own subtotal too. Thanks
You need to use getSubTotalWithoutConditions.
If Im not wrong, tax conditions must be applied to cart, not to items, If you have different tax per items, I think using getSubTotalWithoutConditions is a good alternative anyway.