Exemplo n.º 1
0
 private function _condenseProductsPid()
 {
     $data = array();
     $data[0] = array();
     $data[0]['pid'] = \Akzo\Scheme\Utils::condenseProductsPid($this->products);
     return $data;
 }
Exemplo n.º 2
0
 private function _convertProductsToIds($products, $packs, $projectSku)
 {
     $productsKey = '_PRODUCT_' . \Akzo\Scheme\Utils::condenseProductsPid($products);
     // Check if the converted ids are in the cache already
     if ($this->cache->exists($productsKey)) {
         //$GLOBALS['logger']->info('Got productsKey in cache - '.$productsKey);
         return $this->cache->get($productsKey);
     }
     //$GLOBALS['logger']->info('Did not get productsKey in cache - '.$productsKey);
     // Translate products list to product ids
     $translatedIds = \Akzo\Product\Service::getInstance()->transformProductsToIds($products, $projectSku, $packs);
     // Set it in cache
     $this->cache->set($productsKey, $translatedIds);
     $GLOBALS['logger']->info('Prod IDS length: ' . sizeof($translatedIds));
     return $translatedIds;
 }