Jump to content

MultiStore Employee's Configuration


Recommended Posts

Hello,

We're facing a problem on a multistore prestashop 1.7.6.5 . We can't set permission for an employee only for one store. The option was in prestashop 1.7.5.2 .

It's a big issue for us and we don't find any existing solution. Could anyone help us to know why Prestashop removed this option and how to fix it ? 

Thank you

Capture d’écran 2020-07-09 à 10.35.21.png

Capture d’écran 2020-07-09 à 10.36.09.png

Link to comment
Share on other sites

  • 8 months later...
  • 1 year later...

Hi. I have added a new PR for this. You can check in here:
https://github.com/PrestaShop/PrestaShop/pull/29342

you need to add these line:

        $associatedShops = $this->getContext()->employee->getAssociatedShops();

        foreach ($groupList as &$group) {
            $group = $group;
            foreach ($group->getShops() as $key => $shop) {
                if(!in_array($shop->getId(), $associatedShops)) {
                    $group->getShops()->offsetUnset($key);
                }
            }
        }

after this:

        $groupList = [];
        if (!$lockedToAllShopContext) {
            $groupList = $this->entityManager->getRepository(ShopGroup::class)->findBy(['active' => true]);
        }

in this file:

src/PrestaShopBundle/Controller/Admin/MultistoreController.php

I have added this in 1.7.8.6

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...