0

I'm currently building a store where I want a user to be able to share their cart with someone via email. So that say a child could send their cart to their parents who could open the link in the email and their cart would be populated with whatever was in the child's account when he/she generated the link.

Does anyone have experience doing this in Magento 2 and could point me in the right direction? Or, if anyone knows an extension that offers this that would be great.

0

Quote id is generated for each cart session you can get the same and from thereon you can get all the details of the products added to cart. The idea would be to email the cart details embedded with the url of your custom controller and your current quote id as an argument in email template.

Once user clicks the button it should redirect to your website in your controller and you can fetch the quote id and just replace the cart session quote id with your custom and rest of the thing magento shall do it on it's own. This is what i did in magento1 you can follow this procedure for Magento2 as well.

This might be helpful to get the current cart details https://stackoverflow.com/questions/36789133/get-shopping-cart-details-in-magento2

This link might be helpful to load quote by quote id Magento 2 : How to load quote by quote id

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.