Wishlist_Counter_By_Synotive - Version 1.1.3

Version Notes

Products Wishlist Counter is an awesome way to make your customer engage when stock are low.

Download this release

Release Info

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


Code changes from version 1.1.2 to 1.1.3

app/code/community/SPL/CounterWishlist/etc/config.xml CHANGED
@@ -19,7 +19,7 @@
19
  <config>
20
  <modules>
21
  <SPL_CounterWishlist>
22
- <version>1.1.2</version>
23
  </SPL_CounterWishlist>
24
  </modules>
25
  <global>
19
  <config>
20
  <modules>
21
  <SPL_CounterWishlist>
22
+ <version>1.1.3</version>
23
  </SPL_CounterWishlist>
24
  </modules>
25
  <global>
app/design/frontend/base/default/template/counterwishlist/list.phtml ADDED
@@ -0,0 +1,393 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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
+ $version= Mage::getVersion();
36
+ $ver= sprintf("%.1f", $version);
37
+ if($ver < 1.9){
38
+ ?>
39
+
40
+ <?php
41
+ $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
42
+ $_productCollection=$this->getLoadedProductCollection();
43
+ $_helper = $this->helper('catalog/output');
44
+ ?>
45
+ <?php if(!$_productCollection->count()): ?>
46
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
47
+ <?php else: ?>
48
+ <div class="category-products">
49
+ <?php echo $this->getToolbarHtml() ?>
50
+ <?php // List mode ?>
51
+ <?php if($this->getMode()!='grid'): ?>
52
+ <?php $_iterator = 0; ?>
53
+ <ol class="products-list" id="products-list">
54
+ <?php foreach ($_productCollection as $_product): ?>
55
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>" style="position:relative;">
56
+ <?php // Product Image ?>
57
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
58
+ <?php $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
59
+ if($wishlistValue && $_product->getWishlistCount()){ ?>
60
+ <div style="position: absolute; text-shadow: 0px 0px 1px rgb(204, 204, 204); font-style: italic; line-height: 13px; border-radius: 150px; text-align: center; border: 2px solid rgb(255, 255, 255); background: linear-gradient(to bottom, rgb(254, 254, 254) 2%, rgb(219, 219, 219) 50%, rgb(226, 226, 226) 99%) repeat scroll 0% 0% transparent; box-shadow: 0px 0px 6px rgb(204, 204, 204); color: rgb(51, 51, 51); height: 40px; width: 55px; font-size: 12px; padding: 13px 0px 0px; left: 90px; bottom: 25px;">
61
+ <?php echo sprintf ("%.0f", $_product->getWishlistCount()); ?><BR> <span style="font-size:9px; ">WISHLIST</span></div>
62
+ <?php } ?>
63
+ </a>
64
+ <?php // Product description ?>
65
+ <div class="product-shop">
66
+ <div class="f-fix">
67
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
68
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
69
+ <?php if($_product->getRatingSummary()): ?>
70
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
71
+ <?php endif; ?>
72
+ <?php echo $this->getPriceHtml($_product, true) ?>
73
+ <?php if($_product->isSaleable()): ?>
74
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
75
+ <?php else: ?>
76
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
77
+ <?php endif; ?>
78
+ <div class="desc std">
79
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
80
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
81
+ </div>
82
+ <ul class="add-to-links">
83
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
84
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
85
+ <?php endif; ?>
86
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
87
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
88
+ <?php endif; ?>
89
+ </ul>
90
+ </div>
91
+ </div>
92
+ </li>
93
+ <?php endforeach; ?>
94
+ </ol>
95
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
96
+
97
+ <?php else: ?>
98
+
99
+ <?php // Grid Mode ?>
100
+
101
+ <?php $_collectionSize = $_productCollection->count() ?>
102
+ <?php $_columnCount = $this->getColumnCount(); ?>
103
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
104
+ <?php if ($i++%$_columnCount==0): ?>
105
+ <ul class="products-grid">
106
+ <?php endif ?>
107
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>" style="position:relative;">
108
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
109
+ <?php $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
110
+ if($wishlistValue && $_product->getWishlistCount()){ ?>
111
+ <div style="position: absolute; text-shadow: 0px 0px 1px rgb(204, 204, 204); font-style: italic; line-height: 13px; border-radius: 150px; text-align: center; border: 2px solid rgb(255, 255, 255); background: linear-gradient(to bottom, rgb(254, 254, 254) 2%, rgb(219, 219, 219) 50%, rgb(226, 226, 226) 99%) repeat scroll 0% 0% transparent; box-shadow: 0px 0px 6px rgb(204, 204, 204); color: rgb(51, 51, 51); height: 40px; width: 55px; font-size: 12px; padding: 13px 0px 0px; right: 0px; bottom: 130px;">
112
+ <?php echo sprintf ("%.0f", $_product->getWishlistCount()); ?><BR> <span style="font-size:9px; ">WISHLIST</span></div>
113
+ <?php } ?>
114
+
115
+ </a>
116
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
117
+ <?php if($_product->getRatingSummary()): ?>
118
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
119
+ <?php endif; ?>
120
+ <?php echo $this->getPriceHtml($_product, true) ?>
121
+ <div class="actions">
122
+ <?php if($_product->isSaleable()): ?>
123
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
124
+ <?php else: ?>
125
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
126
+ <?php endif; ?>
127
+ <ul class="add-to-links">
128
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
129
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
130
+ <?php endif; ?>
131
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
132
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
133
+ <?php endif; ?>
134
+ </ul>
135
+ </div>
136
+ </li>
137
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
138
+ </ul>
139
+ <?php endif ?>
140
+ <?php endforeach ?>
141
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
142
+ <?php endif; ?>
143
+
144
+ <div class="toolbar-bottom">
145
+ <?php echo $this->getToolbarHtml() ?>
146
+ </div>
147
+ </div>
148
+ <?php endif; ?>
149
+ <?php }else{ ?>
150
+ <?php
151
+ $_productCollection=$this->getLoadedProductCollection();
152
+ $_helper = $this->helper('catalog/output');
153
+ ?>
154
+ <?php if(!$_productCollection->count()): ?>
155
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
156
+ <?php else: ?>
157
+ <div class="category-products">
158
+ <?php echo $this->getToolbarHtml() ?>
159
+ <?php // List mode ?>
160
+ <?php if($this->getMode()!='grid'): ?>
161
+ <?php $_iterator = 0; ?>
162
+ <ol class="products-list" id="products-list">
163
+ <?php foreach ($_productCollection as $_product): ?>
164
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>" style="position:relative;">
165
+ <?php // Product Image ?>
166
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
167
+ <?php /* Based on the native RWD styling, product images are displayed at a max of ~400px wide when viewed on a
168
+ one column page layout with four product columns from a 1280px viewport. For bandwidth reasons,
169
+ we are going to serve a 300px image, as it will look fine at 400px and most of the times, the image
170
+ will be displayed at a smaller size (eg, if two column are being used or viewport is smaller than 1280px).
171
+ This $_imgSize value could even be decreased further, based on the page layout
172
+ (one column, two column, three column) and number of product columns. */ ?>
173
+ <?php $_imgSize = 300; ?>
174
+ <img id="product-collection-image-<?php echo $_product->getId(); ?>"
175
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->keepFrame(false)->resize($_imgSize); ?>"
176
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
177
+ <?php
178
+ $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
179
+ if($wishlistValue && $_product->getWishlistCount()){
180
+ ?>
181
+
182
+
183
+ <div style="position: absolute; width: 40%; text-align: center; vertical-align: middle; bottom: 0px; height: 50%; right: -10px;">
184
+ <div style="position: absolute; text-shadow: 0px 0px 1px rgb(204, 204, 204); font-style: italic; line-height: 13px; border-radius: 150px; text-align: center; border: 2px solid rgb(255, 255, 255); bottom: 0px; background: linear-gradient(to bottom, rgb(254, 254, 254) 2%, rgb(219, 219, 219) 50%, rgb(226, 226, 226) 99%) repeat scroll 0% 0% transparent; box-shadow: 0px 0px 6px rgb(204, 204, 204); color: rgb(51, 51, 51); height: 60px; width: 60px; font-size: 12px; padding: 13px 0px 0px; right: 10px;">
185
+ <?php echo $_product->getWishlistCount(); ?><br> <span style="font-size: 8px;">WISHLIST</span></div>
186
+ </div>
187
+ <?php } ?>
188
+
189
+
190
+ </a>
191
+ <?php // Product description ?>
192
+ <div class="product-shop">
193
+ <div class="f-fix">
194
+ <div class="product-primary">
195
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
196
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
197
+ <?php if($_product->getRatingSummary()): ?>
198
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
199
+ <?php endif; ?>
200
+
201
+ <?php
202
+ $_nameAfter = $this->getChild('name.after');
203
+ // New if here
204
+ if($_nameAfter):
205
+ $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
206
+ foreach($_nameAfterChildren as $_nameAfterChildName):
207
+ $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
208
+ $_nameAfterChild->setProduct($_product);
209
+ ?>
210
+ <?php echo $_nameAfterChild->toHtml(); ?>
211
+ <?php endforeach;
212
+ endif; ?>
213
+ </div>
214
+ <div class="product-secondary">
215
+ <?php echo $this->getPriceHtml($_product, true) ?>
216
+ </div>
217
+ <div class="product-secondary">
218
+ <?php if($_product->isSaleable() && !$_product->canConfigure()): ?>
219
+ <p class="action"><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
220
+ <?php elseif($_product->isSaleable()): ?>
221
+ <p class="action"><a title="<?php echo $this->__('View Details') ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?></a></p>
222
+ <?php else: ?>
223
+ <p class="action availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
224
+ <?php endif; ?>
225
+ <ul class="add-to-links">
226
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
227
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
228
+ <?php endif; ?>
229
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
230
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
231
+ <?php endif; ?>
232
+ </ul>
233
+ </div>
234
+ <div class="desc std">
235
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
236
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
237
+ </div>
238
+ </div>
239
+ </div>
240
+ </li>
241
+ <?php endforeach; ?>
242
+ </ol>
243
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
244
+
245
+ <?php else: ?>
246
+
247
+ <?php // Grid Mode ?>
248
+
249
+ <?php $_collectionSize = $_productCollection->count() ?>
250
+ <?php $_columnCount = $this->getColumnCount(); ?>
251
+ <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col">
252
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
253
+ <?php /*if ($i++%$_columnCount==0): ?>
254
+ <?php endif*/ ?>
255
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>" style="position:relative;">
256
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
257
+ <?php $_imgSize = 210; ?>
258
+ <img id="product-collection-image-<?php echo $_product->getId(); ?>"
259
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($_imgSize); ?>"
260
+ alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
261
+ <?php
262
+ $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
263
+ if($wishlistValue && $_product->getWishlistCount()){
264
+ ?>
265
+
266
+
267
+ <div style="position: absolute; width: 40%; text-align: center; vertical-align: middle; bottom: 0px; height: 50%; right: -10px;">
268
+ <div style="position: absolute; text-shadow: 0px 0px 1px rgb(204, 204, 204); font-style: italic; line-height: 13px; border-radius: 150px; text-align: center; border: 2px solid rgb(255, 255, 255); bottom: 0px; background: linear-gradient(to bottom, rgb(254, 254, 254) 2%, rgb(219, 219, 219) 50%, rgb(226, 226, 226) 99%) repeat scroll 0% 0% transparent; box-shadow: 0px 0px 6px rgb(204, 204, 204); color: rgb(51, 51, 51); height: 60px; width: 60px; font-size: 12px; padding: 13px 0px 0px; right: 10px;">
269
+ <?php echo $_product->getWishlistCount(); ?><br> <span style="font-size: 8px;">WISHLIST</span></div>
270
+ </div>
271
+ <?php } ?>
272
+
273
+
274
+ </a>
275
+ <div class="product-info">
276
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
277
+
278
+ <?php
279
+ $_nameAfter = $this->getChild('name.after');
280
+ // New if here
281
+ if($_nameAfter):
282
+ $_nameAfterChildren = $_nameAfter->getSortedChildren();
283
+ foreach($_nameAfterChildren as $_nameAfterChildName):
284
+ $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
285
+ $_nameAfterChild->setProduct($_product);
286
+ ?>
287
+ <?php echo $_nameAfterChild->toHtml(); ?>
288
+ <?php endforeach; ?>
289
+ <?php endif; ?>
290
+
291
+ <?php echo $this->getPriceHtml($_product, true) ?>
292
+ <?php if($_product->getRatingSummary()): ?>
293
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
294
+ <?php endif; ?>
295
+ <div class="actions">
296
+ <?php if($_product->isSaleable() && !$_product->canConfigure()): ?>
297
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
298
+ <?php elseif($_product->isSaleable()): ?>
299
+ <a title="<?php echo $this->__('View Details') ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?></a>
300
+ <?php else: ?>
301
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
302
+ <?php endif; ?>
303
+ <ul class="add-to-links">
304
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
305
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?>
306
+ </a></li>
307
+ <?php endif; ?>
308
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
309
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
310
+ <?php endif; ?>
311
+ </ul>
312
+ </div>
313
+ </div>
314
+ </li>
315
+ <?php /*if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
316
+ <?php endif*/ ?>
317
+ <?php endforeach ?>
318
+ </ul>
319
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
320
+
321
+ <?php endif; ?>
322
+
323
+ <div class="toolbar-bottom">
324
+ <?php echo $this->getToolbarHtml() ?>
325
+ </div>
326
+ </div>
327
+
328
+ <?php endif; ?>
329
+
330
+ <?php
331
+ //set product collection on after blocks
332
+ $_afterChildren = $this->getChild('after');
333
+ if ($_afterChildren):
334
+ $_afterChildren = $this->getChild('after')->getSortedChildren();
335
+ foreach($_afterChildren as $_afterChildName):
336
+ $_afterChild = $this->getChild('after')->getChild($_afterChildName);
337
+ $_afterChild->setProductCollection($_productCollection);
338
+ ?>
339
+ <?php echo $_afterChild->toHtml(); ?>
340
+ <?php endforeach; ?>
341
+ <?php endif; ?>
342
+ <!--<script>
343
+ function sendLoadMoreProductsRequest(url) {
344
+ new Ajax.Request(url, {
345
+ onSuccess: function(response) {
346
+ //Create dummy element
347
+ var div = document.createElement('div');
348
+ div.innerHTML = response.responseText;
349
+ //refresh the page class element
350
+ $$('.pages')[0].innerHTML = $(div).select('.pages')[0].innerHTML;
351
+ //append the list to the existing product list
352
+ $$('.products-grid')[0].innerHTML += $(div).select('.products-grid')[0].innerHTML;
353
+ //check if there are more products to be loaded or not
354
+ if(!$(div).select('.next.i-next')[0]){
355
+ $('load-more-products').style.display = "none";
356
+ }
357
+ }
358
+ });
359
+ }
360
+
361
+ function callbackFunc(e) {
362
+ if($$('.next.i-next')[0]){
363
+ var nextPageUrl = $$('.next.i-next')[0].readAttribute('href');
364
+ sendLoadMoreProductsRequest(nextPageUrl);
365
+ }
366
+ else{
367
+ //hide button
368
+ $$(e.currentTarget).hide();
369
+ }
370
+ }
371
+
372
+ //Assigning click event to the button which triggers the "next" link
373
+ $('load-more-products').observe('click', callbackFunc);
374
+ //<![CDATA[
375
+ //check if there are more products to be loaded or not
376
+ if(!$$('.next.i-next')[0]){
377
+ $('load-more-products').style.display = "none";
378
+ }
379
+ function testScroll(ev){
380
+ if($$('.scroll-to-top')[0]){
381
+ console.log(window.pageYOffset);
382
+ if(window.pageYOffset>400){
383
+ $$('.scroll-to-top')[0].style.display = "block";
384
+ }
385
+ else{
386
+ $$('.scroll-to-top')[0].style.display = "none";
387
+ }
388
+ }
389
+ }
390
+ window.onscroll = testScroll;
391
+ //]]>
392
+ </script>-->
393
+ <?php } ?>
app/design/frontend/base/default/template/counterwishlist/media.phtml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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
+ /**
28
+ * Product media data template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Media
31
+ */
32
+ ?>
33
+ <?php
34
+ $version= Mage::getVersion();
35
+ $ver= sprintf("%.1f", $version);
36
+ if($ver < 1.9){
37
+ ?>
38
+ <?php
39
+ $_product = $this->getProduct();
40
+ $_helper = $this->helper('catalog/output');
41
+ ?>
42
+ <?php $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
43
+ if($wishlistValue && $_product->getWishlistCount()){ ?>
44
+ <div style="position: relative;">
45
+ <div style="position: absolute; text-shadow: 0px 0px 1px rgb(204, 204, 204); font-style: italic; line-height: 13px; border-radius: 150px; text-align: center; border: 2px solid rgb(255, 255, 255); background: linear-gradient(to bottom, rgb(254, 254, 254) 2%, rgb(219, 219, 219) 50%, rgb(226, 226, 226) 99%) repeat scroll 0% 0% transparent; box-shadow: 0px 0px 6px rgb(204, 204, 204); color: rgb(51, 51, 51); height: 40px; width: 55px; font-size: 12px; padding: 13px 0px 0px; right: 0px; top: 0px;z-index:10;">
46
+ <?php echo sprintf ("%.0f", $_product->getWishlistCount()); ?><BR> <span style="font-size:11px; ">WISHLIST</span></div>
47
+ </div>
48
+ <?php } ?>
49
+ <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
50
+ <p class="product-image product-image-zoom">
51
+ <?php
52
+ $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
53
+ echo $_helper->productAttribute($_product, $_img, 'image');
54
+ ?>
55
+
56
+ </p>
57
+ <p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p>
58
+ <div class="zoom">
59
+ <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
60
+ <div id="track">
61
+ <div id="handle"></div>
62
+ </div>
63
+ <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
64
+ </div>
65
+ <script type="text/javascript">
66
+ //<![CDATA[
67
+ Event.observe(window, 'load', function() {
68
+ product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
69
+ });
70
+ //]]>
71
+ </script>
72
+ <?php else: ?>
73
+ <p class="product-image">
74
+ <?php
75
+ $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
76
+ echo $_helper->productAttribute($_product, $_img, 'image');
77
+ ?>
78
+ </p>
79
+ <?php endif; ?>
80
+ <?php if (count($this->getGalleryImages()) > 0): ?>
81
+ <div class="more-views">
82
+ <h2><?php echo $this->__('More Views') ?></h2>
83
+ <ul>
84
+ <?php foreach ($this->getGalleryImages() as $_image): ?>
85
+ <li>
86
+ <a href="#" 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;" title="<?php echo $this->escapeHtml($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" width="56" height="56" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" /></a>
87
+ </li>
88
+ <?php endforeach; ?>
89
+ </ul>
90
+ </div>
91
+ <?php endif; ?>
92
+ <?php }else{ ?>
93
+ <?php
94
+ $_product = $this->getProduct();
95
+ $_helper = $this->helper('catalog/output');
96
+ ?>
97
+ <div class="product-image product-image-zoom">
98
+ <div class="product-image-gallery" style="position: relative;">
99
+ <img id="image-main"
100
+ class="gallery-image visible"
101
+ src="<?php echo $this->helper('catalog/image')->init($_product, 'image') ?>"
102
+ alt="<?php echo $this->escapeHtml($this->getImageLabel()) ?>"
103
+ title="<?php echo $this->escapeHtml($this->getImageLabel()); ?>" />
104
+
105
+ <?php
106
+ $wishlistValue = Mage::getStoreConfig('catalog/spl_counterwishlist/enabledwishlist');
107
+ if($wishlistValue && $_product->getWishlistCount()){
108
+ ?>
109
+
110
+
111
+ <div style="position: absolute; width: 20%; text-align: center; vertical-align: middle; top: 0px; height: 50%; right: -10px;">
112
+ <div style="background: linear-gradient(to bottom, rgb(254, 254, 254) 2%, rgb(219, 219, 219) 50%, rgb(226, 226, 226) 99%) repeat scroll 0 0 transparent; border: 2px solid rgb(255, 255, 255); border-radius: 150px; box-shadow: 0 0 6px rgb(204, 204, 204); color: rgb(51, 51, 51); font-size: 12px; font-style: italic; height: 80px; left: 14px; line-height: 13px; padding: 22px 0 0; position: absolute; text-align: center; text-shadow: 0 0 1px rgb(204, 204, 204); top: 4px; width: 80px;">
113
+ <?php echo $_product->getWishlistCount(); ?><br> <span style="font-size: 11px;">WISHLIST</span></div>
114
+ </div>
115
+ <?php } ?>
116
+ <?php
117
+ $i=0;
118
+ foreach ($this->getGalleryImages() as $_image):
119
+ $_imageUrl = $this->helper('catalog/image')
120
+ ->init($_product, 'image', $_image->getFile())
121
+ ->keepFrame(false)
122
+ ->constrainOnly(true)
123
+ ->resize(1200);
124
+ ?>
125
+ <img id="image-<?php echo $i; ?>"
126
+ class="gallery-image"
127
+ src="<?php echo $_imageUrl; ?>"
128
+ data-zoom-image="<?php echo $_imageUrl; ?>" />
129
+ <?php
130
+ $i++;
131
+ endforeach;
132
+ ?>
133
+ </div>
134
+ </div>
135
+
136
+ <?php if (count($this->getGalleryImages()) > 0): ?>
137
+ <div class="more-views">
138
+ <h2><?php echo $this->__('More Views') ?></h2>
139
+ <ul class="product-image-thumbs">
140
+ <?php $i=0; foreach ($this->getGalleryImages() as $_image): ?>
141
+ <?php
142
+ if (($filterClass = $this->getGalleryFilterHelper()) && ($filterMethod = $this->getGalleryFilterMethod()) && !Mage::helper($filterClass)->$filterMethod($_product, $_image)):
143
+ continue;
144
+ endif;
145
+ ?>
146
+ <li>
147
+ <a class="thumb-link" href="#" title="<?php echo $this->escapeHtml($_image->getLabel()) ?>" data-image-index="<?php echo $i; ?>">
148
+ <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(75); ?>"
149
+ width="75" height="75" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />
150
+ </a>
151
+ </li>
152
+ <?php $i++; endforeach; ?>
153
+ </ul>
154
+ </div>
155
+ <?php endif; ?>
156
+
157
+ <?php echo $this->getChildHtml('after'); ?>
158
+ <?php } ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Wishlist_Counter_By_Synotive</name>
4
- <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>Products Wishlist Counter is an awesome way to make your customer engage when stock are low.</notes>
12
  <authors><author><name>Synotive Technologies</name><user>Synotive</user><email>magento@synotive.com</email></author></authors>
13
  <date>2015-02-04</date>
14
- <time>04:59:24</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="0632a3e5aba62c6977d4172e8da9268e"/><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.6.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Wishlist_Counter_By_Synotive</name>
4
+ <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
11
  <notes>Products Wishlist Counter is an awesome way to make your customer engage when stock are low.</notes>
12
  <authors><author><name>Synotive Technologies</name><user>Synotive</user><email>magento@synotive.com</email></author></authors>
13
  <date>2015-02-04</date>
14
+ <time>05:09:27</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="7c75f1c039ffb923c69cd060f5b9707b"/><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 name="template"><dir name="counterwishlist"><file name="list.phtml" hash="19153876173bad66e626505deaadabf1"/><file name="media.phtml" hash="ea732ebdda45cff4134c2d25a00c1c49"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.6.0</max></php></required></dependencies>
18
  </package>