Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add originalPrice to product response #502

Merged
merged 3 commits into from
Jul 31, 2019

Conversation

alexander-schranz
Copy link
Contributor

I think the originalPrice is a information which is also mostly needed when reading products.

@alexander-schranz alexander-schranz requested a review from a team as a code owner July 30, 2019 18:23
@alexander-schranz alexander-schranz force-pushed the feature/original-price branch 3 times, most recently from 7bac34c to 4f2ec7b Compare July 30, 2019 18:51
@mamazu mamazu merged commit 932a184 into Sylius:master Jul 31, 2019
@mamazu
Copy link
Member

mamazu commented Jul 31, 2019

Thank you, Alexander! 🎉

@alexander-schranz alexander-schranz deleted the feature/original-price branch July 31, 2019 14:49
mamazu added a commit that referenced this pull request Aug 1, 2019
…ander-schranz)

This PR was merged into the 1.0-dev branch.

Discussion
----------

This fixes the tests on master branch after #502 / #503 where merged into it.

Commits
-------

5170c61 Fix product variant view factory original price test
@@ -33,6 +33,10 @@
"current": 1999,
"currency": "GBP"
},
"originalPrice": {
"current": 2999,
"currency": "GBP"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any possibility to add original price in a different currency than the current one? What would you say, about merging these originalPrice and price fields?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both should be used with the same structure. The price is renderd using a Priceview so should the original price be otherwise it would make things more difficult when consuming this API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants