0

I have setup two stores in Magento 2.2.6, each store have their own theme and url address.

In one store I have Porto theme installed in the second store I have other theme.

How I can disable for example Porto theme / modules in the second store?

Thank you

  • I guess its closed because M1 answer from Marius is also correct for M2. – sv3n Oct 4 '18 at 10:09
  • but where you have System->configuration->Advanced->Advanced to turn off modules in M2 for example? – Robert Oct 4 '18 at 10:22
  • As far as I know these options do not exist in M2. I think you have to add config options fur your modules. However, vote to reopen. – sv3n Oct 4 '18 at 10:32
  • @Robert , though I vote for reopen but same answer applies for magento 2 as well – Murtuza Zabuawala Oct 4 '18 at 10:36
  • thank you @MurtuzaZabuawala maybe someone will have an idea. – Robert Oct 4 '18 at 10:55
2

From Magento 2.2.* Now Advanced Menu is no longer available. You cant got those options from Configuration.

The ability to disable module output has been removed from Admin. You disabled module output from Admin in a previous release of 2.0.x and 2.1.x, Now you must manually configure these settings from app/etc/config.php file.

So Unless the module comes with an enable/disable setting that can be set per store view this is to my knowledge not something Magento provides as an out of the box capability.

0

I found a work around for this. It is by no means the "right" way to controle module output per store view but I could not find anything else that worked, app > etc > config.php:

<?php
if(getenv('HTTP_HOST')) {
    switch(getenv('HTTP_HOST')) {
        case 'dev1.domain.com':
        case 'staging1.domain.com':
            return [
                'modules' => [
                      'Magento_EXAMPLE1' => 1,
                      'Magento_EXAMPLE2' => 1,
                      'Magento_EXAMPLE3' => 1,
                      'Magento_EXAMPLE4' => 0,            
                  ]
            ];
            break;


        case 'dev2.domain.com':
        case 'staging2.domain.com':
            return [
                    'modules' => [
                      'Magento_EXAMPLE1' => 1,
                      'Magento_EXAMPLE2' => 0,
                      'Magento_EXAMPLE3' => 1,
                      'Magento_EXAMPLE4' => 0,            
                  ]
            ];
            break;
    }
} else {
    return [
        'modules' => [
            'Magento_EXAMPLE1' => 1,
            'Magento_EXAMPLE2' => 1,
            'Magento_EXAMPLE3' => 1,
            'Magento_EXAMPLE4' => 1,            
        ]
    ];
}

It runs the else on any php bin/magento commands and runs the switch on renders, works with Varnish, ElasticSearch5 and Redis the way it is configured on our servers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.