Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. domain.com/website1/store1
  2. domain.com/website1/store2
  3.  
  4. domain.com/website2/store1
  5. domain.com/website2/store2
  6.  
  7. $mageFilename = MAGENTO_ROOT . '/app/Mage.php';
  8.  
  9. $mageFilename = '../app/Mage.php';
  10.  
  11. /* Store or website code */
  12. $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
  13.  
  14. /* Run store or run website */
  15. $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
  16.  
  17. Mage::run($mageRunCode, $mageRunType);
  18.  
  19. Mage::run('website1_code_goes_here', 'website');
  20.  
  21. $mageFilename = MAGENTO_ROOT . '/app/Mage.php';
  22.  
  23. $mageFilename = '../../app/Mage.php';
  24.  
  25. /* Store or website code */
  26. $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
  27.  
  28. /* Run store or run website */
  29. $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
  30.  
  31. Mage::run($mageRunCode, $mageRunType);
  32.  
  33. Mage::run('store1_id_goes_here', 'store');
  34.  
  35. require realpath(__DIR__) . '/../app/bootstrap.php';
  36. $params = $_SERVER;
  37. $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = 'web2_website';
  38. $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = 'website';
  39. $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $params);
  40. $app = $bootstrap->createApplication('MagentoFrameworkAppHttp');
  41. $bootstrap->run($app);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement