Productsticker - Version 1.0.0

Version Notes

magento product sticker extension for version 1.5.0.0 & later

Download this release

Release Info

Developer Weblineindia
Extension Productsticker
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Wli/Productsticker/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Wli_Productsticker_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+ }?>
app/code/community/Wli/Productsticker/Model/Sticker/Bestsellerproductstyle.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wli_Productsticker_Model_Sticker_Bestsellerproductstyle
4
+ {
5
+
6
+ /**
7
+ * To get the option for Adminpanel Bestseller Product Sticker style tab configuration
8
+ * @category Productsticker Model
9
+ * @author Weblineindia
10
+ * @param No
11
+ * @return Return Array option best-seller-productstyle
12
+ */
13
+
14
+ public function toOptionArray()
15
+ {
16
+ return array(
17
+ array('value' => 'Ribbon', 'label' => Mage::helper('productsticker')->__('Ribbon')),
18
+ array('value' => 'Round', 'label' => Mage::helper('productsticker')->__('Round')),
19
+ array('value' => 'Rectangle', 'label' => Mage::helper('productsticker')->__('Rectangle')),
20
+ );
21
+ }
22
+
23
+ }
app/code/community/Wli/Productsticker/Model/Sticker/Newproductstyle.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Wli_Productsticker_Model_Sticker_Newproductstyle
3
+ {
4
+ /**
5
+ * To get the option for Adminpanel New Product Sticker style tab configuration
6
+ * @category Productsticker Model
7
+ * @author Weblineindia
8
+ * @param No
9
+ * @return Return Array option new-productstyle
10
+ */
11
+
12
+ public function toOptionArray()
13
+ {
14
+ return array(
15
+ array('value' => 'Ribbon', 'label' => Mage::helper('productsticker')->__('Ribbon')),
16
+ array('value' => 'Round', 'label' => Mage::helper('productsticker')->__('Round')),
17
+ array('value' => 'Rectangle', 'label' => Mage::helper('productsticker')->__('Rectangle')),
18
+ );
19
+ }
20
+
21
+ }
app/code/community/Wli/Productsticker/Model/Sticker/Popularproductstyle.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Wli_Productsticker_Model_Sticker_Popularproductstyle
3
+ {
4
+ /**
5
+ * To get the option for Adminpanel Popular Product Sticker style tab configuration
6
+ * @category Productsticker Model
7
+ * @author Weblineindia
8
+ * @param No
9
+ * @return Return Array option popular-productstyle
10
+ */
11
+
12
+ public function toOptionArray()
13
+ {
14
+
15
+ return array(
16
+ array('value' => 'Ribbon', 'label' => Mage::helper('productsticker')->__('Ribbon')),
17
+ array('value' => 'Round', 'label' => Mage::helper('productsticker')->__('Round')),
18
+ array('value' => 'Rectangle', 'label' => Mage::helper('productsticker')->__('Rectangle')),
19
+ );
20
+ }
21
+
22
+ }
app/code/community/Wli/Productsticker/Model/Sticker/Saleproductstyle.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Wli_Productsticker_Model_Sticker_Saleproductstyle
3
+ {
4
+ /**
5
+ * To get the option for Adminpanel Sale Product Sticker style tab configuration
6
+ * @category Productsticker Model
7
+ * @author Weblineindia
8
+ * @param No
9
+ * @return Return Array option sale-productstyle
10
+ */
11
+
12
+ public function toOptionArray()
13
+ {
14
+
15
+ return array(
16
+ array('value' => 'Ribbon', 'label' => Mage::helper('productsticker')->__('Ribbon')),
17
+ array('value' => 'Round', 'label' => Mage::helper('productsticker')->__('Round')),
18
+ array('value' => 'Rectangle', 'label' => Mage::helper('productsticker')->__('Rectangle')),
19
+ );
20
+ }
21
+
22
+ }
app/code/community/Wli/Productsticker/Model/Sticker/Stickerconfigs.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Wli_Productsticker_Model_Sticker_Stickerconfigs
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init('sticker/stickerconfigs');
8
+ }
9
+
10
+ /**
11
+ * To get the user selected option of different Sticker style tab configuration
12
+ * @category Productsticker Model
13
+ * @author Weblineindia
14
+ * @param No
15
+ * @return Return Array of selected options
16
+ */
17
+
18
+ public function productsticker()
19
+ {
20
+ $configs = array();
21
+ $configs['general_enable']=Mage::getStoreConfig('wli_productsticker/general/enable');
22
+ $configs['general_plist']=Mage::getStoreConfig('wli_productsticker/general/productlist');
23
+ $configs['general_pdetails']=Mage::getStoreConfig('wli_productsticker/general/productdetails');
24
+ $configs['new_enable']=Mage::getStoreConfig('wli_productsticker/newproduct/enable');
25
+ $configs['new_style']=Mage::getStoreConfig('wli_productsticker/newproduct/newproduct_sticker_style');
26
+ $configs['sale_enable']=Mage::getStoreConfig('wli_productsticker/saleproduct/enable');
27
+ $configs['sale_style']=Mage::getStoreConfig('wli_productsticker/saleproduct/saleproduct_sticker_style');
28
+ $configs['popular_enable']=Mage::getStoreConfig('wli_productsticker/popularproduct/enable');
29
+ $configs['popular_count']=Mage::getStoreConfig('wli_productsticker/popularproduct/popularproduct_count');
30
+ $configs['popular_style']=Mage::getStoreConfig('wli_productsticker/popularproduct/popularproduct_sticker_style');
31
+ $configs['bestseller_enable']=Mage::getStoreConfig('wli_productsticker/bestsellerproduct/enable');
32
+ $configs['bestseller_count']=Mage::getStoreConfig('wli_productsticker/bestsellerproduct/bestsellerproduct_count');
33
+ $configs['bestseller_style']=Mage::getStoreConfig('wli_productsticker/bestsellerproduct/bestsellerproduct_sticker_style');
34
+
35
+ return $configs;
36
+ }
37
+
38
+
39
+ }
40
+
app/code/community/Wli/Productsticker/etc/config.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Wli_Productsticker>
5
+ <version>1.0.0</version>
6
+ </Wli_Productsticker>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <productsticker>
11
+ <class>Wli_Productsticker_Helper</class>
12
+ </productsticker>
13
+ </helpers>
14
+ <models>
15
+ <productsticker>
16
+ <class>Wli_Productsticker_Model</class>
17
+ </productsticker>
18
+ </models>
19
+ </global>
20
+ <frontend>
21
+ <routers>
22
+ <wli_productsticker>
23
+ <use>standard</use>
24
+ <args>
25
+ <module>Wli_Productsticker</module>
26
+ <frontName>productsticker</frontName>
27
+ </args>
28
+ </wli_productsticker>
29
+ </routers>
30
+ <layout>
31
+ <updates>
32
+ <wli_productsticker>
33
+ <file>productsticker.xml</file>
34
+ </wli_productsticker>
35
+ </updates>
36
+ </layout>
37
+ </frontend>
38
+ <adminhtml>
39
+ <acl>
40
+ <resources>
41
+ <admin>
42
+ <children>
43
+ <wli_productsticker>
44
+ <title>Product Sticker</title>
45
+ <sort_order>50</sort_order>
46
+ <children>
47
+ <item>
48
+ <title>Manage Sticker</title>
49
+ <sort_order>0</sort_order>
50
+ </item>
51
+ </children>
52
+ </wli_productsticker>
53
+ <system>
54
+ <children>
55
+ <config>
56
+ <children>
57
+ <wli_productsticker>
58
+ <title>Productsticker Section</title>
59
+ </wli_productsticker>
60
+ </children>
61
+ </config>
62
+ </children>
63
+ </system>
64
+ </children>
65
+ </admin>
66
+ </resources>
67
+ </acl>
68
+ </adminhtml>
69
+ </config>
app/code/community/Wli/Productsticker/etc/system.xml ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <config>
4
+
5
+ <tabs>
6
+ <wli translate="label">
7
+ <label>Product Stickers Extension</label>
8
+ <sort_order>1</sort_order>
9
+ </wli>
10
+ </tabs>
11
+
12
+ <sections>
13
+ <wli_productsticker translate="label"
14
+ module="productsticker">
15
+ <label>Product Sticker</label>
16
+ <tab>wli</tab>
17
+ <frontend_type>text</frontend_type>
18
+ <sort_order>100</sort_order>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>1</show_in_store>
22
+ <groups>
23
+ <general translate="label">
24
+ <label>General Configuration</label>
25
+ <frontend_type>text</frontend_type>
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
+ <enable>
31
+ <label>Enable Product Sticker</label>
32
+ <frontend_type>select</frontend_type>
33
+ <source_model>adminhtml/system_config_source_yesno</source_model>
34
+ <sort_order>1</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
+ <comment>Enable/Disable Product Sticker extension</comment>
39
+ </enable>
40
+ <productlist translate="label">
41
+ <label>Enable Sticker On Product Listing Page</label>
42
+ <frontend_type>select</frontend_type>
43
+ <source_model>adminhtml/system_config_source_yesno</source_model>
44
+ <sort_order>3</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ <comment>Display the Product Sticker on product listing page
49
+ </comment>
50
+ </productlist>
51
+ <productdetails translate="label">
52
+ <label>Enable Sticker On Product Details Page</label>
53
+ <frontend_type>select</frontend_type>
54
+ <source_model>adminhtml/system_config_source_yesno</source_model>
55
+ <sort_order>4</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>1</show_in_store>
59
+ <comment>Display the Product Sticker on product details page
60
+ </comment>
61
+ </productdetails>
62
+ </fields>
63
+ </general>
64
+ <newproduct translate="label">
65
+ <label>New Product Sticker Configurations</label>
66
+ <frontend_type>text</frontend_type>
67
+ <sort_order>51</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ <fields>
72
+ <enable translate="label">
73
+ <label>Enable Sticker On New Product</label>
74
+ <frontend_type>select</frontend_type>
75
+ <source_model>adminhtml/system_config_source_yesno</source_model>
76
+ <sort_order>1</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </enable>
81
+ <newproduct_sticker_style translate="label">
82
+ <label>Choose New Product Sticker Style</label>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>productsticker/sticker_newproductstyle
85
+ </source_model>
86
+ <sort_order>2</sort_order>
87
+ <show_in_default>1</show_in_default>
88
+ <show_in_website>1</show_in_website>
89
+ <show_in_store>1</show_in_store>
90
+ <comment>Different sticker styles for new product</comment>
91
+ </newproduct_sticker_style>
92
+ </fields>
93
+ </newproduct>
94
+ <saleproduct translate="label">
95
+ <label>Sale Product Sticker Configurations</label>
96
+ <frontend_type>text</frontend_type>
97
+ <sort_order>52</sort_order>
98
+ <show_in_default>1</show_in_default>
99
+ <show_in_website>1</show_in_website>
100
+ <show_in_store>1</show_in_store>
101
+ <fields>
102
+ <enable translate="label">
103
+ <label>Enable Sticker On Sale Product</label>
104
+ <frontend_type>select</frontend_type>
105
+ <source_model>adminhtml/system_config_source_yesno</source_model>
106
+ <sort_order>1</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>1</show_in_website>
109
+ <show_in_store>1</show_in_store>
110
+ </enable>
111
+ <saleproduct_sticker_style translate="label">
112
+ <label>Choose Sale Product Sticker Style</label>
113
+ <frontend_type>select</frontend_type>
114
+ <source_model>productsticker/sticker_saleproductstyle
115
+ </source_model>
116
+ <sort_order>2</sort_order>
117
+ <show_in_default>1</show_in_default>
118
+ <show_in_website>1</show_in_website>
119
+ <show_in_store>1</show_in_store>
120
+ <comment>Different sticker styles for sale product</comment>
121
+ </saleproduct_sticker_style>
122
+ </fields>
123
+ </saleproduct>
124
+ <popularproduct translate="label">
125
+ <label>Popular Product Sticker Configurations</label>
126
+ <frontend_type>text</frontend_type>
127
+ <sort_order>53</sort_order>
128
+ <show_in_default>1</show_in_default>
129
+ <show_in_website>1</show_in_website>
130
+ <show_in_store>1</show_in_store>
131
+ <fields>
132
+ <enable translate="label">
133
+ <label>Enable Sticker On Popular Product</label>
134
+ <frontend_type>select</frontend_type>
135
+ <source_model>adminhtml/system_config_source_yesno</source_model>
136
+ <sort_order>1</sort_order>
137
+ <show_in_default>1</show_in_default>
138
+ <show_in_website>1</show_in_website>
139
+ <show_in_store>1</show_in_store>
140
+ </enable>
141
+ <popularproduct_count translate="label">
142
+ <label>Enter Minimum no of view consider as popular product
143
+ </label>
144
+ <frontend_type>text</frontend_type>
145
+ <sort_order>2</sort_order>
146
+ <show_in_default>1</show_in_default>
147
+ <show_in_website>1</show_in_website>
148
+ <show_in_store>1</show_in_store>
149
+ <comment>Product view count greater than above no will consider
150
+ as a popular product</comment>
151
+ </popularproduct_count>
152
+ <popularproduct_sticker_style
153
+ translate="label">
154
+ <label>Choose Popular Product Sticker Style</label>
155
+ <frontend_type>select</frontend_type>
156
+ <source_model>productsticker/sticker_popularproductstyle
157
+ </source_model>
158
+ <sort_order>3</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ <comment>Different sticker styles for popular product</comment>
163
+ </popularproduct_sticker_style>
164
+ </fields>
165
+ </popularproduct>
166
+ <bestsellerproduct translate="label">
167
+ <label>Bestseller Product Sticker Configurations</label>
168
+ <frontend_type>text</frontend_type>
169
+ <sort_order>54</sort_order>
170
+ <show_in_default>1</show_in_default>
171
+ <show_in_website>1</show_in_website>
172
+ <show_in_store>1</show_in_store>
173
+ <fields>
174
+ <enable translate="label">
175
+ <label>Enable Sticker On Bestseller Product</label>
176
+ <frontend_type>select</frontend_type>
177
+ <source_model>adminhtml/system_config_source_yesno</source_model>
178
+ <sort_order>1</sort_order>
179
+ <show_in_default>1</show_in_default>
180
+ <show_in_website>1</show_in_website>
181
+ <show_in_store>1</show_in_store>
182
+ </enable>
183
+ <bestsellerproduct_count translate="label">
184
+ <label>Enter Minimum no of quantity consider as bestseller
185
+ product</label>
186
+ <frontend_type>text</frontend_type>
187
+ <sort_order>2</sort_order>
188
+ <show_in_default>1</show_in_default>
189
+ <show_in_website>1</show_in_website>
190
+ <show_in_store>1</show_in_store>
191
+ <comment>Product sold quantity greater than above quantity will
192
+ consider as a bestseller product</comment>
193
+ </bestsellerproduct_count>
194
+ <bestsellerproduct_sticker_style
195
+ translate="label">
196
+ <label>Choose Bestseller Product Sticker Style</label>
197
+ <frontend_type>select</frontend_type>
198
+ <source_model>productsticker/sticker_bestsellerproductstyle
199
+ </source_model>
200
+ <sort_order>3</sort_order>
201
+ <show_in_default>1</show_in_default>
202
+ <show_in_website>1</show_in_website>
203
+ <show_in_store>1</show_in_store>
204
+ <comment>Different sticker styles for bestseller product
205
+ </comment>
206
+ </bestsellerproduct_sticker_style>
207
+ </fields>
208
+ </bestsellerproduct>
209
+ </groups>
210
+ </wli_productsticker>
211
+ </sections>
212
+ </config>
app/design/frontend/default/default/layout/productsticker.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss" ifconfig="wli_productsticker/general/enable">
6
+ <stylesheet>wli/productsticker/css/sticker.css</stylesheet>
7
+ </action>
8
+ </reference>
9
+ </default>
10
+ <catalog_product_view>
11
+ <reference name="product.info.media">
12
+ <action method="setTemplate" ifconfig="wli_productsticker/general/enable">
13
+ <template>wli/productsticker/catalog/product/view/media.phtml</template>
14
+ </action>
15
+ </reference>
16
+ </catalog_product_view>
17
+ <catalog_category_layered>
18
+ <reference name="product_list">
19
+ <action method="setTemplate" ifconfig="wli_productsticker/general/enable">
20
+ <template>wli/productsticker/catalog/product/list.phtml</template>
21
+ </action>
22
+ </reference>
23
+ </catalog_category_layered>
24
+
25
+ <catalog_category_default>
26
+ <reference name="product_list">
27
+ <action method="setTemplate" ifconfig="wli_productsticker/general/enable">
28
+ <template>wli/productsticker/catalog/product/list.phtml</template>
29
+ </action>
30
+ </reference>
31
+ </catalog_category_default>
32
+ </layout>
app/design/frontend/default/default/template/wli/productsticker/catalog/product/list.phtml ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection = $this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ ?>
38
+ <?php if (!$_productCollection->count()): ?>
39
+ <p class="note-msg">
40
+ <?php echo $this->__('There are no products matching the selection.') ?>
41
+ </p>
42
+ <?php else: ?>
43
+ <div class="category-products">
44
+ <?php echo $this->getToolbarHtml() ?>
45
+ <?php // List mode ?>
46
+ <?php if ($this->getMode() != 'grid'): ?>
47
+ <?php $_iterator = 0; ?>
48
+ <ol class="products-list" id="products-list">
49
+ <?php foreach ($_productCollection as $_product):
50
+ ?>
51
+ <li
52
+ class="item<?php if (++$_iterator == sizeof($_productCollection)): ?> last<?php endif; ?>">
53
+ <?php // Product Image ?> <?php
54
+ $option = Mage::getModel('productsticker/sticker_stickerconfigs')->productsticker();
55
+ $date = date("Y-m-d 00:00:00");
56
+ $newtodate = $_product['news_to_date'];
57
+ $newfromdate = $_product['news_from_date'];
58
+ $special = $_product['special_price'];
59
+ $price = $_product['price'];
60
+ $specialtodate = $_product['special_to_date'];
61
+ $specialfromdate = $_product['special_from_date'];
62
+ $createddate = $_product['created_at'];
63
+ $sku = nl2br($_product->getSku());
64
+
65
+ //For popular product
66
+ $viewedProducts = Mage::getResourceModel('reports/product_collection')
67
+ ->addViewsCount($createddate, $date)
68
+ ->addAttributeToFilter('sku', $sku)
69
+ ->setOrder('views', 'desc')
70
+ ->getFirstItem();
71
+ $views = $viewedProducts->getData('views');
72
+
73
+ //For best seller product
74
+ $bestproduct = Mage::getResourceModel('reports/product_collection')
75
+ ->addOrderedQty()
76
+ ->addAttributeToFilter('sku', $sku)
77
+ ->setOrder('ordered_qty', 'desc')
78
+ ->getFirstItem();
79
+ $order = (int) $bestproduct->ordered_qty;
80
+
81
+ if ($option['general_plist']) {
82
+ //To check product list option is enable or not//
83
+ if ($option['sale_enable']) {
84
+
85
+ if (!$special == NULL and isset($specialfromdate) and isset($specialtodate) and $date >= $specialfromdate and $date <= $specialtodate) {
86
+ ?>
87
+ <div class="<?php echo 'listsale-' . $option['sale_style']; ?>"></div>
88
+ <?php
89
+ } else {
90
+ if ($option['new_enable'] and isset($newfromdate) and isset($newtodate) and $date >= $newfromdate and $date <= $newtodate) {
91
+ ?>
92
+ <div class="<?php echo 'listnew-' . $option['new_style']; ?>"></div>
93
+ <?php
94
+ } elseif ($option['popular_enable'] and $views > $option['popular_count']) {
95
+ ?>
96
+ <div class="<?php echo 'listpopular-' . $option['popular_style']; ?>"></div>
97
+ <?php
98
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
99
+ ?>
100
+ <div
101
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
102
+ <?php
103
+ }
104
+ }
105
+ } elseif ($option['new_enable']) {
106
+ if (isset($newfromdate) and $date >= $newfromdate and isset($newtodate) and $date <= $newtodate) {
107
+ ?>
108
+ <div class="<?php echo 'listnew-' . $option['new_style']; ?>"></div>
109
+ <?php
110
+ } elseif ($option['popular_enable'] and $views > $option['popular_count']) {
111
+ ?>
112
+ <div class="<?php echo 'listpopular-' . $option['popular_style']; ?>"></div>
113
+ <?php
114
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
115
+ ?>
116
+ <div
117
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
118
+ <?php
119
+ }
120
+ } elseif ($option['popular_enable']) {
121
+ if ($views > $option['popular_count']) {
122
+ ?>
123
+ <div class="<?php echo 'listpopular-' . $option['popular_style']; ?>"></div>
124
+ <?php
125
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
126
+ ?>
127
+ <div
128
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
129
+ <?php
130
+ }
131
+ } elseif ($option['bestseller_enable']) {
132
+ if ($order > $option['bestseller_count']) {
133
+ ?>
134
+ <div
135
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
136
+ <?php
137
+ }
138
+ }
139
+ }
140
+ ?> <a href="<?php echo $_product->getProductUrl() ?>"
141
+ title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"
142
+ class="product-image"><img
143
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>"
144
+ width="135" height="135"
145
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
146
+ </a> <?php // Product description ?>
147
+ <div class="product-shop">
148
+ <div class="f-fix">
149
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
150
+ <h2 class="product-name">
151
+ <a href="<?php echo $_product->getProductUrl() ?>"
152
+ title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
153
+ </a>
154
+ </h2>
155
+ <?php if ($_product->getRatingSummary()): ?>
156
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
157
+ <?php endif; ?>
158
+ <?php echo $this->getPriceHtml($_product, true) ?>
159
+ <?php if ($_product->isSaleable()): ?>
160
+ <p>
161
+ <button type="button"
162
+ title="<?php echo $this->__('Add to Cart') ?>"
163
+ class="button btn-cart"
164
+ onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">
165
+ <span><span><?php echo $this->__('Add to Cart') ?> </span> </span>
166
+ </button>
167
+ </p>
168
+ <?php else: ?>
169
+ <p class="availability out-of-stock">
170
+ <span><?php echo $this->__('Out of stock') ?> </span>
171
+ </p>
172
+ <?php endif; ?>
173
+ <div class="desc std">
174
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
175
+ <a href="<?php echo $_product->getProductUrl() ?>"
176
+ title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?>
177
+ </a>
178
+ </div>
179
+ <ul class="add-to-links">
180
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
181
+ <li><a
182
+ href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>"
183
+ class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?>
184
+ </a></li>
185
+ <?php endif; ?>
186
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
187
+ <li><span class="separator">|</span> <a
188
+ href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?>
189
+ </a></li>
190
+ <?php endif; ?>
191
+ </ul>
192
+ </div>
193
+ </div>
194
+ </li>
195
+ <?php endforeach; ?>
196
+ </ol>
197
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
198
+
199
+ <?php else: ?>
200
+
201
+ <?php // Grid Mode ?>
202
+ <?php $option = Mage::getModel('productsticker/sticker_stickerconfigs')->productsticker();
203
+ ?>
204
+ <?php $_collectionSize = $_productCollection->count() ?>
205
+ <?php $_columnCount = $this->getColumnCount(); ?>
206
+ <?php
207
+ $i = 0;
208
+ foreach ($_productCollection as $_product):
209
+ ?>
210
+ <?php if ($i++ % $_columnCount == 0): ?>
211
+ <ul class="products-grid">
212
+ <?php endif ?>
213
+ <li
214
+ class="item<?php if (($i - 1) % $_columnCount == 0): ?> first<?php elseif ($i % $_columnCount == 0): ?> last<?php endif; ?>">
215
+
216
+ <?php
217
+ $option = Mage::getModel('productsticker/sticker_stickerconfigs')->productsticker();
218
+
219
+ $date = date("Y-m-d 00:00:00");
220
+ $newtodate = $_product['news_to_date'];
221
+ $newfromdate = $_product['news_from_date'];
222
+ $special = $_product['special_price'];
223
+ $price = $_product['price'];
224
+ $specialtodate = $_product['special_to_date'];
225
+ $specialfromdate = $_product['special_from_date'];
226
+ $createddate = $_product['created_at'];
227
+ $sku = nl2br($_product->getSku());
228
+
229
+
230
+ //For popular product
231
+ $viewedProducts = Mage::getResourceModel('reports/product_collection')
232
+ ->addViewsCount($createddate, $date)
233
+ ->addAttributeToFilter('sku', $sku)
234
+ ->setOrder('views', 'desc')
235
+ ->getFirstItem();
236
+ $views = $viewedProducts->getData('views');
237
+
238
+ //For best seller product
239
+ $bestproduct = Mage::getResourceModel('reports/product_collection')
240
+ ->addOrderedQty()
241
+ ->addAttributeToFilter('sku', $sku)
242
+ ->setOrder('ordered_qty', 'desc')
243
+ ->getFirstItem();
244
+ $order = (int) $bestproduct->ordered_qty;
245
+
246
+ /* $daysleft = strtotime($specialtodate) - strtotime($specialfromdate);
247
+ $fullDays = floor($daysleft/(60*60*24)); */
248
+
249
+ //Main condition check start here
250
+
251
+ if ($option['general_plist']) { //To check product list option is enable or not//
252
+ if ($option['sale_enable']) {
253
+
254
+ if (!$special == NULL and isset($specialfromdate) and isset($specialtodate) and $date >= $specialfromdate and $date <= $specialtodate) {
255
+ ?>
256
+
257
+ <div class="<?php echo 'listsale-' . $option['sale_style']; ?>"></div>
258
+ <?php
259
+ } else {
260
+
261
+ if ($option['new_enable'] and isset($newfromdate) and isset($newtodate) and $date >= $newfromdate and $date <= $newtodate) {
262
+ ?>
263
+ <div class="<?php echo 'listnew-' . $option['new_style']; ?>"></div>
264
+ <?php
265
+ } elseif ($option['popular_enable'] and $views > $option['popular_count']) {
266
+ ?>
267
+ <div class="<?php echo 'listpopular-' . $option['popular_style']; ?>"></div>
268
+ <?php
269
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
270
+ ?>
271
+ <div
272
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
273
+ <?php
274
+ }
275
+ }
276
+ } elseif ($option['new_enable']) {
277
+ if (isset($newfromdate) and $date >= $newfromdate and isset($newtodate) and $date <= $newtodate) {
278
+ ?>
279
+ <div class="<?php echo 'listnew-' . $option['new_style']; ?>"></div>
280
+ <?php
281
+ } elseif ($option['popular_enable'] and $views > $option['popular_count']) {
282
+ ?>
283
+ <div class="<?php echo 'listpopular-' . $option['popular_style']; ?>"></div>
284
+ <?php
285
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
286
+ ?>
287
+ <div
288
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
289
+ <?php
290
+ }
291
+ } elseif ($option['popular_enable']) {
292
+
293
+ if ($views > $option['popular_count']) {
294
+ ?>
295
+ <div class="<?php echo 'listpopular-' . $option['popular_style']; ?>"></div>
296
+ <?php
297
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
298
+ ?>
299
+ <div
300
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
301
+ <?php
302
+ }
303
+ } elseif ($option['bestseller_enable']) {
304
+ if ($order > $option['bestseller_count']) {
305
+ ?>
306
+ <div
307
+ class="<?php echo 'listbestseller-' . $option['bestseller_style']; ?>"></div>
308
+ <?php
309
+ }
310
+ }
311
+ }
312
+ ?> <a href="<?php echo $_product->getProductUrl() ?>"
313
+ title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"
314
+ class="product-image"><img
315
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>"
316
+ width="135" height="135"
317
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
318
+ </a>
319
+ <h2 class="product-name">
320
+ <a href="<?php echo $_product->getProductUrl() ?>"
321
+ title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>
322
+ </a>
323
+ </h2> <?php if ($_product->getRatingSummary()): ?> <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
324
+ <?php endif; ?> <?php echo $this->getPriceHtml($_product, true) ?>
325
+ <div class="actions">
326
+ <?php if ($_product->isSaleable()): ?>
327
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>"
328
+ class="button btn-cart"
329
+ onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">
330
+ <span><span><?php echo $this->__('Add to Cart') ?> </span> </span>
331
+ </button>
332
+ <?php else: ?>
333
+ <p class="availability out-of-stock">
334
+ <span><?php echo $this->__('Out of stock') ?> </span>
335
+ </p>
336
+ <?php endif; ?>
337
+ <ul class="add-to-links">
338
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
339
+ <li><a
340
+ href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>"
341
+ class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?> </a>
342
+ </li>
343
+ <?php endif; ?>
344
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
345
+ <li><span class="separator">|</span> <a
346
+ href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?>
347
+ </a></li>
348
+ <?php endif; ?>
349
+ </ul>
350
+ </div>
351
+ </li>
352
+ <?php if ($i % $_columnCount == 0 || $i == $_collectionSize): ?>
353
+ </ul>
354
+ <?php endif ?>
355
+ <?php endforeach ?>
356
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd', 'even', 'first', 'last'])</script>
357
+ <?php endif; ?>
358
+
359
+ <div class="toolbar-bottom">
360
+ <?php echo $this->getToolbarHtml() ?>
361
+ </div>
362
+ </div>
363
+ <?php endif; ?>
app/design/frontend/default/default/template/wli/productsticker/catalog/product/view/media.phtml ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /**
27
+ * Product media data template
28
+ *
29
+ * @see Mage_Catalog_Block_Product_View_Media
30
+ */
31
+ ?>
32
+ <?php
33
+ $_product = $this->getProduct();
34
+ $_helper = $this->helper('catalog/output');
35
+ $option = Mage::getModel('productsticker/sticker_stickerconfigs')->productsticker();
36
+ $date = date("Y-m-d 00:00:00");
37
+ $newtodate = $_product['news_to_date'];
38
+ $newfromdate = $_product['news_from_date'];
39
+ $special = $_product['special_price'];
40
+ $price = $_product['price'];
41
+ $specialtodate = $_product['special_to_date'];
42
+ $specialfromdate = $_product['special_from_date'];
43
+ $createddate = $_product['created_at'];
44
+ $sku = nl2br($_product->getSku());
45
+
46
+ //For popular product
47
+ $viewedProducts = Mage::getResourceModel('reports/product_collection')
48
+ ->addViewsCount($createddate, $date)
49
+ ->addAttributeToFilter('sku', $sku)
50
+ ->setOrder('views', 'desc')
51
+ ->getFirstItem();
52
+ $views = $viewedProducts->getData('views');
53
+
54
+ //For best seller product
55
+ $bestproduct = Mage::getResourceModel('reports/product_collection')
56
+ ->addOrderedQty()
57
+ ->addAttributeToFilter('sku', $sku)
58
+ ->setOrder('ordered_qty', 'desc')
59
+ ->getFirstItem();
60
+ $order = (int) $bestproduct->ordered_qty;
61
+
62
+ if ($option['general_pdetails']) { //To check product Details option is enable or not//
63
+ if ($option['sale_enable']) {
64
+ if (!$special == NULL and isset($specialfromdate) and isset($specialtodate) and $date >= $specialfromdate and $date <= $specialtodate) {
65
+ ?>
66
+ <div
67
+ class="<?php echo 'detailsale-' . $option['sale_style']; ?>"></div>
68
+ <?php
69
+ } else {
70
+
71
+ if ($option['new_enable'] and isset($newfromdate) and isset($newtodate) and $date >= $newfromdate and $date <= $newtodate) {
72
+ ?>
73
+ <div
74
+ class="<?php echo 'detailnew-' . $option['new_style']; ?>"></div>
75
+ <?php
76
+ } elseif ($option['popular_enable'] and $views > $option['popular_count']) {
77
+ ?>
78
+ <div
79
+ class="<?php echo 'detailpopular-' . $option['popular_style']; ?>"></div>
80
+ <?php
81
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
82
+
83
+
84
+ ?>
85
+ <div
86
+ class="<?php echo 'detailbestseller-' . $option['bestseller_style']; ?>"></div>
87
+ <?php
88
+ }
89
+ }
90
+ } elseif ($option['new_enable']) {
91
+ if (isset($newfromdate) and $date >= $newfromdate and isset($newtodate) and $date <= $newtodate) {
92
+ ?>
93
+ <div
94
+ class="<?php echo 'detailnew-' . $option['new_style']; ?>"></div>
95
+ <?php
96
+ } elseif ($option['popular_enable'] and $views > $option['popular_count']) {
97
+ ?>
98
+ <div
99
+ class="<?php echo 'detailpopular-' . $option['popular_style']; ?>"></div>
100
+ <?php
101
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
102
+ ?>
103
+ <div
104
+ class="<?php echo 'detailbestseller-' . $option['bestseller_style']; ?>"></div>
105
+ <?php
106
+ }
107
+ } elseif ($option['popular_enable']) {
108
+ if ($views > $option['popular_count']) {
109
+ ?>
110
+ <div
111
+ class="<?php echo 'detailpopular-' . $option['popular_style']; ?>"></div>
112
+ <?php
113
+ } elseif ($option['bestseller_enable'] and $order > $option['bestseller_count']) {
114
+
115
+ ?>
116
+ <div
117
+ class="<?php echo 'detailbestseller-' . $option['bestseller_style']; ?>"></div>
118
+ <?php
119
+ }
120
+ } elseif ($option['bestseller_enable']) {
121
+ if ($order > $option['bestseller_count']) {
122
+ ?>
123
+ <div
124
+ class="<?php echo 'detailbestseller-' . $option['bestseller_style']; ?>"></div>
125
+ <?php
126
+ }
127
+ }
128
+ }
129
+ ?>
130
+
131
+ <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
132
+ <p class="product-image product-image-zoom">
133
+ <?php
134
+ $_img = '<img id="image" src="' . $this->helper('catalog/image')->init($_product, 'image') . '" alt="' . $this->htmlEscape($this->getImageLabel()) . '" title="' . $this->htmlEscape($this->getImageLabel()) . '" />';
135
+ echo $_helper->productAttribute($_product, $_img, 'image');
136
+ ?>
137
+ </p>
138
+ <p class="zoom-notice" id="track_hint">
139
+ <?php echo $this->__('Double click on above image to view full picture') ?>
140
+ </p>
141
+ <div class="zoom">
142
+ <img id="zoom_out"
143
+ src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>"
144
+ alt="<?php echo $this->__('Zoom Out') ?>"
145
+ title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
146
+ <div id="track">
147
+ <div id="handle"></div>
148
+ </div>
149
+ <img id="zoom_in"
150
+ src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>"
151
+ alt="<?php echo $this->__('Zoom In') ?>"
152
+ title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
153
+ </div>
154
+ <script type="text/javascript">
155
+ //<![CDATA[
156
+ Event.observe(window, 'load', function() {
157
+ product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
158
+ });
159
+ //]]>
160
+ </script>
161
+ <?php else: ?>
162
+ <p class="product-image">
163
+ <?php
164
+ $_img = '<img src="' . $this->helper('catalog/image')->init($_product, 'image')->resize(265) . '" alt="' . $this->htmlEscape($this->getImageLabel()) . '" title="' . $this->htmlEscape($this->getImageLabel()) . '" />';
165
+ echo $_helper->productAttribute($_product, $_img, 'image');
166
+ ?>
167
+ </p>
168
+ <?php endif; ?>
169
+ <?php if (count($this->getGalleryImages()) > 0): ?>
170
+ <div class="more-views">
171
+ <h2>
172
+ <?php echo $this->__('More Views') ?>
173
+ </h2>
174
+ <ul>
175
+ <?php foreach ($this->getGalleryImages() as $_image): ?>
176
+ <li><a href="#"
177
+ onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"
178
+ title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img
179
+ src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>"
180
+ width="56" height="56"
181
+ alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /> </a>
182
+ </li>
183
+ <?php endforeach; ?>
184
+ </ul>
185
+ </div>
186
+ <?php endif; ?>
app/etc/modules/Wli_Productsticker.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Wli_Productsticker>
6
+ <active>true</active>
7
+ <codePool>community</codePool>
8
+ </Wli_Productsticker>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Productsticker</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GNU General Public License (GPL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Product stickers to promote New, On Sale, Popular and Best Seller Products and attract more customers. </summary>
10
+ <description>&lt;h2&gt;Promote Your New, On Sale, Popular and Best Seller Products easily using different product stickers&lt;/h2&gt;&#xD;
11
+ &#xD;
12
+ &lt;p&gt;&lt;span&gt;We have created the product sticker extension to improve customer experience while shopping by providing stickers for New, On Sale, Popular and Best Seller products which is easily configure from admin panel without any extra developer efforts.&lt;/span&gt;&lt;p&gt;&#xD;
13
+ &#xD;
14
+ &lt;h3&gt;Improve Customer Experience&lt;/h3&gt;&#xD;
15
+ &lt;h3&gt;Attractive Stickers&lt;/h3&gt;&#xD;
16
+ &lt;h3&gt;Easy Configuration&lt;/h3&gt;&#xD;
17
+ &lt;h3&gt;Compatible with exiting magento version without any modifications&lt;/h3&gt;&#xD;
18
+ &#xD;
19
+ &#xD;
20
+ &#xD;
21
+ &#xD;
22
+ </description>
23
+ <notes>magento product sticker extension for version 1.5.0.0 &amp; later</notes>
24
+ <authors><author><name>Weblineindia</name><user>Weblineindia</user><email>partners@weblineindia.com</email></author></authors>
25
+ <date>2014-03-06</date>
26
+ <time>10:30:42</time>
27
+ <contents><target name="magecommunity"><dir name="Wli"><dir name="Productsticker"><dir name="Helper"><file name="Data.php" hash="d5e8aa19dd33e386579f732efcedb195"/></dir><dir name="Model"><dir name="Sticker"><file name="Bestsellerproductstyle.php" hash="c9c26e6525c8d9b44c75b879de573278"/><file name="Newproductstyle.php" hash="8c44ced58cbe42ee933864d4ee0f72d6"/><file name="Popularproductstyle.php" hash="d88d197a4d53fe3aa3d02858ec5c5692"/><file name="Saleproductstyle.php" hash="d78a5acac24bf7f5a8c232fb150eac75"/><file name="Stickerconfigs.php" hash="930f0601c55547ba670a034282d1c3f5"/></dir></dir><dir name="etc"><file name="config.xml" hash="388ab7e78f74229e24f16568eb8a4682"/><file name="system.xml" hash="135e622efa5c87bcdb815b8b056a3194"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="productsticker.xml" hash="4904c56005fc64cd6965d3a70d02105e"/></dir><dir name="template"><dir name="wli"><dir name="productsticker"><dir name="catalog"><dir name="product"><file name="list.phtml" hash="ec2e069bade4e448a7088890cea08da7"/><dir name="view"><file name="media.phtml" hash="705d4294425e61d53839aa68406a4712"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="wli"><dir name="productsticker"><dir name="css"><file name="sticker.css" hash="bea0776f252e2d22ad8783876fdc3921"/></dir><dir name="images"><file name="label_new_sprite.png" hash="fe658240179b9003bf792ef8c70bc935"/><file name="tag.png" hash="fa3072cc76b29b082a7a5a6fe193401a"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wli_Productsticker.xml" hash="27d6b905a5464a7a641b96d17da16404"/></dir></target></contents>
28
+ <compatible/>
29
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
30
+ </package>
skin/frontend/default/default/wli/productsticker/css/sticker.css ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*-------------Product list Page------------------*/
2
+ .products-grid li.item {
3
+ position: relative;
4
+ }
5
+
6
+ .products-list li.item {
7
+ position: relative;
8
+ }
9
+
10
+ .listnew-Ribbon {
11
+ float: left;
12
+ background: url(../images/tag.png) no-repeat 0 -90px;
13
+ width: 87px;
14
+ height: 82px;
15
+ position: absolute;
16
+ z-index: 10;
17
+ }
18
+
19
+ .listsale-Ribbon {
20
+ float: right;
21
+ background: url(../images/tag.png) no-repeat 0 0;
22
+ width: 87px;
23
+ height: 82px;
24
+ position: absolute;
25
+ z-index: 11;
26
+ }
27
+
28
+ .listpopular-Ribbon {
29
+ float: left;
30
+ background: url(../images/tag.png) no-repeat 0 -181px;
31
+ width: 87px;
32
+ height: 82px;
33
+ position: absolute;
34
+ z-index: 10;
35
+ }
36
+
37
+ .listbestseller-Ribbon {
38
+ float: left;
39
+ background: url(../images/tag.png) no-repeat 0 -275px;
40
+ width: 87px;
41
+ height: 82px;
42
+ position: absolute;
43
+ z-index: 10;
44
+ }
45
+ .listnew-Round {
46
+ float: left;
47
+ background: url(../images/label_new_sprite.png) no-repeat 0 -128px;
48
+ width: 60px;
49
+ height: 60px;
50
+ position: absolute;
51
+ z-index: 10;
52
+ }
53
+ .listsale-Round {
54
+ float: left;
55
+ background: url(../images/label_new_sprite.png) no-repeat 0 -191px;
56
+ width: 60px;
57
+ height: 60px;
58
+ position: absolute;
59
+ z-index: 10;
60
+ }
61
+ .listpopular-Round {
62
+ float: left;
63
+ background: url(../images/label_new_sprite.png) no-repeat 0 -64px;
64
+ width: 60px;
65
+ height: 60px;
66
+ position: absolute;
67
+ z-index: 10;
68
+ }
69
+
70
+ .listbestseller-Round {
71
+ float: left;
72
+ background: url(../images/label_new_sprite.png) no-repeat 0 0;
73
+ width: 60px;
74
+ height: 60px;
75
+ position: absolute;
76
+ z-index: 10;
77
+ }
78
+ .listnew-Rectangle {
79
+ float: left;
80
+ margin-top: 5px;
81
+ background: url(../images/label_new_sprite.png) no-repeat -70px -95px;
82
+ width: 89px;
83
+ height: 31px;
84
+ position: absolute;
85
+ z-index: 10;
86
+ }
87
+
88
+ .listsale-Rectangle {
89
+ float: right;
90
+ margin-top: 5px;
91
+ background: url(../images/label_new_sprite.png) no-repeat -70px -136px;
92
+ width: 89px;
93
+ height: 31px;
94
+ position: absolute;
95
+ z-index: 11;
96
+ }
97
+
98
+ .listpopular-Rectangle {
99
+ float: left;
100
+ margin-top: 5px;
101
+ background: url(../images/label_new_sprite.png) no-repeat -70px -54px;
102
+ width: 89px;
103
+ height: 31px;
104
+ position: absolute;
105
+ z-index: 10;
106
+ }
107
+
108
+ .listbestseller-Rectangle {
109
+ float: left;
110
+ margin-top: 5px;
111
+ background: url(../images/label_new_sprite.png) no-repeat -70px -13px;
112
+ width: 89px;
113
+ height: 31px;
114
+ position: absolute;
115
+ z-index: 10;
116
+ }
117
+ /*-------------Product Details Page------------------*/
118
+ .product-view .product-img-box {
119
+ overflow: hidden;
120
+ position: relative;
121
+ }
122
+
123
+ .product-view .product-img-box .product-image-zoom {
124
+ float: none;
125
+ overflow: visible;
126
+ }
127
+
128
+ .detailnew-Ribbon {
129
+ background: url(../images/tag.png) no-repeat 0 -90px;
130
+ width: 87px;
131
+ height: 82px;
132
+ position: absolute;
133
+ z-index: 10;
134
+ }
135
+
136
+ .detailsale-Ribbon {
137
+ background: url(../images/tag.png) no-repeat 0 0;
138
+ width: 87px;
139
+ height: 82px;
140
+ position: absolute;
141
+ z-index: 11;
142
+ }
143
+
144
+ .detailpopular-Ribbon {
145
+ background: url(../images/tag.png) no-repeat 0 -181px;
146
+ width: 87px;
147
+ height: 82px;
148
+ position: absolute;
149
+ z-index: 10;
150
+ }
151
+
152
+ .detailbestseller-Ribbon {
153
+ background: url(../images/tag.png) no-repeat 0 -275px;
154
+ width: 87px;
155
+ height: 82px;
156
+ position: absolute;
157
+ z-index: 10;
158
+ }
159
+ .detailnew-Round {
160
+ background: url(../images/label_new_sprite.png) no-repeat 0 -128px;
161
+ width: 60px;
162
+ height: 60px;
163
+ position: absolute;
164
+ z-index: 10;
165
+ }
166
+
167
+ .detailsale-Round {
168
+ background: url(../images/label_new_sprite.png) no-repeat 0 -191px;
169
+ width: 60px;
170
+ height: 60px;
171
+ position: absolute;
172
+ z-index: 11;
173
+ }
174
+
175
+ .detailpopular-Round {
176
+ background: url(../images/label_new_sprite.png) no-repeat 0 -64px;
177
+ width: 60px;
178
+ height: 60px;
179
+ position: absolute;
180
+ z-index: 10;
181
+ }
182
+
183
+ .detailbestseller-Round {
184
+ background: url(../images/label_new_sprite.png) no-repeat 0 0;
185
+ width: 60px;
186
+ height: 60px;
187
+ position: absolute;
188
+ z-index: 10;
189
+ }
190
+ .detailnew-Rectangle {
191
+ background: url(../images/label_new_sprite.png) no-repeat -70px -95px;
192
+ width: 89px;
193
+ height: 31px;
194
+ position: absolute;
195
+ z-index: 10;
196
+ }
197
+
198
+ .detailsale-Rectangle {
199
+ background: url(../images/label_new_sprite.png) no-repeat -70px -136px;
200
+ width: 89px;
201
+ height: 31px;
202
+ position: absolute;
203
+ z-index: 11;
204
+ }
205
+
206
+ .detailpopular-Rectangle {
207
+ background: url(../images/label_new_sprite.png) no-repeat -70px -54px;
208
+ width: 89px;
209
+ height: 31px;
210
+ position: absolute;
211
+ z-index: 10;
212
+ }
213
+
214
+ .detailbestseller-Rectangle {
215
+ background: url(../images/label_new_sprite.png) no-repeat -70px -13px;
216
+ width: 89px;
217
+ height: 31px;
218
+ position: absolute;
219
+ z-index: 10;
220
+ }
skin/frontend/default/default/wli/productsticker/images/label_new_sprite.png ADDED
Binary file
skin/frontend/default/default/wli/productsticker/images/tag.png ADDED
Binary file