Exemplo n.º 1
0
 /**
  * Initializes the object
  *
  * @param \Aimeos\MShop\Context\Item\Iface $context Context object
  */
 public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
 {
     parent::__construct($context);
     $manager = \Aimeos\MShop\Factory::createManager($context, 'catalog');
     $result = $manager->searchItems($manager->createSearch());
     foreach ($result as $id => $item) {
         $this->categories[$item->getCode()] = $id;
     }
 }
Exemplo n.º 2
0
 /**
  * Initializes the object
  *
  * @param \Aimeos\MShop\Context\Item\Iface $context Context object
  */
 public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
 {
     parent::__construct($context);
     $manager = \Aimeos\MShop\Factory::createManager($context, 'product/stock/warehouse');
     $search = $manager->createSearch();
     $search->setSlice(0, 1000);
     foreach ($manager->searchItems($search) as $id => $item) {
         $this->warehouses[$item->getCode()] = $id;
     }
 }