Search code examples
sap-commerce-cloud

Hybris- create one site with more base store


i need to assign to a single cmssite more stores with it's own sap Base Store Configuration.

at the moment, i've created two base store, and assigned those to a single website.

problem is that baseStoreService.getCurrentBaseStore(); is getting always the first entry, and i can't find out the logic to select the right base store.

How can i customize this functionality? how hybris select the base store?

Best regards Marco


Solution

  • BaseStoreService has a list of BaseStoreSelectorStrategy beans injected & those perform the mechanics of selecting a store. The only standard implementation for the strategy is DefaultBaseStoreSelectorStrategy which just choses the first store for the current site. I imagine you will need to customise this with your own strategy implementation(s).