Ejemplo n.º 1
0
 public function getCacheKeyInfo()
 {
     $info = parent::getCacheKeyInfo();
     $info[] = Mage::app()->getStore()->getCurrentCurrencyCode();
     $info[] = Mage::getSingleton('customer/session')->getCustomerGroupId();
     $info[] = $this->getProduct()->getId();
     return $info;
 }
Ejemplo n.º 2
0
 /**
  * Get cache key informative items with the position number to differentiate
  *
  * @return array
  */
 public function getCacheKeyInfo()
 {
     $cacheKeyInfo = parent::getCacheKeyInfo();
     foreach (Mage::app()->getLayout()->getXpath('//action[@method="addPriceBlockType"]') as $element) {
         if (!empty($element->type)) {
             $prefix = 'price_block_type_' . (string) $element->type;
             $cacheKeyInfo[$prefix . '_block'] = empty($element->block) ? '' : (string) $element->block;
             $cacheKeyInfo[$prefix . '_template'] = empty($element->template) ? '' : (string) $element->template;
         }
     }
     $cacheKeyInfo[] = $this->getPosition();
     return $cacheKeyInfo;
 }
Ejemplo n.º 3
0
 /**
  * Get cache key informative items with the position number to differentiate
  *
  * @return array
  */
 public function getCacheKeyInfo()
 {
     $cacheKeyInfo = parent::getCacheKeyInfo();
     $elements = Mage::app()->getLayout()->getXpath('//action[@method="addPriceBlockType"]');
     if (is_array($elements)) {
         foreach ($elements as $element) {
             if (!empty($element->type)) {
                 $prefix = 'price_block_type_' . (string) $element->type;
                 $cacheKeyInfo[$prefix . '_block'] = empty($element->block) ? '' : (string) $element->block;
                 $cacheKeyInfo[$prefix . '_template'] = empty($element->template) ? '' : (string) $element->template;
             }
         }
     }
     $cacheKeyInfo[] = $this->getPosition();
     if (!is_null($this->getItem())) {
         $cacheKeyInfo['item_id'] = $this->getItem()->getId();
     }
     return $cacheKeyInfo;
 }
 /**
  * Cache this block for each product separately
  * 
  * @return array
  */
 public function getCacheKeyInfo()
 {
     $info = parent::getCacheKeyInfo();
     $info[] = 'PRODUCT_' . $this->getProduct()->getId();
     return $info;
 }
Ejemplo n.º 5
0
 public function getCacheKeyInfo()
 {
     return array_merge(parent::getCacheKeyInfo(), array(Mage::getSingleton('customer/session')->getCustomerGroupId(), ($product = $this->getProduct()) ? $product->getId() : null, $this->getData('attribute_code'), $this->getData('product_count')));
 }