How to integrate a Shared Basket for multi language shop countries
Introduction
In SCAYLE for every country & language combination within a shop, an own shop country has to be defined. For example, a Swiss shop in French is one shop country and a Swiss shop in German is an additional, separate shop country.
If a customer now places a product in the basket within the German Swiss store and then changes the language to French, he still wants to have the product in the basket. As this can lead to confusion, it makes sense to provide a shared basket for booth Swiss shops.
Use Case
For our “Fashion Store” we already set up shop countries in Germany and Switzerland. As Switzerland is serving German and French speaking customers, we have created two shop countries for Switzerland.
Shop | Shop Country# | Country Code | Language Code | Currency |
---|---|---|---|---|
Fashion Store | 1 | DE | de_DE | EUR |
2 | CH | de_CH | CHF | |
3 | CH | fr_CH | CHF |
We would now like the two Swiss stores to access the same basket. In SCAYLE this can be managed by creating a shop sibling. If you assign a sibling to a store, the sibling store always uses the same basket id as the other store.
The wishlist is also shared between the sibling countries. The customer will be able to access the same wishlist from both shop siblings. Both shops will reference to the same shared wishlist id .
This configuration can be done via the Checkout Config API. For information and access please refer to your SCAYLE Account Manager.
Endpoint Specification
The Checkout Configuration API offers two Endpoints which can be used to create and delete a shop sibling.
Create a Shop Sibling
POST {{url}}/settings/:shopId/applications/:siblingShopId
shopId: Here you can specify the shop country that should function as the initial Checkout, which is then ultimately used by both stores
siblingShopId: This is the shop that then refers to the initial shops Checkout instead of a new Checkout
Delete a Shop Sibling
DELETE {{url}}/settings/:shopId/applications/:siblingShopId
You can use the same schema as before to delete the assignment of the sibling shop countrys.
shopId: Here you can specify the shop country that should no longer function as the initial Checkout.
siblingShopId: This is the shop sibling that should now use its own Checkout again.