The basket conversion process happens in the CustomerContext when the customer gets converted from an anonymous customer to a customer. During this process, the reference record in merchAnonymousCustomer is abandoned and the application starts referencing the merchCustomer record (so it uses the pk from that table instead of the pk in the merchAnonymousCustomer table).
Merchello ships with two options for dealing with previously saved customer baskets executed by one of two Strategies .
The default strategy is to discard the previously saved basket IF the customer has started items to a new anonymous basket.
The second strategy is to merge the newly created anonymous basket into the previously saved basket.
To change the configuration, open the merchello.config file and change:
<strategies> <strategy alias="DefaultAnonymousBasketConversionStrategy" type="Merchello.Web.Workflow.BasketConversionByDiscardingPreviousCustomerBasket, Merchello.Web" /> <!--strategy alias="DefaultAnonymousBasketConversionStrategy" type="Merchello.Web.Workflow.BasketConversionByCombiningAnonymousBasket, Merchello.Web" /--> </strategies>
Custom Anonymous Basket Conversion Strategy
Creating a customized the basket conversion strategy can be accomplished by adding a new class that inherits from
BasketConversionBaseand implementing the
Merge()method and then introducing the type reference in the merchello.config.
Updated less than a minute ago