Public Member Functions | |
loadByProductWishlist (Mage_Wishlist_Model_Item $item, $wishlistId, $productId, array $sharedStores) | |
Protected Member Functions | |
_construct () | |
Protected Attributes | |
$_productIdFieldName = 'product_id' |
Definition at line 35 of file Item.php.
_construct | ( | ) | [protected] |
Resource initialization
Reimplemented from Mage_Core_Model_Resource_Abstract.
Definition at line 40 of file Item.php.
00041 { 00042 $this->_init('wishlist/item', 'wishlist_item_id'); 00043 }
loadByProductWishlist | ( | Mage_Wishlist_Model_Item $ | item, | |
$ | wishlistId, | |||
$ | productId, | |||
array $ | sharedStores | |||
) |
Definition at line 45 of file Item.php.
00046 { 00047 $select = $this->_getReadAdapter()->select() 00048 ->from(array('main_table'=>$this->getTable('item'))) 00049 ->where('main_table.wishlist_id = ?', $wishlistId) 00050 ->where('main_table.product_id = ?', $productId) 00051 ->where('main_table.store_id in (?)', $sharedStores); 00052 00053 if($_data = $this->_getReadAdapter()->fetchRow($select)) { 00054 $item->setData($_data); 00055 } 00056 00057 return $item; 00058 }