You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to have a discount on a product? I've fumbled around with the ww.merx.cart & editing the price itself, but there doesn't seem a way to correctly apply the discount.
The text was updated successfully, but these errors were encountered:
thanks for your question. In the first place, Merx only needs to know the price to be paid in the end (in your case, that would be the discount price). Any other price (e.g. the original price) is not relevant for Merx. It is only a question of the user interface, in the first place.
If you want to store the original price (e.g. to show the original price on the invoice) you can to pass the original price to the Cart::add() method as shown below.
Add item to cart
$productPage = page('bike');
$cart->add([
'id' => $productPage->id(),
'price' => $productPage->price(), // something like `$productPage->originalPrice() * 0.8` would be possible as well'originalPrice' => $productPage->originalPrice(),
]);
Is there a way to have a discount on a product? I've fumbled around with the
ww.merx.cart
& editing the price itself, but there doesn't seem a way to correctly apply the discount.The text was updated successfully, but these errors were encountered: