Version Notes
If you any suggestions or bugs contact us at http://www.aumento.io
Download this release
Release Info
Developer | Aumento.io |
Extension | aumento_pricehide |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.1.0
app/design/frontend/default/default/layout/pricehide.xml
CHANGED
@@ -50,5 +50,13 @@ Make sure you merge your template files with the below if need
|
|
50 |
|
51 |
</catalog_product_view>
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</layout>
|
54 |
|
50 |
|
51 |
</catalog_product_view>
|
52 |
|
53 |
+
<catalog_product_compare_index>
|
54 |
+
<reference name="content">
|
55 |
+
<reference name="catalog.compare.list">
|
56 |
+
<action method="setTemplate"> <template>pricehide/product-compare-list.phtml</template></action>
|
57 |
+
</reference>
|
58 |
+
</reference>
|
59 |
+
</catalog_product_compare_index>
|
60 |
+
|
61 |
</layout>
|
62 |
|
app/design/frontend/default/default/template/pricehide/product-compare-list.phtml
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
/* @var $this Mage_Catalog_Block_Product_Compare_List */
|
27 |
+
?>
|
28 |
+
<div class="page-title title-buttons">
|
29 |
+
<h1><?php echo $this->__('Compare Products') ?></h1>
|
30 |
+
<a href="#" onclick="window.print(); return false;" class="link-print"><?php echo $this->__('Print This Page') ?></a>
|
31 |
+
</div>
|
32 |
+
<?php $_total=$this->getItems()->getSize() ?>
|
33 |
+
<?php if($_total): ?>
|
34 |
+
<table class="data-table compare-table" id="product_comparison">
|
35 |
+
<?php $_i=0 ?>
|
36 |
+
<?php foreach($this->getItems() as $_item): ?>
|
37 |
+
<?php if($_i++%10==0): ?>
|
38 |
+
<col width="1" />
|
39 |
+
<?php endif; ?>
|
40 |
+
<col width="<?php echo floor(100/$_total); ?>%" />
|
41 |
+
<?php endforeach; ?>
|
42 |
+
<?php if ($_total>2): ?>
|
43 |
+
<thead>
|
44 |
+
<tr>
|
45 |
+
<?php $_i=0 ?>
|
46 |
+
<?php foreach($this->getItems() as $_item): ?>
|
47 |
+
<?php if($_i++%10==0): ?>
|
48 |
+
<th> </th>
|
49 |
+
<?php endif; ?>
|
50 |
+
<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>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</tr>
|
53 |
+
</thead>
|
54 |
+
<?php endif ?>
|
55 |
+
<tbody>
|
56 |
+
<tr class="product-shop-row">
|
57 |
+
<?php $_i=0 ?>
|
58 |
+
<?php foreach($this->getItems() as $_item): ?>
|
59 |
+
<?php if($_i++%10==0): ?>
|
60 |
+
<th> </th>
|
61 |
+
<?php endif; ?>
|
62 |
+
<td>
|
63 |
+
<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>
|
64 |
+
<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>
|
65 |
+
<?php echo $this->getReviewsSummaryHtml($_item, 'short') ?>
|
66 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-top') ?>
|
67 |
+
<?php if($_item->isSaleable()): ?>
|
68 |
+
<?php if (!(Mage::getSingleton('customer/session')->isLoggedIn()) && (Mage::getStoreConfig('catalog/pricehideconfig/active') == 1) ) : ?>
|
69 |
+
|
70 |
+
<?php if (Mage::getStoreConfig('catalog/pricehideconfig/hideadd') == 0) : ?>
|
71 |
+
<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>
|
72 |
+
<?php endif; ?>
|
73 |
+
|
74 |
+
<?php else: ?>
|
75 |
+
<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>
|
76 |
+
<?php endif; ?>
|
77 |
+
<?php else: ?>
|
78 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
81 |
+
<ul class="add-to-links">
|
82 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist" onclick="setPLocation(this.href, true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
83 |
+
</ul>
|
84 |
+
<?php endif; ?>
|
85 |
+
</td>
|
86 |
+
<?php endforeach; ?>
|
87 |
+
</tr>
|
88 |
+
</tbody>
|
89 |
+
<tbody>
|
90 |
+
<?php foreach ($this->getAttributes() as $_attribute): ?>
|
91 |
+
<tr>
|
92 |
+
<?php $_i=0 ?>
|
93 |
+
<?php foreach($this->getItems() as $_item): ?>
|
94 |
+
<?php if($_i++%10==0): ?>
|
95 |
+
<th><span class="nobr"><?php echo $_attribute->getStoreLabel() ?></span></th>
|
96 |
+
<?php endif; ?>
|
97 |
+
<td>
|
98 |
+
<?php switch ($_attribute->getAttributeCode()) {
|
99 |
+
case "price": ?>
|
100 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode()) ?>
|
101 |
+
<?php break;
|
102 |
+
case "small_image": ?>
|
103 |
+
<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()) ?>" />
|
104 |
+
<?php break;
|
105 |
+
case "date":
|
106 |
+
echo substr($this->getProductAttributeValue($_item, $_attribute),0,10);
|
107 |
+
break;
|
108 |
+
default: ?>
|
109 |
+
<div class="std">
|
110 |
+
<?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?>
|
111 |
+
</div>
|
112 |
+
<?php break;
|
113 |
+
} ?>
|
114 |
+
</td>
|
115 |
+
<?php endforeach; ?>
|
116 |
+
</tr>
|
117 |
+
<?php endforeach; ?>
|
118 |
+
</tbody>
|
119 |
+
<tbody>
|
120 |
+
<tr class="add-to-row">
|
121 |
+
<?php $_i=0 ?>
|
122 |
+
<?php foreach($this->getItems() as $_item): ?>
|
123 |
+
<?php if($_i++%10==0): ?>
|
124 |
+
<th> </th>
|
125 |
+
<?php endif; ?>
|
126 |
+
<td>
|
127 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
|
128 |
+
<?php if($_item->isSaleable()): ?>
|
129 |
+
<?php if (!(Mage::getSingleton('customer/session')->isLoggedIn()) && (Mage::getStoreConfig('catalog/pricehideconfig/active') == 1) ) : ?>
|
130 |
+
|
131 |
+
<?php if (Mage::getStoreConfig('catalog/pricehideconfig/hideadd') == 0) : ?>
|
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 |
+
|
135 |
+
<?php else: ?>
|
136 |
+
<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>
|
137 |
+
<?php endif; ?>
|
138 |
+
|
139 |
+
<?php else: ?>
|
140 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
141 |
+
<?php endif; ?>
|
142 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
143 |
+
<ul class="add-to-links">
|
144 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item);?>" class="link-wishlist" onclick="setPLocation(this.href, true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
145 |
+
</ul>
|
146 |
+
<?php endif; ?>
|
147 |
+
</td>
|
148 |
+
<?php endforeach; ?>
|
149 |
+
</tr>
|
150 |
+
</tbody>
|
151 |
+
</table>
|
152 |
+
<div class="buttons-set">
|
153 |
+
<button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
|
154 |
+
<span class="please-wait" id="compare-list-please-wait" style="display:none;">
|
155 |
+
<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...') ?>
|
156 |
+
</span>
|
157 |
+
</div>
|
158 |
+
<script type="text/javascript">
|
159 |
+
decorateTable('product_comparison');
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Send remove item request, after that reload windows
|
163 |
+
*/
|
164 |
+
function removeItem(url)
|
165 |
+
{
|
166 |
+
new Ajax.Request(url, {
|
167 |
+
parameters: {isAjax: 1, method: 'POST'},
|
168 |
+
onLoading: function(){$('compare-list-please-wait').show();},
|
169 |
+
onSuccess: function(transport) {
|
170 |
+
$('compare-list-please-wait').hide();
|
171 |
+
window.location.reload();
|
172 |
+
window.opener.location.reload();
|
173 |
+
}
|
174 |
+
});
|
175 |
+
}
|
176 |
+
</script>
|
177 |
+
<?php else: ?>
|
178 |
+
<script type="text/javascript">window.close();</script>
|
179 |
+
<?php endif; ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>aumento_pricehide</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses">GNU General Public License, version 3 (GPL-3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>The PriceHide extension only show product pricing to logged-in users and hide it from guests.</description>
|
11 |
<notes>If you any suggestions or bugs contact us at http://www.aumento.io</notes>
|
12 |
<authors><author><name>Aumento.io</name><user>yehiasalam</user><email>yehiasalam@cairocubicles.com</email></author></authors>
|
13 |
-
<date>2012-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Aumento"><dir name="PriceHide"><dir name="Block"><file name="Price.php" hash="3abb9913b36982c80b07992b22f40ae2"/></dir><dir name="Helper"><file name="Data.php" hash="578f1dbbb35288f10f8c693d94571bc3"/></dir><dir name="etc"><file name="config.xml" hash="99bea5ef4b530f57d33f946f89835bc7"/><file name="system.xml" hash="11b897006466c04da623e47f9b68942a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Aumento_PriceHide.xml" hash="2e479e67a381ff8646838e9390569968"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="pricehide"><file name="price.phtml" hash="69244d385c8c540ce8623db2213407fa"/><file name="product-list.phtml" hash="ad3ddd84b489ed04a024b2ff4d2d9c6a"/><file name="product-view-addtocart.phtml" hash="5b8170a1be761821d862b9b8fbb55252"/><file name="product-view.phtml" hash="8a5d7eb22e22cdb8e78a7c2e1aba3c9d"/></dir></dir><dir name="layout"><file name="pricehide.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>aumento_pricehide</name>
|
4 |
+
<version>2.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses">GNU General Public License, version 3 (GPL-3.0)</license>
|
7 |
<channel>community</channel>
|
10 |
<description>The PriceHide extension only show product pricing to logged-in users and hide it from guests.</description>
|
11 |
<notes>If you any suggestions or bugs contact us at http://www.aumento.io</notes>
|
12 |
<authors><author><name>Aumento.io</name><user>yehiasalam</user><email>yehiasalam@cairocubicles.com</email></author></authors>
|
13 |
+
<date>2012-12-01</date>
|
14 |
+
<time>12:47:24</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Aumento"><dir name="PriceHide"><dir name="Block"><file name="Price.php" hash="3abb9913b36982c80b07992b22f40ae2"/></dir><dir name="Helper"><file name="Data.php" hash="578f1dbbb35288f10f8c693d94571bc3"/></dir><dir name="etc"><file name="config.xml" hash="99bea5ef4b530f57d33f946f89835bc7"/><file name="system.xml" hash="11b897006466c04da623e47f9b68942a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Aumento_PriceHide.xml" hash="2e479e67a381ff8646838e9390569968"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="pricehide"><file name="price.phtml" hash="69244d385c8c540ce8623db2213407fa"/><file name="product-compare-list.phtml" hash="6731c61dcbbe7411a70fd2f528fdb283"/><file name="product-list.phtml" hash="ad3ddd84b489ed04a024b2ff4d2d9c6a"/><file name="product-view-addtocart.phtml" hash="5b8170a1be761821d862b9b8fbb55252"/><file name="product-view.phtml" hash="8a5d7eb22e22cdb8e78a7c2e1aba3c9d"/></dir></dir><dir name="layout"><file name="pricehide.xml" hash="de7c36aa72e4a641f12b0966c23ebf2b"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|