DivanteLtd / coreshop-vsbridge

CoreShop Vue Storefront integration - first Progressive Web App (PWA) framework for Pimcore
https://vuestorefront.io
MIT License
74 stars 25 forks source link

feature: multilanguage / multisite support #40

Closed dkarlovi closed 4 years ago

dkarlovi commented 4 years ago

This PR will allow having multi-language / multi-site support, see #33.

The first step is adding configuration for both Elasticsearch and the sites, like so

core_shop2_vue_storefront:
    elasticsearch:
        hosts: "%env(STOREFRONT_ELASTCSEARCH_DSN)%"
        index: "%env(STOREFRONT_ELASTCSEARCH_INDEX)%_{store}_{language}_{entity}"
    stores:
        example.nl:
            languages:
                - nl
         example.co.uk:
            languages:
                - en
        example.com:
            languages:
                - en

The tokens in the index name allow us to automagically separate per store / language / entity (Product, Category, etc), allowing much easier implementation for #30 also. Idea is to also auto-configure the ONGR bundle, so the ES configuration there will no longer be required.

The command now looks like bin/console vsbridge:index example.co.uk en category (any param is optional, the more you add, you're getting more specific).

kwreczycki commented 4 years ago

Looks good, thank you for your input !!!

dkarlovi commented 4 years ago

Argh, rebased on wrong branch! :see_no_evil: sorry about that, I'll add the tests soon.

kwreczycki commented 4 years ago

Awesome, thanks

dkarlovi commented 4 years ago

@kwreczycki I guess you've closed this by accident, I've rebased to your master, but it's not showing up, maybe Github doesn't process closed PRs.

Thanks for having a look. :beers:

kwreczycki commented 4 years ago

Yep, sorry. Please open PR once again