[Shop][Product] Display product original price on product page (no bc break)#11423
Conversation
|
I think there are ways of adding this feature without deprecating anything or adding any BC breaks.
I find the 3rd option more practical and flexible. An instance of Also, there's P.S. I can help with the implementation this presents interest. |
|
@vvasiloi 2nd idea looks like a good solution! It'd not introduce any more new abstractions, so the complexity would stay almost the same. |
|
Thanks for your feedback @vvasiloi , @pamil . I followed @lchrusciel comment : here Idea 1 : @JulienLoison proposed this in pull request #11200 , right ? Which solution do I have to choose ? (Sorry, first pull request in this project). 😄 |
@FlashPanther No, there's a new method in the current interface, instead of a new interface.
@pamil It is actually a new abstraction, since it adds a new interface. Perhaps you were referring to the 1st, which reuses the current interface. |
Correct, but that was flagged as a BC Break, hence the new proposal of @FlashPanther which was based on the commit of @JulienLoison introduced in #11200. |
5498f7d to
44c3f6d
Compare
|
Of course ... Psalm analysis triggers errors because of deprecated class ... |
lchrusciel
left a comment
There was a problem hiding this comment.
We should add an exception to psalm ruleset (see DeprecatedClass tag in psalm.xml
4866b5f to
fd0ffb2
Compare
|
@pamil : ok for you ? (requested for review) |
|
Thanks, tdevos and Julien! 🎉 |
|
If anyone would like to improve this feature, even more, we could add original prices to our fixtures, so they will be visible on demo/testing installation just after fixtures reload ;) |
|
There is an additional case, that I didn't spot during code review - the price is not updated when the variant is changed. It means also, that it will not work if the first variant doesn't have an original price (even if the previous problem was fixed). @FlashPanther would you like to give it a try to fix these cases? |
…oduct page (JulienLoison) This PR was merged into the 1.8-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | - | License | MIT Follows up @lchrusciel's comment on #11423 about variant prices not updating on the product page or variant not displaying discount if the first variant of the product has no discount. Commits ------- 8bddc52 [UI] added display of product variant original price on product page
Follows up pull request #11200 by @JulienLoison , fixing backward compatibility break