Answer the question
In order to leave comments, you need to log in
How to display prices minus the discount in the product card?
I want to display two more prices next to the price of the product Discounted prices:
Price: 500
Small wholesale: 400
Wholesale: 250
In order not to create complex mechanisms, the essence will be a fixed discount, for example, for wholesale it is 50%
How to write down the formula and display
500 in the product card - 50%= 250 the amount displayed in the product card
Answer the question
In order to leave comments, you need to log in
You can simply calculate:
$price = $product->get_price();
$discount = '50'; //%
$itogo = $price - ($price * ($discount / 100));
echo $itogo;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question