Crinsane / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
3.67k stars 1.73k forks source link

Tax Queries #668

Open stezam opened 2 years ago

stezam commented 2 years ago

Dear Sir, I need some help please.

  1. Can the tax be dynamic since not all products are charged with the same tax amount.
  2. I would like to display the tax amount in the cart row, can it be done?

Thank you

bumbummen99 commented 2 years ago

1) Yes but not with the trait, got to do it manually on the CartItem https://github.com/Crinsane/LaravelShoppingcart/blob/f460ab7312cce32cb428cf39a500a2d16600b1d6/src/CartItem.php#L238

2) Just display the taxRate property of the CartItem available trought the magic __get method or use formatted tax() method.