Product_View_Counter_By_Synotive - Version 1.1.0

Version Notes

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

Download this release

Release Info

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


Version 1.1.0

app/code/community/SPL/ProductViewcounter/Block/ProductViewcounter.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_ProductViewcounter
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_ProductViewcounter_Block_ProductViewcounter extends Mage_Catalog_Block_Product_View
18
+ {
19
+
20
+
21
+ protected function _prepareLayout()
22
+ {
23
+
24
+
25
+ if(Mage::getStoreConfig('productviewcounter/module_config/enabled')==1)
26
+ {
27
+ $simpleBlock = $this->getLayout()->getBlock('product.info.addto');
28
+
29
+ if ($simpleBlock) {
30
+ $simpleBlock->setTemplate('productviewcounter/productviewcounter.phtml');
31
+ }
32
+
33
+ }
34
+
35
+
36
+
37
+
38
+ }
39
+ }
app/code/community/SPL/ProductViewcounter/Helper/Data.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_ProductViewcounter
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_ProductViewcounter_Helper_Data extends Mage_Core_Helper_Abstract
18
+ {
19
+ }
20
+
app/code/community/SPL/ProductViewcounter/controllers/ProductviewcounterController.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_ProductViewcounter
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_ProductViewcounter_ProductviewcounterController extends Mage_Core_Controller_Front_Action{
18
+
19
+ public function indexAction()
20
+ {
21
+ $this->loadLayout();
22
+ $this->renderLayout();
23
+
24
+ }
25
+ }
app/code/community/SPL/ProductViewcounter/etc/adminhtml.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" ?>
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_ProductViewcounter
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
+ <acl>
21
+ <resources>
22
+ <admin>
23
+ <children>
24
+ <system>
25
+ <children>
26
+ <config>
27
+ <children>
28
+ <productviewcounter translate="title" module="productviewcounter">
29
+ <title>Product View Count</title>
30
+ <sort_order>100</sort_order>
31
+ </productviewcounter>
32
+ </children>
33
+ </config>
34
+ </children>
35
+ </system>
36
+ </children>
37
+ </admin>
38
+ </resources>
39
+ </acl>
40
+ </config>
app/code/community/SPL/ProductViewcounter/etc/config.xml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
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_ProductViewcounter
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_ProductViewcounter>
22
+ <version>0.1.0</version>
23
+ </SPL_ProductViewcounter>
24
+ </modules>
25
+ <frontend>
26
+ <routers>
27
+ <productviewcounter>
28
+ <use>standard</use>
29
+ <args>
30
+ <module>SPL_ProductViewcounter</module>
31
+ <frontName>product_view_counter</frontName>
32
+ </args>
33
+ </productviewcounter>
34
+ </routers>
35
+ <layout>
36
+ <updates>
37
+ <productviewcounter>
38
+ <file>productviewcounter.xml</file>
39
+ </productviewcounter>
40
+ </updates>
41
+ </layout>
42
+ </frontend>
43
+ <global>
44
+ <helpers>
45
+ <productviewcounter>
46
+ <class>SPL_ProductViewcounter_Helper</class>
47
+ </productviewcounter>
48
+ </helpers>
49
+
50
+ <blocks>
51
+ <productviewcounter>
52
+ <class>SPL_ProductViewcounter_Block</class>
53
+ </productviewcounter>
54
+ </blocks>
55
+
56
+
57
+ </global>
58
+ </config>
app/code/community/SPL/ProductViewcounter/etc/system.xml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" ?>
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_ProductViewcounter
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
+ <tabs>
21
+ <synotive module="productviewcounter" translate="label">
22
+ <label>Synotive</label>
23
+ <sort_order>100</sort_order>
24
+ </synotive>
25
+ </tabs>
26
+ <sections>
27
+ <productviewcounter module="productviewcounter" translate="label">
28
+ <label>Product View Count</label>
29
+ <sort_order>200</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>1</show_in_store>
33
+ <tab>synotive</tab>
34
+ <groups>
35
+ <module_config translate="label">
36
+ <label>Module Configuration</label>
37
+ <frontend_type>text</frontend_type>
38
+ <sort_order>10</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ <fields>
43
+ <enabled translate="label">
44
+ <label>Enable</label>
45
+ <frontend_type>select</frontend_type>
46
+ <source_model>adminhtml/system_config_source_yesno</source_model>
47
+ <sort_order>20</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+ </enabled>
52
+ </fields>
53
+ </module_config>
54
+ </groups>
55
+ </productviewcounter>
56
+ </sections>
57
+ </config>
app/design/frontend/base/default/layout/productviewcounter.xml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
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_ProductViewcounter
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
+ <layout version="0.1.0">
20
+
21
+
22
+ <catalog_product_view translate="label">
23
+ <reference name="head">
24
+ <action method="addCss" ifconfig="productviewcounter/module_config/enabled"><stylesheet>css/productviewcounter/productviewcounter.css</stylesheet></action>
25
+ </reference>
26
+ <reference name="product.info">
27
+ <block type="productviewcounter/productviewcounter" name="productviewcounter.productviewcounter" template="productviewcounter/productviewcounter.phtml" ifconfig="productviewcounter/module_config/enabled" />
28
+ </reference>
29
+ </catalog_product_view>
30
+
31
+
32
+ </layout>
33
+
34
+
app/design/frontend/base/default/template/productviewcounter/productviewcounter.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_ProductViewcounter
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
+
19
+ <?php if (Mage::getStoreConfig('productviewcounter/module_config/enabled') == 1) { ?>
20
+ <?php $_product = $this->getProduct(); // addto.phtml ?>
21
+ <?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
22
+ <ul class="add-to-links">
23
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
24
+ <li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
25
+ <?php endif; ?>
26
+ <?php $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product); ?>
27
+ <?php if ($_compareUrl) : ?>
28
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
29
+ <?php endif; ?>
30
+ </ul>
31
+ <div style="clear:both;"></div>
32
+ <?php $fromDate=date('Y-m-d',strtotime("yesterday"));
33
+ $toDate = now();
34
+ $viewedProducts = Mage::getResourceModel('reports/product_collection')->addViewsCount($fromDate, $toDate);
35
+ foreach($viewedProducts as $product) {
36
+ $pid=$product->getData('entity_id');
37
+ $currentPid=$_product->getId();
38
+ if($pid==$currentPid){ ?>
39
+ <div style="top: 25%; left: 10px;" class="vi-notify-cmp" id="vi_notification">
40
+ <div class="vi-notify-container vi-notify-shadow">
41
+ <div class="vi-notify-msg"><?php echo $product->getData('views');?> customer <?php if( $product->getData('views') > 1 ){ echo 'are';}else{ echo 'is'; } ?> viewing this item per day.</div>
42
+ <?php /*?><div class="vi-notify-close">
43
+ <a style="text-decoration: none;" href="javascript:void(0)" class="vi-notify-close-btn" id="vi_notification_cls_btn">x</a>
44
+ </div><?php */?>
45
+ <a href="javascript:void(0)" id="vi_notification_cls_btn" class="vi-notify-close">x</a>
46
+ </div>
47
+ </div>
48
+ <?php }
49
+ }
50
+ } ?>
51
+ <script>
52
+ Event.observe(window, 'load', function() {
53
+ Event.observe('vi_notification_cls_btn', 'click', function(){
54
+ Effect.toggle('vi_notification', 'appear', { duration: 1.0 });
55
+
56
+ });
57
+ //Effect.toggle('vi_notification', 'appear', { duration: 8.0 });
58
+ });
59
+
60
+ </script>
app/etc/modules/SPL_ProductViewcounter.xml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
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_ProductViewcounter
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_ProductViewcounter>
22
+ <active>true</active>
23
+ <codePool>community</codePool>
24
+ <version>0.1.0</version>
25
+ </SPL_ProductViewcounter>
26
+ </modules>
27
+ </config>
package.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Product_View_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 View Counter is an awesome way to make your customer engage with your store when stock are low.</summary>
10
+ <description>Products View Counter is an awesome way to make your customer engage with your store when stock are low.&#xD;
11
+ Product View Counter Extension helps you to increase/zoom your eCommerce store sales. It&#x2019;s a great way to highlight your products. When stock are low or some discount that time It will guide/assist the customers that this product are more viewing by others customers. And customer really want that product that time he/she is thinking less and buy this product.&#xD;
12
+ So Customer don&#x2019;t need to read the review of products after showing the product view counter.&#xD;
13
+ </description>
14
+ <notes>Products View Counter is stable version. We have tested it many different version.</notes>
15
+ <authors><author><name>Synotive Technologies</name><user>Synotive</user><email>magento@synotive.com</email></author></authors>
16
+ <date>2015-02-12</date>
17
+ <time>09:57:24</time>
18
+ <contents><target name="magecommunity"><dir name="SPL"><dir name="ProductViewcounter"><dir name="Block"><file name="ProductViewcounter.php" hash="f19aed88723ddaf2712d93504bcae3c0"/></dir><dir name="Helper"><file name="Data.php" hash="d358758a745e5a828edd1b2077e732f1"/></dir><dir name="controllers"><file name="ProductviewcounterController.php" hash="6cf8846a884a4a92e20161c7bd38c4fa"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a2d3eeaeb6f54d5f1240268f779ddac6"/><file name="config.xml" hash="c5a3807e417b57228a498ed597ad7de6"/><file name="system.xml" hash="03b28ad969c8c3e865645660d8f4448b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SPL_ProductViewcounter.xml" hash="a04da76e29f1cb442a6f23e2c96b920a"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="productviewcounter.xml" hash="093683ca896f95bac2e4627b7f695f35"/></dir><dir name="template"><dir name="productviewcounter"><file name="productviewcounter.phtml" hash="047f83f928543170de19d92db9eac99b"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir><dir name="css"><dir name="productviewcounter"><file name="productviewcounter.css" hash="9e63cb418db292de299fecf4840871ef"/></dir></dir></dir></dir></dir></dir></target></contents>
19
+ <compatible/>
20
+ <dependencies><required><php><min>5.0.0</min><max>5.6.2</max></php></required></dependencies>
21
+ </package>
skin/frontend/base/default/css/productviewcounter/productviewcounter.css ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SPL
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category SPL
12
+ * @package SPL_Productviewcounter
13
+ * @copyright Copyright (c) 2015 SPL.
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+ .vi-notify-cmp {
17
+ clear: both;
18
+ height: auto;
19
+ line-height: normal;
20
+ opacity: 0.94;
21
+ padding: 10px;
22
+ position: fixed;
23
+ z-index: 999;
24
+ }
25
+ .vi-notify-shadow {
26
+ box-shadow: 0 2px 10px rgba(50, 50, 50, 0.5);
27
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
28
+ }
29
+ .vi-notify-container {
30
+ background-color: #f37156;
31
+ background-position: 0 0;
32
+ border: 1px solid #fff;
33
+ border-radius: 4px;
34
+ color: #fff;
35
+ margin: 0;
36
+ overflow: hidden;
37
+ padding: 10px;
38
+ text-align: center;
39
+ }
40
+ .vi-notify-msg {
41
+ font-family: "Helvetica neue",Helvetica,Arial,Verdana,sans-serif !important;
42
+ font-size: 13px !important;
43
+ font-weight: normal;
44
+ margin-left: 5px;
45
+ min-height: 34px;
46
+ max-width:200px;
47
+ text-align: left;
48
+
49
+ }
50
+ .vi-notify-close { text-decoration:none; line-height:15px; width:15px; position:absolute; top:0px; right:0px;
51
+ font-family:arial; font-size:15px; font-weight:bold; color:#fff; background:#f37156; padding-bottom:1px;border: 1px solid #fff;
52
+ }
53
+ .vi-notify-close:focus, .vi-notify-close:hover {
54
+ color: #f37156; background:#fff; border: 1px solid #f47a60; text-decoration: none;
55
+ }