How can i disable Magento module at run time?

I am using custom checkout module. When user selects a specific category I would like to use default checkout module.

Is it possible to run two checkout engines.


Here is an idea.
Have the 2 modules on separate urls and then do a check in the controller to see on which url you should go.

Something like (put this in a helper):

public function canUseExtensionCheckout() {
    if (confition for extension use) {
         return true;
    return false;

Then in the extension controller add this:

if (!Mage::helper('some_helper')->canUseExtensionCheckout()) {
    $this->_redirect(default checkout url)

and in the default checkout controller:

if (Mage::helper('some_helper')->canUseExtensionCheckout()) {
    $this->_redirect(extension checkout url)

Similar questions

Difference between cron:run and setup:cron:run
It is documented to set up two cron jobs for Magento 2 What is the difference between those both? Which one is responsible for the indexers?
Does composer dump-autoload -o need to be run after setup:di:compile if composer install --optiomize-autoloader hase been run before
Every thing is in the title : Does composer dump-autoload -o really need to be run after setup:di:compile as the official document seem to pretend : But if composer install --optimize-autoloader has been run before, the autoload dump is already done, i don't see relati...
Magento2 which command Run and when to Run
Kindly Clear Difference Between php bin/magento cache:flush and cache:clean and when they need to Run . which tasks Output to need cache:flush or clean ** and which task need these Commands => **di:compile,setup:upgrade,setup:static-content:deploy I consume 4 to 5 min to run cache:flush,upgrade and deploy.
PWA studio yarn run watch:venia give error while run on server
i am just trying to setup PWA studio at my server and i am getting bellow error while run bellow command yarn run watch:venia Can any home have idea how to setup on server ? i am using bluehost VPN server for magento 2 and everything setup but not able to run yarn run watch:venia Anyone please help
After running yarn run watch:venia the command run successfully and got the build url but getting error response as mentioned below:
i have set the urls as: But Getting Error Response In Browser message "Error: ServiceResolver: Request to failed: ServerParseError: Unexpected token < in JSON at position 8\n at makePromise.then.catch.e (/var/www/html/magento/pwa-studio/packages/upward-js/lib/resolvers/ServiceResolver.js:105:23)\n at process._tick...
Sending PDF via email works when command run on console, but not when run by a cron job
I've become stuck, I want to send a custom report via email in a pdf format. It's strange because it works correctly when I run the command via the console, but when it's run via a cron job nothing happens. I'll appreciate it greatly if someone can point me in the right direction. P.S. I know the cron functions correctly as it works perfectly if th...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.