ryanmitchell Not sure if you will get it that fine grained to be honest. You need to know how much discount needs apportioned to each line item (discount amount x row subtotal / overall subtotal ) definitely possible but means more calculations in your tax class.
yoursantu ryanmitchell Yeah, I have to do in Tax class: If the Coupons discount 10%, then it will be applied on each line items. The discount amount will be the same. ($item_quantity * $item_price - $discount_amount_or_percentage) + ($item_tax) But to do this, i need discount value from Coupons. How can i get value from coupons?
ryanmitchell if ($couponCondition = Cart::conditions()->get('coupon')) $value = $couponCondition->getValue();
yoursantu ryanmitchell Dear Ryan, I have tried above statement, it fails to add items to cart. (flash: error) output value is null even coupon condition applied!!
ryanmitchell Its not possible for me to help any more without accessing the codebase you are working from - theres too much back and forth 🙂
yoursantu ryanmitchell Dear Ryan, I did this by own approach!! after deep dig into the Cart Class, i have observed, the subtotal in cart items object really came to the help!! this worked like charm!! 🙂 Thank you very much for all your help and support!!
sampoyigi Ryan the angel of the TastyIgniter community! 👼 Thank you for taking the time to contribute in so many ways that you do!
yoursantu sampoyigi Dear Sam, @ryanmitchell He is actually my Hero, as he supporting for so many things!! 👼 and special thanks you too, as you created a great platform!!