Jalak_Zeroprice - Version 1.2.0

Version Notes

1.0.0
- First Release

1.1.0
- Update for support Magento version 1.9.0.1
- Fix bug in product group
- Fix bug for dynamic theme (custom theme)

1.2.0
- Fix bug in My Wish List page
- Fix bug in Compare Products page
- Fix bug for product bundle

Download this release

Release Info

Developer I Gusti Agung Mahendra Putra
Extension Jalak_Zeroprice
Version 1.2.0
Comparing to
See all releases


Code changes from version 1.1.0 to 1.2.0

app/code/community/Jalak/Zeroprice/Block/Rewrite/Catalog/Product/Price.php CHANGED
@@ -32,6 +32,8 @@ class Jalak_Zeroprice_Block_Rewrite_Catalog_Product_Price extends Mage_Catalog_B
32
 
33
  if ($helper->isEnabled() && $this->getProduct()->price < $helper->priceValue())
34
  return '';
 
 
35
 
36
  return parent::_toHtml();
37
  }
32
 
33
  if ($helper->isEnabled() && $this->getProduct()->price < $helper->priceValue())
34
  return '';
35
+
36
+ //return $this->getProduct()->getTypeID();
37
 
38
  return parent::_toHtml();
39
  }
app/code/community/Jalak/Zeroprice/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Jalak_Zeroprice>
6
- <version>1.1.0</version>
7
  </Jalak_Zeroprice>
8
  </modules>
9
  <global>
3
  <config>
4
  <modules>
5
  <Jalak_Zeroprice>
6
+ <version>1.2.0</version>
7
  </Jalak_Zeroprice>
8
  </modules>
9
  <global>
app/design/frontend/base/default/layout/jalak_zeroprice.xml CHANGED
@@ -1,16 +1,57 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <layout version="0.1.0">
3
  <default>
4
- <reference name="catalog_product_price_template">
5
- <action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>jalak_zeroprice/catalog/product/price.phtml</template></action>
6
- <action method="addPriceBlockType"><type>grouped</type><block>catalog/product_price</block><template>jalak_zeroprice/catalog/product/price.phtml</template></action>
7
- <action method="addPriceBlockType"><type>configurable</type><block>catalog/product_price</block><template>jalak_zeroprice/catalog/product/price.phtml</template></action>
8
- <action method="addPriceBlockType"><type>virtual</type><block>catalog/product_price</block><template>jalak_zeroprice/catalog/product/price.phtml</template></action>
9
- <action method="addPriceBlockType"><type>bundled</type><block>catalog/product_price</block><template>jalak_zeroprice/catalog/product/price.phtml</template></action>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  <!-- duplicate for each product type you need to handle i.e. change the value of the <type> node" -->
11
  </reference>
12
  </default>
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  <catalog_product_view>
15
  <reference name="product.info.addtocart">
16
  <action method="setTemplate">
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <layout version="0.1.0">
3
  <default>
4
+ <reference name="catalog_product_price_template">
5
+ <action method="addPriceBlockType">
6
+ <type>simple</type>
7
+ <block>catalog/product_price</block>
8
+ <template>jalak_zeroprice/catalog/product/price.phtml</template>
9
+ </action>
10
+ <action method="addPriceBlockType">
11
+ <type>grouped</type>
12
+ <block>catalog/product_price</block>
13
+ <template>jalak_zeroprice/catalog/product/price.phtml</template>
14
+ </action>
15
+ <action method="addPriceBlockType">
16
+ <type>configurable</type>
17
+ <block>catalog/product_price</block>
18
+ <template>jalak_zeroprice/catalog/product/price.phtml</template>
19
+ </action>
20
+ <action method="addPriceBlockType">
21
+ <type>virtual</type>
22
+ <block>catalog/product_price</block>
23
+ <template>jalak_zeroprice/catalog/product/price.phtml</template>
24
+ </action>
25
+ <action method="addPriceBlockType">
26
+ <type>bundled</type>
27
+ <block>catalog/product_price</block>
28
+ <template>jalak_zeroprice/catalog/product/price.phtml</template>
29
+ </action>
30
  <!-- duplicate for each product type you need to handle i.e. change the value of the <type> node" -->
