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


PHP Mage_Wishlist_Block_Abstract类代码示例

本文整理汇总了PHP中Mage_Wishlist_Block_Abstract的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Wishlist_Block_Abstract类的具体用法?PHP Mage_Wishlist_Block_Abstract怎么用?PHP Mage_Wishlist_Block_Abstract使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testImage

 /**
  * @magentoDataFixture Mage/Catalog/_files/product_with_image.php
  */
 public function testImage()
 {
     $product = new Mage_Catalog_Model_Product();
     $product->load(1);
     $size = $this->_block->getImageSize();
     $this->assertGreaterThan(1, $size);
     $this->assertContains('/' . $size, $this->_block->getImageUrl($product));
     $this->assertStringEndsWith('magento_image.jpg', $this->_block->getImageUrl($product));
 }
开发者ID:nemphys,项目名称:magento2,代码行数:12,代码来源:AbstractTest.php

示例2: _toHtml

 /**
  * Retrieve block html
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->isEnabled()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:Column.php

示例3: _toHtml

 /**
  * Build block html
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (Mage::helper('enterprise_wishlist')->isMultipleEnabled() && $this->isWishlistDeleteable()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:12,代码来源:Delete.php

示例4: _toHtml

 /**
  * Prepare before to html
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->getItemCount()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:natxetee,项目名称:magento2,代码行数:12,代码来源:Sidebar.php

示例5: _toHtml

 /**
  * Prepare before to html
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->_getHelper()->hasItems()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:12,代码来源:Sidebar.php

示例6: hasDescription

 /**
  * Check whether whishlist item has description
  *
  * @param Mage_Wishlist_Model_Item $item
  * @return bool
  */
 public function hasDescription($item)
 {
     $hasDescription = parent::hasDescription($item);
     if ($hasDescription) {
         return $item->getDescription() !== Mage::helper('wishlist')->defaultCommentString();
     }
     return $hasDescription;
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:14,代码来源:Items.php

示例7: _prepareLayout

 /**
  * Preparing global layout
  *
  * @return Mage_Wishlist_Block_Customer_Wishlist
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $headBlock = $this->getLayout()->getBlock('head');
     if ($headBlock) {
         $headBlock->setTitle($this->__('My Wishlist'));
     }
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:13,代码来源:Wishlist.php

示例8: _getWishlist

 /**
  * Retrieve Wishlist model
  *
  * @return Mage_Wishlist_Model_Wishlist
  */
 protected function _getWishlist()
 {
     if (!$this->getCustomWishlist() || !is_null($this->_wishlist)) {
         return parent::_getWishlist();
     }
     $this->_wishlist = $this->getCustomWishlist();
     return $this->_wishlist;
 }
开发者ID:relue,项目名称:magento2,代码行数:13,代码来源:Sidebar.php

示例9: _prepareLayout

 /**
  * Prepare global layout
  *
  * @return Mage_Wishlist_Block_Share_Wishlist
  *
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $headBlock = $this->getLayout()->getBlock('head');
     if ($headBlock) {
         $headBlock->setTitle($this->getHeader());
     }
     return $this;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:15,代码来源:Wishlist.php

示例10: getProductUrl

 /**
  * Retrieve Product View URL
  *
  * @param Mage_Catalog_Model_Product $product
  * @param array $additional
  * @return string
  */
 public function getProductUrl($product, $additional = array())
 {
     $additional['_rss'] = true;
     return parent::getProductUrl($product, $additional);
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:Wishlist.php

示例11: getCacheTags

 /**
  * Retrieve cache tags
  *
  * @return array
  */
 public function getCacheTags()
 {
     if ($this->getItemCount()) {
         $this->addModelTags($this->_getHelper()->getWishlist());
     }
     return parent::getCacheTags();
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:12,代码来源:Sidebar.php

示例12: _toHtml

 /**
  * Render block html
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->setOptionList($this->getConfiguredOptions());
     return parent::_toHtml();
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:10,代码来源:Options.php

示例13: _toHtml

 /**
  * Render block html
  *
  * @return string
  */
 protected function _toHtml()
 {
     $cfg = $this->getOptionsRenderCfg($this->getItem()->getProduct()->getTypeId());
     if (!$cfg) {
         return '';
     }
     $helper = Mage::helper($cfg['helper']);
     if (!$helper instanceof Mage_Catalog_Helper_Product_Configuration_Interface) {
         Mage::throwException($this->__("Helper for wishlist options rendering doesn't implement required interface."));
     }
     if ($cfg['template']) {
         $template = $cfg['template'];
     } else {
         $cfgDefault = $this->getOptionsRenderCfg('default');
         if (!$cfgDefault) {
             return '';
         }
         $template = $cfgDefault['template'];
     }
     $this->setTemplate($template)->setOptionList($helper->getOptions($this->getItem()));
     return parent::_toHtml();
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:27,代码来源:Options.php


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