本文整理汇总了PHP中Mage_Wishlist_Model_Wishlist::getSharedStoreIds方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Wishlist_Model_Wishlist::getSharedStoreIds方法的具体用法?PHP Mage_Wishlist_Model_Wishlist::getSharedStoreIds怎么用?PHP Mage_Wishlist_Model_Wishlist::getSharedStoreIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Wishlist_Model_Wishlist
的用法示例。
在下文中一共展示了Mage_Wishlist_Model_Wishlist::getSharedStoreIds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: fetchItemsCount
public function fetchItemsCount(Mage_Wishlist_Model_Wishlist $wishlist)
{
$read = $this->_getReadAdapter();
$select = $read->select()->from($this->getTable('wishlist/item'), 'count(*)')->where('wishlist_id=?', $wishlist->getId())->where('store_id in (?)', $wishlist->getSharedStoreIds());
return $read->fetchOne($select);
}
示例3: addWishlistFilter
/**
* Add wishlist filter to collection
*
* @param Mage_Wishlist_Model_Wishlist $wishlist
* @return Mage_Wishlist_Model_Mysql4_Product_Collection
*/
public function addWishlistFilter(Mage_Wishlist_Model_Wishlist $wishlist)
{
$this->_joinFields['e_id'] = array('table' => 'e', 'field' => 'entity_id');
$this->joinTable('wishlist/item', 'product_id=e_id', array('product_id' => 'product_id', 'wishlist_item_description' => 'description', 'store_id' => 'store_id', 'added_at' => 'added_at', 'wishlist_id' => 'wishlist_id', 'wishlist_item_id' => 'wishlist_item_id'), array('wishlist_id' => $wishlist->getId(), 'store_id' => array('in' => $wishlist->getSharedStoreIds())));
return $this;
}