-
Notifications
You must be signed in to change notification settings - Fork 33
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 possibility to set custom properties to cart item #143
Add possibility to set custom properties to cart item #143
Conversation
…use $params in Cart::addItem
…use $params in Cart::addItem
…chinger/ecommerce-framework-bundle into add-custom-properties-to-cart-item
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Hey @dblaichinger Could you plase sign cla and then re-trigger the check? Tnx |
Co-authored-by: Sebastian Blank <sebastian.bl@gmx.de>
recheck |
…chinger/ecommerce-framework-bundle into add-custom-properties-to-cart-item
…chinger/ecommerce-framework-bundle into add-custom-properties-to-cart-item
I have read the CLA Document and I hereby sign the CLA |
…chinger/ecommerce-framework-bundle into add-custom-properties-to-cart-item
…chinger/ecommerce-framework-bundle into add-custom-properties-to-cart-item
Can we do that without changing an interface? As it is now it would be a bc break |
@dblaichinger thx very much. added some docs, can you please double check? |
Hi @fashxp
I've added some details, please check b43fa91
Can this be achieved without changing I've added Thanks! |
not sure if we really need to add an additional parameter, of if we just add a generic functionality to the existing cart implementations, which persists the data passed via This one looks good now. Thx very much!! |
Overview
The suggested change would make it easier to extend
CartItem
class and provide the property inCart::addItem()
as$params
afterwards.Extend CartItem
The
$params
parameter inAbstractCart::addItem
is currently unused in this method, but the doc-block suggests that it's possible to add additional data.In
src/CartManager/CartInterface.php
:Also see: