0

I have a 1.9.3.8 multistore set up at a temporary domain, with several websites set up within the multistore. These websites broken up by brick and mortar location, for what it's worth.

The homepage of the default website is a typical homepage with a banner and whatnot. But the homepage for any location is the root category with layered navigation (using amasty's plugin for this. We are also using cart2quote, but I doubt that's causing the issue. In any case, I have disabled these plugins temporarily, and the problem I'm having remains.)

The problem is that when I load one of the locations, the homepage is the original default home page! I did some digging into that: The $mageRunCode and $mageRunType are both being set properly in the index.php file. However, when I check Mage::app()->getWebsite()->getName(), the value is the default website! This means that all my config values are pointing to the wrong scope! Why would this happen?! I'm flabbergasted. Anyone ever experienced this? Am I missing something?

1 Answer 1

0
  1. For the multiple website config, Add the code bellow in your index.php right before Mage::run($mageRunCode, $mageRunType);

    switch($_SERVER['HTTP_HOST']) {
        case 'domain1.com':
        case 'www.domain1.com':
            $mageRunCode = 'domain1_com';
            $mageRunType = 'website';
        break;
        case 'domain2.com':
        case 'www.domain2.com':
            $mageRunCode = 'domain2_com';
            $mageRunType = 'website';
        break;
    }
    

    Don't forget to point your domaine urls in your Vhost.

  2. For the homepage, you can can config the homepage per website in : System > Configuration > General > Web > Default Page.

  3. Clean the cache.

1
  • I have done this already and the same issue is happening. The $mageRunCode and $mageRunType are correct, however the actual loaded website remains default. I know this because in step 2, I have the default page settings set to the category page, and when I check that config value, it still shows the default settings. I have cache turned off, however, I clear it every time. Sep 4, 2018 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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