本文整理汇总了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));
}
示例2: _toHtml
/**
* Retrieve block html
*
* @return string
*/
protected function _toHtml()
{
if ($this->isEnabled()) {
return parent::_toHtml();
}
return '';
}
示例3: _toHtml
/**
* Build block html
*
* @return string
*/
protected function _toHtml()
{
if (Mage::helper('enterprise_wishlist')->isMultipleEnabled() && $this->isWishlistDeleteable()) {
return parent::_toHtml();
}
return '';
}
示例4: _toHtml
/**
* Prepare before to html
*
* @return string
*/
protected function _toHtml()
{
if ($this->getItemCount()) {
return parent::_toHtml();
}
return '';
}
示例5: _toHtml
/**
* Prepare before to html
*
* @return string
*/
protected function _toHtml()
{
if ($this->_getHelper()->hasItems()) {
return parent::_toHtml();
}
return '';
}
示例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;
}
示例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'));
}
}
示例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;
}
示例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;
}
示例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);
}
示例11: getCacheTags
/**
* Retrieve cache tags
*
* @return array
*/
public function getCacheTags()
{
if ($this->getItemCount()) {
$this->addModelTags($this->_getHelper()->getWishlist());
}
return parent::getCacheTags();
}
示例12: _toHtml
/**
* Render block html
*
* @return string
*/
protected function _toHtml()
{
$this->setOptionList($this->getConfiguredOptions());
return parent::_toHtml();
}
示例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();
}