mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
Update Cart.php
This commit is contained in:
@@ -51,7 +51,7 @@ class Cart
|
|||||||
/**
|
/**
|
||||||
* Defines the discount percentage.
|
* Defines the discount percentage.
|
||||||
*/
|
*/
|
||||||
private ?Money $discount = null;
|
private float $discount = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the tax rate.
|
* Defines the tax rate.
|
||||||
@@ -173,7 +173,7 @@ class Cart
|
|||||||
{
|
{
|
||||||
$item->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