Closed Augen2203 closed 3 years ago
You can add a coupon for each item , and for the entire cart.
Whole Cart
$fixedCoupon = new LukePOLO\LaraCart\Coupons\Fixed('500 OFF', 500);
LaraCart::addCoupon($fixedCoupon);
Per Item
$fixedCoupon = new LukePOLO\LaraCart\Coupons\Fixed('10OFF', 10);
$fixedCoupon->setDiscountOnItem($item);
Can I add a discount separately, for each product added to the cart?
For example like this:
$cart->setDiscount($cartItem->itemHash, $product->Discount)
For example, I have a product that now has a 10% discount.
In the general field there is a discount.
Also, display a discount for each item in the basket (both a discount for the product itself and a discount with the applied coupon).
Thanks to.