cancel
Showing results for 
Search instead for 
Did you mean: 

OCC v2 - Coupon not moved from anonymous cart to registered user cart

former_member192125
Participant
0 Kudos
474

Hi All, we are currently using hybris 6.4 with OCC v2. We are calling the following API to transfer the anonymous cart (with coupon applied) to the registered user:

POST /v2/mysite/users/user@mail.com/carts

Param: oldCartId=c1185754-52b5-4057-9b02-abd24d0db576

The cart entries and promotions get moved to the registered user cart but this is not happening for the coupons.

Any suggestion?

Thanks, Riccardo

View Entire Topic
Eddy_
Explorer
0 Kudos

Hi Riccardo,

we had the same issue and solved it by overriding the CartsController/DefaultCartFacade to use this method:

de.hybris.platform.commercefacades.order.impl.DefaultCartFacade.restoreAnonymousCartAndTakeOwnership(String)

It does not clone the given cart, but (really) takes the ownership as the method signature says 😉

Kind regards
Eddy