Need to merge guest cart quote items to customer active cart quote while logging

NarenderLingoju
NarenderLingoju Posts: 10 🧑🏻‍🚀 - Cadet

Need to merge guest cart items to customer cart while logging from guest to customer, currently its adding guest cart items as separately added to customer cart.

Can we merge guest cart items to customer active cart?

any one please help me with this issue.

Comments

  • victor.vanherpt
    victor.vanherpt Spryker Solution Partner Posts: 58 🪐 - Explorer

    Checkout the logic at the syncQuoteForCustomermethod in the vendor/spryker/persistent-cart/src/Spryker/Client/PersistentCart/QuoteStorageSynchronizer/CustomerLoginQuoteSync.php class

    We had to extend that logic in order to do something similar to what you're asking.

  • NarenderLingoju
    NarenderLingoju Posts: 10 🧑🏻‍🚀 - Cadet

    Thanks for quick response @victor.vanherpt , let me check above file and logic to perform merge cart.