prestashopBridge icon indicating copy to clipboard operation
prestashopBridge copied to clipboard

Add product as a guest

Open xabikip opened this issue 10 years ago • 2 comments

I have written this code and it works fine. But if the user leaves the browser or going to another page the cart is lost. Can you think of how to fix this?

xabikip avatar Apr 01 '15 09:04 xabikip

Create a Guest object in each addProduct call is not a good idea.

I think it's better to write a separate function who creates or load a Guest. Then you can use addToCurrentCart function.

hparfr avatar Apr 01 '15 09:04 hparfr

Yes, that's a good idea, but i don't know how to load a Guest. You have any idea?

xabikip avatar Apr 01 '15 14:04 xabikip