Create a product variant with price and original price.
On product listing only the price is being displayed, original price should also be displayed crossed out.
I'm ready to contribute if you see it's importance.
Please, feel free to open a PR :)
@Snake-Tn, try this:
{% set prices = product.variants|first.channelPricings|first %}
{{ prices.originalPrice }}
UPDATE: see these #7079 & #7087
@kochen , original price should not be taken directly from entity, it should be calculated through a service, so I give the possibility for plugins to overwrite it(like catalog promotion plugin) , currently this is the case for the price.
If the price is calculated through service how can you sort by price?
@nacholibre , what you mean by "sort" the price ?
For example when you list products and you want to sort them by price asc/desc (including promotions etc). One solution is to fetch all products and sort them in memory, but this is not good idea.
@nacholibre , sorting per price is totally not related to this issue, here we just want to show the original price.(only affecting the view).
The service that will calculate original price , will implement the identical function (f(x) = x),
which means sorting per price wont be affected. going through a service gives plugins ability to alter original price on the fly (without touching data in DB)
Most helpful comment
@nacholibre , sorting per price is totally not related to this issue, here we just want to show the original price.(only affecting the view).
The service that will calculate original price , will implement the identical function (f(x) = x),
which means sorting per price wont be affected. going through a service gives plugins ability to alter original price on the fly (without touching data in DB)