Wishlist_Counter_By_Synotive - Version 1.1.0

Version Notes

Products Wishlist Counter is stable version. We have tested it many different version.

Download this release

Release Info

Developer Synotive Technologies
Extension Wishlist_Counter_By_Synotive
Version 1.1.0
Comparing to
See all releases


Version 1.1.0

app/code/community/SPL/CounterWishlist/Helper/Data.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SPL
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category SPL
13
+ * @package SPL_CounterWishlist
14
+ * @copyright Copyright (c) 2015 SPL.
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ class SPL_CounterWishlist_Helper_Data extends Mage_Core_Helper_Abstract
19
+ {
20
+
21
+ }
app/code/community/SPL/CounterWishlist/Model/Observer.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SPL
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category SPL
13
+ * @package SPL_CounterWishlist
14
+ * @copyright Copyright (c) 2015 SPL.
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class SPL_CounterWishlist_Model_Observer
18
+ {
19
+
20
+ const ENABLEWISHLIST = 'catalog/spl_saleswishlistcounter/enabledwishlist';
21
+
22
+
23
+ public function catalogProductLoadAfter(Varien_Event_Observer $observer)
24
+ {
25
+ if (Mage::getStoreConfigFlag(self::ENABLEWISHLIST)) {
26
+ $productId = $observer->getProduct()->getId();
27
+ $wishlist = Mage::getModel('wishlist/item')->getCollection();
28
+ $wishlist->getSelect()
29
+ ->join(array('t2' => 'wishlist'),
30
+ 'main_table.wishlist_id = t2.wishlist_id',
31
+ array('wishlist_id','customer_id'))
32
+ ->where('main_table.product_id = '. $productId);
33
+ $count = $wishlist->getSize();
34
+ $observer->getProduct()->setWishlistCount($count);
35
+ }
36
+ }
37
+
38
+ public function catalogProductCollectionLoadAfter(Varien_Event_Observer $observer)
39
+ {
40
+ if (Mage::getStoreConfigFlag(self::ENABLEWISHLIST)) {
41
+ $productCollection = $observer->getCollection();
42
+ foreach ($productCollection as $product) {
43
+ $productId = $product->getId();
44
+ $wishlist = Mage::getModel('wishlist/item')->getCollection();
45
+ $wishlist->getSelect()
46
+ ->join(array('t2' => 'wishlist'),
47
+ 'main_table.wishlist_id = t2.wishlist_id',
48
+ array('wishlist_id','customer_id'))
49
+ ->where('main_table.product_id = '. $productId);
50
+ $count = $wishlist->getSize();
51
+ $product->setWishlistCount($count);
52
+ }
53
+ }
54
+ }
55
+ }
app/code/community/SPL/CounterWishlist/etc/config.xml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * SPL
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category SPL
14
+ * @package SPL_CounterWishlist
15
+ * @copyright Copyright (c) 2015 SPL.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <SPL_CounterWishlist>
22
+ <version>1.1.0</version>
23
+ </SPL_CounterWishlist>
24
+ </modules>
25
+ <global>
26
+ <helpers>
27
+ <spl_counterwishlist>
28
+ <class>SPL_CounterWishlist_Helper</class>
29
+ </spl_counterwishlist>
30
+ </helpers>
31
+ <models>
32
+ <spl_counterwishlist>
33
+ <class>SPL_CounterWishlist_Model</class>
34
+ </spl_counterwishlist>
35
+ </models>
36
+ </global>
37
+ <frontend>
38
+ <layout>
39
+ <updates>
40
+ <countersales>
41
+ <file>counterwishlist.xml</file>
42
+ </countersales>
43
+ </updates>
44
+ </layout>
45
+ <events>
46
+ <catalog_product_load_after>
47
+ <observers>
48
+ <spl_counterwishlist>
49
+ <type>singleton</type>
50
+ <class>SPL_CounterWishlist_Model_Observer</class>
51
+ <method>catalogProductLoadAfter</method>
52
+ </spl_counterwishlist>
53
+ </observers>
54
+ </catalog_product_load_after>
55
+ <catalog_product_collection_load_after>
56
+ <observers>
57
+ <spl_counterwishlist>
58
+ <type>singleton</type>
59
+ <class>SPL_CounterWishlist_Model_Observer</class>
60
+ <method>catalogProductCollectionLoadAfter</method>
61
+ </spl_counterwishlist>
62
+ </observers>
63
+ </catalog_product_collection_load_after>
64
+ </events>
65
+ </frontend>
66
+ </config>
app/code/community/SPL/CounterWishlist/etc/system.xml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * SPL
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category SPL
14
+ * @package SPL_CounterWishlist
15
+ * @copyright Copyright (c) 2015 SPL.
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <sections>
21
+ <catalog module="spl_counterwishlist" label="label">
22
+ <groups>
23
+ <spl_counterwishlist translate="label">
24
+ <label>Wishlist Counter Settings</label>
25
+ <sort_order>100</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ <fields>
30
+ <enabledwishlist translate="label">
31
+ <label>Enable Wishlist Counter</label>
32
+ <frontend_type>select</frontend_type>
33
+ <source_model>adminhtml/system_config_source_yesno</source_model>
34
+ <sort_order>50</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ </enabledwishlist>
39
+ </fields>
40
+ </spl_counterwishlist>
41
+ </groups>
42
+ </catalog>
43
+ </sections>
44
+ </config>
app/design/frontend/base/default/layout/counterwishlist.xml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+
4
+
5
+ <catalog_product_view translate="label">
6
+ <reference name="product.info.media">
7
+ <action method="setTemplate">
8
+ <template>counterwishlist/media.phtml</template>
9
+ </action>
10
+ </reference>
11
+ </catalog_product_view>
12
+ <catalog_category_default translate="label">
13
+ <reference name="product_list">
14
+ <action method="setTemplate">
15
+ <template>counterwishlist/list.phtml</template>
16
+ </action>
17
+ </reference>
18
+ </catalog_category_default>
19
+ <catalog_category_layered translate="label">
20
+ <reference name="product_list">
21
+ <action method="setTemplate">
22
+ <template>counterwishlist/list.phtml</template>
23
+ </action>
24
+ </reference>
25
+ </catalog_category_layered>
26
+
27
+
28
+ </layout>
29
+
30
+
app/etc/modules/SPL_CounterWishlist.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <SPL_CounterWishlist>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </SPL_CounterWishlist>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Wishlist_Counter_By_Synotive</name>
4
+ <version>1.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Products Wishlist Counter is an awesome way to make your customer engage when stock are low</summary>
10
+ <description>Products Wishlist Counter is an awesome way to make your customer engage when stock are low.</description>
11
+ <notes>Products Wishlist Counter is stable version. We have tested it many different version.</notes>
12
+ <authors><author><name>Synotive Technologies</name><user>Synotive</user><email>magento@synotive.com</email></author></authors>
13
+ <date>2015-01-27</date>
14
+ <time>07:22:44</time>
15
+ <contents><target name="magecommunity"><dir name="SPL"><dir name="CounterWishlist"><dir name="Helper"><file name="Data.php" hash="87e37df55eb89ae407491b2b3802b31a"/></dir><dir name="Model"><file name="Observer.php" hash="e0c3b71558da03bbd53b3a4bad87d855"/></dir><dir name="etc"><file name="config.xml" hash="3eda1c4eb8e018a44a569e5f468f0ea1"/><file name="system.xml" hash="d11bf3c856a81eb7660c81bfd8dec8fb"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SPL_CounterWishlist.xml" hash="ab19afb18d753b60ad8a6ff64f55f723"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="counterwishlist.xml" hash="283955124a7fb0ae99843064bb31d60b"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.0.0</min><max>5.5.0</max></php></required></dependencies>
18
+ </package>