×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: bejoy balan
Added: Nov 1, 2017 6:07 AM
Modified: Nov 1, 2017 6:08 AM
Views: 2
Tags: no tags
  1. foreach ($stores as $store) {
  2.            // try {
  3.                 Mage::reset();
  4.                 Mage::app();
  5.  
  6.                 //$this->log(sprintf('Starting environment for store %s', $store->getName()));
  7.                 $appEmulation = Mage::getModel('core/app_emulation');
  8.                 $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store->getId());
  9.   // contens
  10.   // end emulation
  11.                 $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
  12.                 }