mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 23:51:25 +00:00
Update Cart.php
This commit is contained in:
@@ -171,7 +171,7 @@ class Cart
|
|||||||
*/
|
*/
|
||||||
public function addCartItem(CartItem $item, bool $keepDiscount = false, bool $keepTax = false, bool $dispatchEvent = true): CartItem
|
public function addCartItem(CartItem $item, bool $keepDiscount = false, bool $keepTax = false, bool $dispatchEvent = true): CartItem
|
||||||
{
|
{
|
||||||
$cartItem->setInstance($this->currentInstance());
|
$item->setInstance($this->currentInstance());
|
||||||
|
|
||||||
if (!$keepDiscount) {
|
if (!$keepDiscount) {
|
||||||
$item->setDiscountRate($this->discount);
|
$item->setDiscountRate($this->discount);
|
||||||
|
|||||||
Reference in New Issue
Block a user