on ‎2019 Jul 02 10:35 PM
Hi,
I need your help to show how could I iterate a list of cart in session, and add new attribute values for one of them,
I need to extend the cartentry to have new atrributes, and save new attributes in model.
Thank you!
Request clarification before answering.
Hi
You need to add new attributes in AddToCartParams & CommerceCartParameter , and get the values into CommerceCartParameter by override the cart facade once values are passed from controller to facade in and saved to AddToCartParams and pass the parameters to service where you can pass the parameter values to cart strategy (CommerceAddToCartStrategy) and save value in the strategy class(in cart entry model or cart model) .
You can reference if qty attribute which is passed from Controller to Strategy(service) and value is saved in cart models.
AddToCartController-->DefaultCartFacade---> CommerceCartService-->CommerceAddToCartStrategy
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.