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

There is no check on the existence of properties when the product is added to the basket #78

Open
mastak opened this issue May 24, 2013 · 2 comments

Comments

@mastak
Copy link

mastak commented May 24, 2013

There is no check on the existence of properties when the product with the properties is added to the basket. As a result, a field named as property-{{property.id}} can contain any non-existent value. And will create an instance CartItemPropertyValue with that value.

@pigletto
Copy link
Collaborator

Can you please provide a description how to reproduce this issue? How to define properties (what type of property) etc. and what exaclty to do to expose this incorrect behaviour.

@mastak
Copy link
Author

mastak commented May 24, 2013

Example: you have product with property (select field). at product page using special tools (such as the browser chrome :) ), you can add any additional options to property field.
Let we have property color:
< select name=color >
< option value="1">Red< /option >
< option value="2" >Green< /option >
< option value="3" >Blue< /option >
< /select >

If we open inspector and add Black and added it product to cart, in file lfs.cart.view (line 298) product will be added to cart, and in file lfs.cart.models (line 86) will be created CartItemPropertyValue with value "4".

I think, in function add_to_cart must be some validation for select fields and their values.

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

No branches or pull requests

2 participants