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


PHP Mage_Wishlist_Model_Wishlist::getItemCollection方法代码示例

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


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

示例1: getWishlist

 public function getWishlist()
 {
     if (!$this->_wishlist) {
         $this->_wishlist = AO::getModel('wishlist/wishlist')->loadByCustomer(AO::getSingleton('customer/session')->getCustomer());
         $this->_wishlist->getItemCollection()->addAttributeToSelect('name')->addAttributeToSelect('price')->addAttributeToSelect('small_image')->addAttributeToFilter('store_id', array('in' => $this->_wishlist->getSharedStoreIds()))->addAttributeToSort('added_at', 'desc')->setCurPage(1)->setPageSize(3)->load();
     }
     return $this->_wishlist->getItemCollection();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:8,代码来源:Account_Dashboard_Sidebar.php

示例2: fetchItemsCount

 /**
  * Fetch items count
  *
  * @param Mage_Wishlist_Model_Wishlist $wishlist
  * @return int
  */
 public function fetchItemsCount(Mage_Wishlist_Model_Wishlist $wishlist)
 {
     if (is_null($this->_itemsCount)) {
         $collection = $wishlist->getItemCollection()->addStoreFilter()->setVisibilityFilter();
         $this->_itemsCount = $collection->getSize();
     }
     return $this->_itemsCount;
 }
开发者ID:njaeger,项目名称:magento_github,代码行数:14,代码来源:Wishlist.php

示例3: getWishlistItemCount

 /**
  * Retrieve number of wishlist items in given wishlist
  *
  * @param Mage_Wishlist_Model_Wishlist $wishlist
  * @return int
  */
 public function getWishlistItemCount(Mage_Wishlist_Model_Wishlist $wishlist)
 {
     $collection = $wishlist->getItemCollection();
     if (Mage::getStoreConfig(self::XML_PATH_WISHLIST_LINK_USE_QTY)) {
         $count = $collection->getItemsQty();
     } else {
         $count = $collection->getSize();
     }
     return $count;
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:16,代码来源:Data.php

示例4: _filterWishlist

 /**
  * @param Mage_Wishlist_Model_Wishlist $wishlist
  *
  * @return Bronto_Common_Model_Email_Template_Filter
  */
 protected function _filterWishlist(Mage_Wishlist_Model_Wishlist $wishlist)
 {
     if (!in_array('wishlist', $this->_filteredObjects)) {
         $index = 1;
         foreach ($wishlist->getItemCollection() as $item) {
             if (!$item->getParentItem()) {
                 $this->_filterWishlistItem($item, $index);
                 $index++;
             }
         }
         // Add Related Content
         $this->_items = $wishlist->getItemCollection();
         $queryParams = $this->getQueryParams();
         $queryParams['wishlist_id'] = urlencode(base64_encode(Mage::helper('core')->encrypt($wishlist->getId())));
         if ($store = $this->getStore()) {
             $this->setField('wishlistURL', $store->getUrl('reminder/load/index', $queryParams));
         } else {
             $this->setField('wishlistURL', Mage::getUrl('reminder/load/index', $queryParams));
         }
         // Setup wishlist items as a template
         if (class_exists('Bronto_Reminder_Block_Wishlist_Items', false)) {
             $layout = Mage::getSingleton('core/layout');
             /* @var $items Mage_Sales_Block_Items_Abstract */
             $items = $layout->createBlock('bronto/bronto_reminder_wishlist_items', 'items');
             $items->setTemplate('bronto/reminder/items.phtml');
             $items->setWishlist($item->getWishlist());
             $this->_respectDesignTheme();
             $this->setField("wishlistItems", $items->toHtml());
         }
         $this->_filteredObjects[] = 'wishlist';
     }
     return $this;
 }
开发者ID:bevello,项目名称:bevello,代码行数:38,代码来源:Filter.php


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