Introducing the Centarro Commerce 2.x multi-store, multi-domain demo
Who doesn’t love a good demo? 😄
Late last year we launched a new Commerce 2.x demo site using our Belgrade theme and Commerce Demo. Not only does it look great, but the new site also beautifully demonstrates Drupal Commerce's "out of the box" multi-store, multi-domain features using Domain and Commerce Store Domain.
Commerce 2.x supports multiple stores out of the box. This is useful if you wish to sell specific products to different countries, for example. Products are published per-domain, and the current store context is determined through a pluggable system that lets you determine when to use something other than the site's default store.
Our new demo site uses four stores, each tied to a different subdomain. The current store is checked when we enabled payment gateways on the checkout form, so the subdomains are prepared to demonstrate different integrations:
- PayPal - https://commerce.demo.centarro.io
- Braintree - https://braintree.demo.centarro.io
- Authorize.Net - https://authnet.demo.centarro.io
- Square - https://square.demo.centarro.io
All products in the demo are published to every store. While not a payment gateway demo, we also added a subdomain where you can test our Avalara integration for address validation and sales tax calculation: https://avalara.demo.centarro.io
Previously, Commerce 2.x would create one cart per store and list them all on the shopping cart page. This presented a problem for a demo where we only wanted the cart associated with the current subdomain's store to show, and it would've been even more problematic if we weren't publishing every product to every domain.
Thanks to Commerce 2.x maintainer Jonathan Sacksick, we were able to improve Commerce Core to provide greater control over limiting cart visibility per store.
Even bigger props go to Sunčica Milošev, our site builder / maintainer extraordinaire, for putting this build together in under a week! 😮