We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the example, the price is the same even if the color of the same product differs. But how can I implement it if I want to set a price by color?
The text was updated successfully, but these errors were encountered:
You add two products as in the following code:
`$cart->add('1', 1, [ 'price' => '5.99', 'color' => 'Green' ]);
$cart->add('2', 1, [ 'price' => '9.99', 'color' => 'Purple' ]);`
The two cart entries wont be mixed up.
However, I strongly recommend not saving the price here. The cart data could be modified by the user.
Sorry, something went wrong.
its better to work with IDs here and do the calculation on the PHP Site not in the session or cookie.
No branches or pull requests
In the example, the price is the same even if the color of the same product differs.
But how can I implement it if I want to set a price by color?
The text was updated successfully, but these errors were encountered: