当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Catalog_Model_Category::getCustomLayoutUpdate方法代码示例

本文整理汇总了PHP中Mage_Catalog_Model_Category::getCustomLayoutUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Model_Category::getCustomLayoutUpdate方法的具体用法?PHP Mage_Catalog_Model_Category::getCustomLayoutUpdate怎么用?PHP Mage_Catalog_Model_Category::getCustomLayoutUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Catalog_Model_Category的用法示例。


在下文中一共展示了Mage_Catalog_Model_Category::getCustomLayoutUpdate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _applyCustomDesignSettings

 /**
  * Recursively apply custom design settings to product if it's container
  * category custom_use_for_products option is setted to 1.
  * If not or product shows not in category - applyes product's internal settings
  *
  * @deprecated after 1.4.2.0-beta1, functionality moved to Mage_Catalog_Model_Design
  * @param Mage_Catalog_Model_Category|Mage_Catalog_Model_Product $object
  * @param Mage_Core_Model_Layout_Update $update
  */
 protected function _applyCustomDesignSettings($object, $update)
 {
     if ($object instanceof Mage_Catalog_Model_Category) {
         // lookup the proper category recursively
         if ($object->getCustomUseParentSettings()) {
             $parentCategory = $object->getParentCategory();
             if ($parentCategory && $parentCategory->getId() && $parentCategory->getLevel() > 1) {
                 $this->_applyCustomDesignSettings($parentCategory, $update);
             }
             return;
         }
         // don't apply to the product
         if (!$object->getCustomApplyToProducts()) {
             return;
         }
     }
     if ($this->_designProductSettingsApplied) {
         return;
     }
     $date = $object->getCustomDesignDate();
     if (array_key_exists('from', $date) && array_key_exists('to', $date) && Mage::app()->getLocale()->isStoreDateInInterval(null, $date['from'], $date['to'])) {
         if ($object->getPageLayout()) {
             $this->_designProductSettingsApplied['layout'] = $object->getPageLayout();
         }
         $this->_designProductSettingsApplied['update'] = $object->getCustomLayoutUpdate();
     }
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:36,代码来源:IndexController.php

示例2: _applyCustomDesignSettings

 /**
  * Recursively apply custom design settings to category if it's option
  * custom_use_parent_settings is setted to 1 while parent option is not
  *
  * @deprecated after 1.4.2.0-beta1, functionality moved to Mage_Catalog_Model_Design
  * @param Mage_Catalog_Model_Category $category
  * @param Mage_Core_Model_Layout_Update $update
  *
  * @return Mage_Catalog_CategoryController
  */
 protected function _applyCustomDesignSettings($category, $update)
 {
     if ($category->getCustomUseParentSettings() && $category->getLevel() > 1) {
         $parentCategory = $category->getParentCategory();
         if ($parentCategory && $parentCategory->getId()) {
             return $this->_applyCustomDesignSettings($parentCategory, $update);
         }
     }
     $validityDate = $category->getCustomDesignDate();
     if (array_key_exists('from', $validityDate) && array_key_exists('to', $validityDate) && Mage::app()->getLocale()->isStoreDateInInterval(null, $validityDate['from'], $validityDate['to'])) {
         if ($category->getPageLayout()) {
             $this->getLayout()->helper('page/layout')->applyHandle($category->getPageLayout());
         }
         $update->addUpdate($category->getCustomLayoutUpdate());
     }
     return $this;
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:27,代码来源:CategoryController.php

示例3: _extractSettings

 /**
  * Extract custom layout settings from category or product object
  *
  * @param Mage_Catalog_Model_Category|Mage_Catalog_Model_Product $object
  * @return Varien_Object
  */
 protected function _extractSettings($object)
 {
     $settings = new Varien_Object();
     if (!$object) {
         return $settings;
     }
     $date = $object->getCustomDesignDate();
     if (array_key_exists('from', $date) && array_key_exists('to', $date) && Mage::app()->getLocale()->isStoreDateInInterval(null, $date['from'], $date['to'])) {
         $settings->setCustomDesign($object->getCustomDesign())->setPageLayout($object->getPageLayout())->setLayoutUpdates((array) $object->getCustomLayoutUpdate());
     }
     return $settings;
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:18,代码来源:Design.php


注:本文中的Mage_Catalog_Model_Category::getCustomLayoutUpdate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。