Magento 2.x

Abandoned Cart URL handling with Magento and Unific

This article explains the format of abandoned cart urls used for the Magento - Unific setup

An abandoned cart URL is the address or link that would take a user to the cart which contains items whose checkout has been abandoned. In case of Magento, the URL has a specific format.

For instance :

For any magento store, the first part i.e. '', is the store, the second i.e. 'unific' is frontName, 'cart' is folder name inside Controller folder, 'restore' is Controller class name, 'id' is parameter name and'A4zNgItRD5QxL2iYOLxrCvAa0Z5A4w1Y' is value of the id parameter.

Given this, Unific configures and creates this URL for it's client's stores from within it's extension, and syncs it to the target  CRM portal.


For stores designed with different js framework UI

This, however, gets a bit tricky when, stores decide to add a custom UI layer using some javascript framework, such as react or nextjs etc.. When a custom UI is added on top of the Magento backend, the store address is not always the same as what standard Magento defines. Hence, the URL generated for abandoned cart too, would in this case, wont match. Therefore, the stores would have to have a capability to handle the requests coming it's way through the standard Magenot abandoned cart URL. One possibility of doing that is to catch the url in the UI app, and make a call to the backend with the id. Without such a mechanism, the store's user would end up with a page not found error.