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

Incorrect product variants documentation #641

Closed
josgerrits opened this issue Mar 26, 2020 · 2 comments · Fixed by #687
Closed

Incorrect product variants documentation #641

josgerrits opened this issue Mar 26, 2020 · 2 comments · Fixed by #687

Comments

@josgerrits
Copy link

Hey everyone,

The documentation states that when retrieving the a cart /carts/{token} should return the variants with the variant code as the key of the array. This is not happening and the key is the index of the array.

@mamazu
Copy link
Member

mamazu commented Nov 11, 2020

You are right. This is an error in the documentation. I would suggest changing the documentation as changing the behavior is not really an option.

The reason this was documented that way is because there are different ways to serialize a product in the ShopApi and one of them is doing it with an associative array. (\Sylius\ShopApiPlugin\Factory\Product\ListProductViewFactory)

@mamazu
Copy link
Member

mamazu commented Nov 11, 2020

Also another thing to note here is that the product variant list of the product on the cart only shows the variant the user put into the cart.

mamazu added a commit that referenced this issue Nov 14, 2020
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fixes #641 

Commits
-------

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

Successfully merging a pull request may close this issue.

2 participants