What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Did anyone set multi store under one domain, something like
Did anyone set multi store under one domain, something like www.mybrand.com/shop1 and www.mybrand.com/shop2 ? Anything I should be taking care of? Right now we have shop1.mybrand.com and shop2.mybrand.com but due to SEO requirements we need to change.
Comments
-
We currently do this for one of our customers (not yet live).
Prepare yourself for a lot of work and a nightmare of memory leaks during publish.Do you need to know which url is available in which store (e.g.: Store A has URL /a/foo that is /b/bar in Store for alternate tags in the html head? Have fun building that yourself.
Want to publish a product concrete/abstract from the same DB but in multiple stores -> be prepared for really big result sets due to missing batching and inefficient queries.
0 -
we do not have that many products and we do not have the same product in both stores, so I hope we will not have the problems you are describing. Anything else that was a problem with a setup itself? Like routing or something?
0 -
Routing pretty much depends on what routing schema you already have. Is a Store prefix already included in the Url, then you are good to go. If not you not you will need to migrate all existing urls to include a store prefix. You will also need to match the store from the store prefix in the url and initialize the right store and locale in
Spryker\Shared\Config\Application\Environment::initialize
. We also implemented aRouterEnhancerPluginInterface
to add the store prefix to all internal urls and strip it from incoming urls0 -
We also had to adapt
SprykerShop\Yves\StorageRouter\UrlGenerator\StorageUrlGenerator
to add the store prefix to the url.0 -
we also did it in a current project. You also have to take care of executing zed in the correct store context in some cases (e.g. recalculating cart was a problem for us). And symfony forms which have the action url included, you need to prefix them with the store url or somehow else set the correct store context in the post request (in summary, you have to make sure, that in the complete request chain, when you do something in the store, the store context is set correctly all the time in all requests, otherwise it can have some pretty drastic side effects, like 0 prices in cart, if you switch price mode between the stores, or an empty cart suddenly etc.)
0 -
it was a lot of debugging work in the end to find all the cases, where the store context was not set correctly, yet
0 -
thank you all for the update
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random