31
  </reference>
32
  </default>
33
 
34
+ <wishlist_index_index translate="label">
35
+ <reference name="customer.wishlist.item.cart">
36
+ <action method="setTemplate">
37
+ <name>jalak_zeroprice/wishlist/item/column/cart.phtml</name>
38
+ </action>
39
+ </reference>
40
+ <reference name="customer.wishlist.button.toCart">
41
+ <action method="setTemplate">
42
+ <name>jalak_zeroprice/wishlist/button/tocart.phtml</name>
43
+ </action>
44
+ </reference>
45
+ </wishlist_index_index>
46
+
47
+ <catalog_product_compare_index>
48
+ <reference name="catalog.compare.list">
49
+ <action method="setTemplate">
50
+ <name>jalak_zeroprice/catalog/product/compare/list.phtml</name>
51
+ </action>
52
+ </reference>
53
+ </catalog_product_compare_index>
54
+
55
  <catalog_product_view>
56
  <reference name="product.info.addtocart">
57
  <action method="setTemplate">
app/design/frontend/base/default/template/jalak_zeroprice/catalog/product/compare/list.phtml ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Jalak
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 Jalak
13
+ * @package Jalak_Zeroprice
14
+ * @author Hendrathings <hendrathings@gmail.com>
15
+ */
16
+ /* @var $this Mage_Catalog_Block_Product_Compare_List */
17
+ $_zeroPriceHelper = Mage::helper('jalak_zeroprice');
18
+ ?>
19
+ <div class="page-title title-buttons">
20
+ <h1><?php echo $this->__('Compare Products') ?></h1>
21
+ <a href="#" onclick="window.print();
22
+ return false;" class="link-print"><?php echo $this->__('Print This Page') ?></a>
23
+ </div>
24
+ <?php $_total = $this->getItems()->getSize() ?>
25
+ <?php if ($_total): ?>
26
+ <table class="data-table compare-table" id="product_comparison">
27
+ <?php $_i = 0 ?>
28
+ <?php foreach ($this->getItems() as $_item): ?>
29
+ <?php if ($_i++ % 10 == 0): ?>
30
+ <col width="1" />
31
+ <?php endif; ?>
32
+ <col width="<?php echo floor(100 / $_total); ?>%" />
33
+ <?php endforeach; ?>
34
+ <?php if ($_total > 2): ?>
35
+ <thead>
36
+ <tr>
37
+ <?php $_i = 0 ?>
38
+ <?php foreach ($this->getItems() as $_item): ?>
39
+ <?php if ($_i++ % 10 == 0): ?>
40
+ <th>&nbsp;</th>
41
+ <?php endif; ?>
42
+ <td class="a-right"><a href="#" class="btn-remove" onclick="removeItem('<?php echo $this->helper('catalog/product_compare')->getRemoveUrl($_item) ?>');" title="<?php echo $this->__('Remove This Item') ?>"><?php echo $this->__('Remove This Item') ?></a></td>
43
+ <?php endforeach; ?>
44
+ </tr>
45
+ </thead>
46
+ <?php endif ?>
47
+ <tbody>
48
+ <tr class="product-shop-row">
49
+ <?php $_i = 0 ?>
50
+ <?php foreach ($this->getItems() as $_item): ?>
51
+ <?php if ($_i++ % 10 == 0): ?>
52
+ <th>&nbsp;</th>
53
+ <?php endif; ?>
54
+ <td>
55
+ <a class="product-image" href="#" onclick="setPLocation('<?php echo $this->getProductUrl($_item) ?>', true)" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->stripTags($_item->getName(), null, true) ?>" /></a>
56
+ <h2 class="product-name"><a href="#" onclick="setPLocation('<?php echo $this->getProductUrl($_item) ?>', true)" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a></h2>
57
+ <?php echo $this->getReviewsSummaryHtml($_item, 'short') ?>
58
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-top') ?>
59
+ <?php if ($_item->isSaleable()): ?>
60
+ <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
61
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
62
+ <?php else: ?>
63
+ <?php if ($_item->price > $_zeroPriceHelper->priceValue()): ?>
64
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
65
+ <?php endif; ?>
66
+ <?php endif; ?>
67
+ <?php else: ?>
68
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
69
+ <?php endif; ?>
70
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
71
+ <ul class="add-to-links">
72
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist" onclick="setPLocation(this.href, true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
73
+ </ul>
74
+ <?php endif; ?>
75
+ </td>
76
+ <?php endforeach; ?>
77
+ </tr>
78
+ </tbody>
79
+ <tbody>
80
+ <?php foreach ($this->getAttributes() as $_attribute): ?>
81
+ <tr>
82
+ <?php $_i = 0 ?>
83
+ <?php foreach ($this->getItems() as $_item): ?>
84
+ <?php if ($_i++ % 10 == 0): ?>
85
+ <th><span class="nobr"><?php echo $_attribute->getStoreLabel() ?></span></th>
86
+ <?php endif; ?>
87
+ <td>
88
+ <?php
89
+ switch ($_attribute->getAttributeCode())
90
+ {
91
+ case "price":
92
+ ?>
93
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode()) ?>
94
+ <?php
95
+ break;
96
+ case "small_image":
97
+ ?>
98
+ <img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" />
99
+ <?php
100
+ break;
101
+ case "date":
102
+ echo substr($this->getProductAttributeValue($_item, $_attribute), 0, 10);
103
+ break;
104
+ default:
105
+ ?>
106
+ <div class="std">
107
+ <?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?>
108
+ </div>
109
+ <?php
110
+ break;
111
+ }
112
+ ?>
113
+ </td>
114
+ <?php endforeach; ?>
115
+ </tr>
116
+ <?php endforeach; ?>
117
+ </tbody>
118
+ <tbody>
119
+ <tr class="add-to-row">
120
+ <?php $_i = 0 ?>
121
+ <?php foreach ($this->getItems() as $_item): ?>
122
+ <?php if ($_i++ % 10 == 0): ?>
123
+ <th>&nbsp;</th>
124
+ <?php endif; ?>
125
+ <td>
126
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
127
+ <?php if ($_item->isSaleable()): ?>
128
+ <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
129
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
130
+ <?php else: ?>
131
+ <?php if ($_item->price > $_zeroPriceHelper->priceValue()): ?>
132
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
133
+ <?php endif; ?>
134
+ <?php endif; ?>
135
+
136
+ <?php else: ?>
137
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
138
+ <?php endif; ?>
139
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
140
+ <ul class="add-to-links">
141
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item); ?>" class="link-wishlist" onclick="setPLocation(this.href, true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
142
+ </ul>
143
+ <?php endif; ?>
144
+ </td>
145
+ <?php endforeach; ?>
146
+ </tr>
147
+ </tbody>
148
+ </table>
149
+ <div class="buttons-set">
150
+ <button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
151
+ <span class="please-wait" id="compare-list-please-wait" style="display:none;">
152
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Please wait...') ?>" title="<?php echo $this->__('Please wait...') ?>" class="v-middle" /> <?php echo $this->__('Please wait...') ?>
153
+ </span>
154
+ </div>
155
+ <script type="text/javascript">
156
+ decorateTable('product_comparison');
157
+
158
+ /**
159
+ * Send remove item request, after that reload windows
160
+ */
161
+ function removeItem(url)
162
+ {
163
+ new Ajax.Request(url, {
164
+ parameters: {isAjax: 1, method: 'POST'},
165
+ onLoading: function() {
166
+ $('compare-list-please-wait').show();
167
+ },
168
+ onSuccess: function(transport) {
169
+ $('compare-list-please-wait').hide();
170
+ window.location.reload();
171
+ window.opener.location.reload();
172
+ }
173
+ });
174
+ }
175
+ </script>
176
+ <?php else: ?>
177
+ <script type="text/javascript">window.close();</script>
178
+ <?php endif; ?>
app/design/frontend/base/default/template/jalak_zeroprice/catalog/product/list.phtml CHANGED
@@ -44,8 +44,9 @@ $_zeroPriceHelper = Mage::helper('jalak_zeroprice');
44
  <?php echo $this->getReviewsSummaryHtml($_product) ?>
45
  <?php endif; ?>
46
  <?php echo $this->getPriceHtml($_product, true) ?>
 
47
 
48
- <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
49
  <?php if ($_product->isSaleable()): ?>
50
  <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>
51
  <?php else: ?>
44
  <?php echo $this->getReviewsSummaryHtml($_product) ?>
45
  <?php endif; ?>
46
  <?php echo $this->getPriceHtml($_product, true) ?>
47
+ <?php //echo $_product->getTypeID() ?>
48
 
49
+ <?php if ($_zeroPriceHelper->getCanAddToCart() || $_product->getTypeID() == "bundle"): ?>
50
  <?php if ($_product->isSaleable()): ?>
51
  <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>
52
  <?php else: ?>
app/design/frontend/base/default/template/jalak_zeroprice/catalog/product/price.phtml CHANGED
@@ -386,7 +386,38 @@ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simpleP
386
  ?>
387
  <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
388
  <div class="price-box">
389
- <?php if ($_minimalPriceValue > $_zeroPriceHelper->priceValue()): ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  <p class="minimal-price">
391
  <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
392
  <?php if ($_taxHelper->displayBothPrices()): ?>
386
  ?>
387
  <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
388
  <div class="price-box">
389
+ <?php if ($_zeroPriceHelper->isEnabled()): ?>
390
+ <?php if ($_minimalPriceValue > $_zeroPriceHelper->priceValue()): ?>
391
+ <p class="minimal-price">
392
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
393
+ <?php if ($_taxHelper->displayBothPrices()): ?>
394
+ <span class="price-excluding-tax">
395
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
396
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
397
+ <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
398
+ </span>
399
+ </span>
400
+ <span class="price-including-tax">
401
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
402
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
403
+ <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
404
+ </span>
405
+ </span>
406
+ <?php else: ?>
407
+ <?php
408
+ $_showPrice = $_inclTax;
409
+ if (!$_taxHelper->displayPriceIncludingTax())
410
+ {
411
+ $_showPrice = $_exclTax;
412
+ }
413
+ ?>
414
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
415
+ <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
416
+ </span>
417
+ <?php endif; ?>
418
+ </p>
419
+ <?php endif; ?>
420
+ <?php else: ?>
421
  <p class="minimal-price">
422
  <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
423
  <?php if ($_taxHelper->displayBothPrices()): ?>
app/design/frontend/base/default/template/jalak_zeroprice/catalog/product/view/addtocart.phtml CHANGED
@@ -17,7 +17,7 @@ $_zeroPriceHelper = Mage::helper('jalak_zeroprice');
17
  ?>
18
 
19
  <?php $_product = $this->getProduct() ?>
20
- <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
21
  <?php if ($_product->isSaleable()): ?>
22
  <div class="add-to-cart">
23
  <?php if (!$_product->isGrouped()): ?>
17
  ?>
18
 
19
  <?php $_product = $this->getProduct() ?>
20
+ <?php if ($_zeroPriceHelper->getCanAddToCart() || $_product->getTypeID() == "bundle"): ?>
21
  <?php if ($_product->isSaleable()): ?>
22
  <div class="add-to-cart">
23
  <?php if (!$_product->isGrouped()): ?>
app/design/frontend/base/default/template/jalak_zeroprice/wishlist/button/tocart.phtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Jalak
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 Jalak
13
+ * @package Jalak_Zeroprice
14
+ * @author Hendrathings <hendrathings@gmail.com>
15
+ */
16
+ ?>
17
+ <?php $_zeroPriceHelper = Mage::helper('jalak_zeroprice'); ?>
18
+ <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
19
+ <?php if ($this->getWishlist()->getItemsCount() && $this->getWishlist()->isSalable()): ?>
20
+ <button type="button" title="<?php echo $this->__('Add All to Cart') ?>" onclick="addAllWItemsToCart()" class="button btn-add"><span><span><?php echo $this->__('Add All to Cart') ?></span></span></button>
21
+ <?php endif; ?>
22
+ <?php endif; ?>
app/design/frontend/base/default/template/jalak_zeroprice/wishlist/item/column/cart.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Jalak
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 Jalak
13
+ * @package Jalak_Zeroprice
14
+ * @author Hendrathings <hendrathings@gmail.com>
15
+ */
16
+ /* @var $this Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Cart */
17
+ /* @var Mage_Wishlist_Model_Item $item */
18
+ $item = $this->getItem();
19
+ $product = $item->getProduct();
20
+ $_zeroPriceHelper = Mage::helper('jalak_zeroprice');
21
+ ?>
22
+ <div class="cart-cell">
23
+ <?php echo $this->getPriceHtml($product); ?>
24
+ <div class="add-to-cart-alt">
25
+ <?php if ($item->canHaveQty() && $item->getProduct()->isVisibleInSiteVisibility()): ?>
26
+ <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
27
+ <input type="text" class="input-text qty validate-not-negative-number" name="qty[<?php echo $item->getId() ?>]" value="<?php echo $this->getAddToCartQty($item) * 1 ?>" />
28
+ <?php else: ?>
29
+ <?php if ($product->price > $_zeroPriceHelper->priceValue()): ?>
30
+ <input type="text" class="input-text qty validate-not-negative-number" name="qty[<?php echo $item->getId() ?>]" value="<?php echo $this->getAddToCartQty($item) * 1 ?>" />
31
+ <?php endif; ?>
32
+ <?php endif; ?>
33
+ <?php endif; ?>
34
+ <?php if ($product->isSaleable()): ?>
35
+ <?php if ($_zeroPriceHelper->getCanAddToCart()): ?>
36
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" onclick="addWItemToCart(<?php echo $item->getId() ?>);" class="button btn-cart"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
37
+ <?php else: ?>
38
+ <?php if ($product->price > $_zeroPriceHelper->priceValue()): ?>
39
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" onclick="addWItemToCart(<?php echo $item->getId() ?>);" class="button btn-cart"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
40
+ <?php endif; ?>
41
+ <?php endif; ?>
42
+ <?php else: ?>
43
+ <?php if ($product->getIsSalable()): ?>
44
+ <p class="availability in-stock"><span><?php echo $this->__('In stock') ?></span></p>
45
+ <?php else: ?>
46
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
47
+ <?php endif; ?>
48
+ <?php endif; ?>
49
+ </div>
50
+ <?php foreach ($this->getSortedChildren() as $childName): ?>
51
+ <?php echo $this->getChildHtml($childName, false); ?>
52
+ <?php endforeach; ?>
53
+ <?php if ($product->isVisibleInSiteVisibility()): ?>
54
+ <p><a class="link-edit" href="<?php echo $this->getItemConfigureUrl($item) ?>"><?php echo $this->__('Edit') ?></a></p>
55
+ <?php endif ?>
56
+ </div>
package.xml CHANGED
@@ -1,24 +1,29 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Jalak_Zeroprice</name>
4
- <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Hide price product and add to cart button with condition price value.</summary>
10
- <description>Hide price product and add to cart button with condition price value.</description>
11
  <notes>1.0.0&#xD;
12
  - First Release&#xD;
13
  &#xD;
14
  1.1.0&#xD;
15
  - Update for support Magento version 1.9.0.1&#xD;
16
  - Fix bug in product group&#xD;
17
- - Fix bug for dynamic theme (custom theme)</notes>
 
 
 
 
 
18
  <authors><author><name>I Gusti Agung Mahendra Putra</name><user>hendrathings</user><email>hendrathings@gmail.com</email></author></authors>
19
- <date>2014-08-01</date>
20
- <time>17:35:39</time>
21
- <contents><target name="magecommunity"><dir name="Jalak"><dir name="Zeroprice"><dir name="Block"><dir name="Rewrite"><dir name="Catalog"><dir name="Product"><file name="Price.php" hash="1649d641b071baee23f92b264c511cff"/></dir></dir></dir></dir><file name="Exception.php" hash="fd6361fe33f604679d24fefeabb52d44"/><dir name="Helper"><file name="Data.php" hash="0c155c0e4c3bf45dc5bac6d2082548df"/></dir><dir name="etc"><file name="adminhtml.xml" hash="54bd1269e41f914cf8536fe54c5eec9d"/><file name="config.xml" hash="6dca987541c5fc8e60746ffc404e68dd"/><file name="system.xml" hash="ad0cf62b02eacbe06fdc690e179d0573"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="jalak_zeroprice.xml" hash="ba2e5e658669ed8273cfaf036598c88e"/></dir><dir name="template"><dir name="jalak_zeroprice"><dir name="catalog"><dir name="product"><file name="list.phtml" hash="c3c0b133f2a8d294798de5b166e1b067"/><file name="price.phtml" hash="c161ac94f0cfbc8c7c2dfbdffc19bf0e"/><dir name="view"><file name="addtocart.phtml" hash="2f18367d7d0f38b46924c2d825854d81"/><dir name="type"><file name="grouped.phtml" hash="65499b8cbd8e45041f361761ce09cb14"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Jalak_Zeroprice.xml" hash="65ac2e77d3938c0cff55cf1c8cfe9370"/></dir></target></contents>
22
  <compatible/>
23
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>comunity</channel><min>1.5.0.0</min><max>1.8.0.0</max></package></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Jalak_Zeroprice</name>
4
+ <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Make your catalog price hide from customer whenever the price is zero or setup what price you want to hide.</summary>
10
+ <description>This extension will allow you to hide product's price and add to cart whenever the product's price is zero (default config) or configured what you want price to hide, so the product price will hide if product price equal or less than with config price. Upon setup configuration the customer can not put the product to cart anymore</description>
11
  <notes>1.0.0&#xD;
12
  - First Release&#xD;
13
  &#xD;
14
  1.1.0&#xD;
15
  - Update for support Magento version 1.9.0.1&#xD;
16
  - Fix bug in product group&#xD;
17
+ - Fix bug for dynamic theme (custom theme)&#xD;
18
+ &#xD;
19
+ 1.2.0&#xD;
20
+ - Fix bug in My Wish List page&#xD;
21
+ - Fix bug in Compare Products page&#xD;
22
+ - Fix bug for product bundle</notes>
23
  <authors><author><name>I Gusti Agung Mahendra Putra</name><user>hendrathings</user><email>hendrathings@gmail.com</email></author></authors>
24
+ <date>2014-08-02</date>
25
+ <time>05:02:36</time>
26
+ <contents><target name="magecommunity"><dir name="Jalak"><dir name="Zeroprice"><dir name="Block"><dir name="Rewrite"><dir name="Catalog"><dir name="Product"><file name="Price.php" hash="a999f6c4e401bca41ecd8220b2dc956c"/></dir></dir></dir></dir><file name="Exception.php" hash="fd6361fe33f604679d24fefeabb52d44"/><dir name="Helper"><file name="Data.php" hash="0c155c0e4c3bf45dc5bac6d2082548df"/></dir><dir name="etc"><file name="adminhtml.xml" hash="54bd1269e41f914cf8536fe54c5eec9d"/><file name="config.xml" hash="cd3b1e72e3d72d16b15bb669de321a7c"/><file name="system.xml" hash="ad0cf62b02eacbe06fdc690e179d0573"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="jalak_zeroprice.xml" hash="2b1dc2d4826fd7759186eab4d6dc9194"/></dir><dir name="template"><dir name="jalak_zeroprice"><dir name="catalog"><dir name="product"><dir name="compare"><file name="list.phtml" hash="ed0ba60f12fe6ffb95ac7afdfe618dae"/></dir><file name="list.phtml" hash="5c35f931a168735dd7615a983c1eda5b"/><file name="price.phtml" hash="1222afe99f534eb6a34ed641a5e52147"/><dir name="view"><file name="addtocart.phtml" hash="38669d94410a1def8e8af658e3b560ca"/><dir name="type"><file name="grouped.phtml" hash="65499b8cbd8e45041f361761ce09cb14"/></dir></dir></dir></dir><dir name="wishlist"><dir name="button"><file name="tocart.phtml" hash="bf867a4db0b2a86a3f697723b9087399"/></dir><dir name="item"><dir name="column"><file name="cart.phtml" hash="8da36376f7910bbface64f704a11a94a"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Jalak_Zeroprice.xml" hash="65ac2e77d3938c0cff55cf1c8cfe9370"/></dir></target></contents>
27
  <compatible/>
28
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>comunity</channel><min>1.5.0.0</min><max>1.9.0.1</max></package></required></dependencies>
29
  </package>