Beispiel #1
0
 /**
  * Retrieve block title
  *
  * @return string
  */
 public function getTitle()
 {
     if ($this->_getHelper()->isMultipleEnabled()) {
         return $this->__('My Wishlists <small>(%d)</small>', $this->getItemCount());
     } else {
         return parent::getTitle();
     }
 }
 public function getItemRemoveUrl($item)
 {
     if (Mage::helper('flycart')->isActivated()) {
         return 'javascript:ajaxcartConfig.deleteWishlistItem(\'' . $this->getUrl('flycart/index/removeWishlistItem', array('item' => $item->getWishlistItemId())) . '\')';
     } else {
         return parent::getItemRemoveUrl($item);
     }
 }
Beispiel #3
0
 /**
  * Prepare before to html
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (version_compare(Mage::getVersion(), '1.4.0.1', '>=')) {
         if ($this->_getHelper()->hasItems()) {
             return parent::_toHtml();
         }
         return '<div class="block block-wishlist" style="display:none;"><div class="block-title"><strong><span>My Wishlist <small>(0)</small></span></strong></div><div class="block-content"><p class="block-subtitle">Last Added Items</p><p class="empty">You have no items in your wishlist.</p></div></div>';
     } else {
         if (sizeof($this->getWishlistItems()->getItems()) > 0) {
             return parent::_toHtml();
         }
         return '<div class="box base-mini mini-wishlist" style="display:none;"><div class="block-title"><strong><span>My Wishlist <small>(0)</small></span></strong></div><div class="block-content"><p class="block-subtitle">Last Added Items</p><p class="empty">You have no items in your wishlist.</p></div></div>';
     }
 }
Beispiel #4
0
 /**
  * Prepare before to html
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (version_compare(Mage::getVersion(), '1.4.0.1', '>=')) {
         if ($this->_getHelper()->hasItems()) {
             return parent::_toHtml();
         }
         //return ''; //default return '' va` gay ra hien tuong la mat box mini wishlist duoi box minicart, va khi add wishlist se ko tim thay box nay ,nen o duoi' ta da return ve 1 box mini wishlist va dat o che do hidden neu ko co item nao trong wishlist
         return '<div class="block block-wishlist" style="display:none;"><div class="block-title"><strong><span>My Wishlist <small>(0)</small></span></strong></div><div class="block-content"><p class="block-subtitle">Last Added Items</p><p class="empty">You have no items in your wishlist.</p></div></div>';
     } else {
         if (sizeof($this->getWishlistItems()->getItems()) > 0) {
             return parent::_toHtml();
         }
         return '<div class="box base-mini mini-wishlist" style="display:none;"><div class="block-title"><strong><span>My Wishlist <small>(0)</small></span></strong></div><div class="block-content"><p class="block-subtitle">Last Added Items</p><p class="empty">You have no items in your wishlist.</p></div></div>';
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('callforprice/listcart.phtml');
 }
 /**
  * Retrieve cache tags
  *
  * @return array
  */
 public function getCacheTags()
 {
     return array_merge(parent::getCacheTags(), $this->getItemsTags($this->getWishlistItems()));
 }
 public function getProductUrl($item, $additional = array())
 {
     $product = $item instanceof Mage_Catalog_Model_Product ? $item : $item->getProduct();
     return $product->isVisibleInSiteVisibility() ? $this->getItemConfigureUrl($item) : parent::getProductUrl($item, $additional);
 }
Beispiel #8
0
 /**
  * @param string $html
  * @param Mage_Wishlist_Block_Customer_Sidebar $block
  * @return string
  */
 private function _processWishListSidebar($html, $block)
 {
     $helper = $this->_getHelper();
     /** @var $processor Mageplace_Callforprice_Model_Htmlprocessor_Interface */
     $processor = Mage::getModel('mageplace_callforprice/htmlprocessor_factory')->createProcessor();
     $processor->load($html);
     if ($helper->isGlobalEnabled()) {
         $processor->replace($helper->getCssSelector('my_wishlist_product_price'), $helper->prepareReplacement());
         $processor->remove($helper->getCssSelector('my_wishlist_product_addtocart'));
         return $processor->getHtml();
     }
     $processor->process('mywishlist', array('products' => $block->getWishlistItems()));
     return $processor->getHtml();
 }