Multishop - Configuration

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
MSchrading
Posts: 19
Joined: 14 Aug 2019, 08:13

Multishop - Configuration

Post by MSchrading » 23 Jan 2020, 08:21

1. Backend
As user in admin-group in a specific site I want to setup my backend this way, that I can see all products and customers etc. from this site but not from other and not from the default site. This I can setup with sitelevel=2! But I'm not really shure how to config this. Could you please give me a hand where to setup this?

2.Frontend
Routing. Normaly when I call i.e. "myshop.com/shop" I'll get my first page with all products from all shops. Now I want to call only one specific shop with only products from this shop etc.
Would you please give me a hand how to setup the routes easily for all posible shops?


(Symfony 4.3, php7.2, Aimeos 2019.10, Ubuntu 18.04)
Thank you so much

User avatar
aimeos
Administrator
Posts: 8020
Joined: 01 Jan 1970, 00:00

Re: Multishop - Configuration

Post by aimeos » 24 Jan 2020, 09:27

MSchrading wrote: 23 Jan 2020, 08:21 2.Frontend
Routing. Normaly when I call i.e. "myshop.com/shop" I'll get my first page with all products from all shops. Now I want to call only one specific shop with only products from this shop etc.
Would you please give me a hand how to setup the routes easily for all posible shops?
You have to adapt your routing for multiple shops:
https://aimeos.org/docs/Symfony/Configu ... iple_shops
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MSchrading
Posts: 19
Joined: 14 Aug 2019, 08:13

Re: Multishop - Configuration

Post by MSchrading » 24 Jan 2020, 09:52

Thanks a lot.

I tried this out before and when I use this but this produce this error:

Code: Select all

An exception has been thrown during the rendering of a template ("Route pattern "/{site}/admin/{site}/jqadm/file/{type}" cannot reference variable name "site" more than once.")
Regards

nos3
Posts: 90
Joined: 01 Sep 2015, 13:26

Re: Multishop - Configuration

Post by nos3 » 24 Jan 2020, 09:54

Hello
MSchrading wrote: 23 Jan 2020, 08:21 As user in admin-group in a specific site I want to setup my backend this way, that I can see all products and customers etc. from this site but not from other and not from the default site. This I can setup with sitelevel=2! But I'm not really shure how to config this. Could you please give me a hand where to setup this?
In your ./config/packages/aimeos_shop.yaml add

Code: Select all

    mshop:
        // keep the existing lines
        locale:
            manager:
                standard:
                    sitelevel: 2
The indention must be exactly 4 spaces more for each level!

nos3
Posts: 90
Joined: 01 Sep 2015, 13:26

Re: Multishop - Configuration

Post by nos3 » 24 Jan 2020, 09:55

MSchrading wrote: 24 Jan 2020, 09:52

Code: Select all

An exception has been thrown during the rendering of a template ("Route pattern "/{site}/admin/{site}/jqadm/file/{type}" cannot reference variable name "site" more than once.")
You have to do this for the frontend only. The admin backend already has the {site} parameter included and if you add it again, you get the error above.

MSchrading
Posts: 19
Joined: 14 Aug 2019, 08:13

Re: Multishop - Configuration

Post by MSchrading » 24 Jan 2020, 10:08

I set it exactly like you said.

In routes/aimeos_shop.yaml:

aimeos_shop:
resource: "@AimeosShopBundle/Resources/config/routing.yml"
prefix: /{site}/
defaults: { site: 'default' }

aimeos_shop_admin:
path: /admin
defaults: { _controller: AimeosShopBundle:Admin:index }

aimeos_shop_admin_check:
path: /admin_check

This will always extens the route with /admin/{site}/jqadm/file/{type}

mmmhh

Post Reply