本文整理汇总了PHP中Mage_Catalog_Block_Product_Abstract::getCacheKeyInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Block_Product_Abstract::getCacheKeyInfo方法的具体用法?PHP Mage_Catalog_Block_Product_Abstract::getCacheKeyInfo怎么用?PHP Mage_Catalog_Block_Product_Abstract::getCacheKeyInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Catalog_Block_Product_Abstract
的用法示例。
在下文中一共展示了Mage_Catalog_Block_Product_Abstract::getCacheKeyInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCacheKeyInfo
public function getCacheKeyInfo()
{
$info = parent::getCacheKeyInfo();
$info[] = Mage::app()->getStore()->getCurrentCurrencyCode();
$info[] = Mage::getSingleton('customer/session')->getCustomerGroupId();
$info[] = $this->getProduct()->getId();
return $info;
}
示例2: getCacheKeyInfo
/**
* 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;
}
示例3: getCacheKeyInfo
/**
* 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;
}
示例4: getCacheKeyInfo
/**
* Cache this block for each product separately
*
* @return array
*/
public function getCacheKeyInfo()
{
$info = parent::getCacheKeyInfo();
$info[] = 'PRODUCT_' . $this->getProduct()->getId();
return $info;
}
示例5: getCacheKeyInfo
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')));
}