Public Member Functions | |
setWishlistTable ($value) | |
getWishlistTable () | |
getWishlistCustomerCount () | |
getSharedCount () | |
Protected Member Functions | |
_construct () | |
Protected Attributes | |
$wishlistTable |
Definition at line 35 of file Collection.php.
_construct | ( | ) | [protected] |
Initialization here
Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.
Definition at line 50 of file Collection.php.
00051 { 00052 $this->_init('wishlist/wishlist'); 00053 00054 $this->setWishlistTable(Mage::getSingleton('core/resource')->getTableName('wishlist/wishlist')); 00055 }
getSharedCount | ( | ) |
Definition at line 73 of file Collection.php.
00074 { 00075 $collection = Mage::getResourceModel('customer/customer_collection'); 00076 $collection->getSelect()->from(array('wt' => $this->getWishlistTable())) 00077 ->where('wt.customer_id=e.entity_id') 00078 ->where('wt.shared=1') 00079 ->group('wt.wishlist_id'); 00080 $collection->load(); 00081 return $collection->count(); 00082 }
getWishlistCustomerCount | ( | ) |
Definition at line 57 of file Collection.php.
00058 { 00059 $collection = Mage::getResourceModel('customer/customer_collection'); 00060 $collection->load(); 00061 00062 $customers = $collection->count(); 00063 00064 $collection = Mage::getResourceModel('customer/customer_collection'); 00065 $collection->getSelect()->from(array('wt' => $this->getWishlistTable())) 00066 ->where('wt.customer_id=e.entity_id') 00067 ->group('wt.wishlist_id'); 00068 $collection->load(); 00069 $count = $collection->count(); 00070 return array(($count*100)/$customers, $count); 00071 }
getWishlistTable | ( | ) |
setWishlistTable | ( | $ | value | ) |
$wishlistTable [protected] |
Definition at line 37 of file Collection.php.