Closed mlocati closed 1 year ago
I think that in order to do this, we'd need these changes in the view files of the community_product_list
and community_product
block types:
- $salePrice = $product->getSalePrice();
+ $salePrice = $product->getSalePrice() ?: $product->getPrice();
- $price = $product->getPrice();
+ $price = $product->getPrice(1, true);
- if (isset($salePrice) && "" != $salePrice) {
+ if (isset($salePrice) && "" != $salePrice && $salePrice != $price) {
- $formattedSalePrice = $product->getFormattedSalePrice();
+ $formattedSalePrice = $product->getFormattedSalePrice() ?: $product->getFormattedPrice(1, false);
If that's ok, I can submit a PR
Case 1
If I set the discounted price for a product, like this:
website visitors will see the following:
Case 2
If instead I do the following:
website visitors will see the following:
Question
Is there a way to show for Case 2 the discounted price and the original price with discounts as when we adopt the Case 1? I mean, I'd like to define discounted products using groups, but display the original & discounted price like when I define the discounted price on a per-product basis.