Hide-Price-and-Add-to-Cart-for-Guests-Users - Version 0.1.0

Version Notes

Compatible with 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7, 1.8, 1.8.1, 1.9.
The latest upgrade version of Hideprice for Guest Users includes the following features:
Disable "Add to cart" button
Apply to one or more product and categories
Display a message instead of the button
Customized as per your needs.
This extension has been tested for compatibility with Community Edition 1.5 later in systems without additional extensions. The compatibility and behaviour is guaranteed for installations on clean code for the preceding versions.

Download this release

Release Info

Developer Deepak mnakotia
Extension Hide-Price-and-Add-to-Cart-for-Guests-Users
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/local/Magegeeks/Hideprice/Helper/Data.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Package : Magegeeks
4
+ * Module : Magegeeks_Hideprice
5
+ * Developer : Deepak Mankotia
6
+ * Email : deepakmankotiacse@gmail.com
7
+ */
8
+
9
+ class Magegeeks_Hideprice_Helper_Data extends Mage_Core_Helper_Abstract
10
+ {
11
+
12
+ }
app/code/local/Magegeeks/Hideprice/Model/Observer.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @Module Magegeeks_Registration
5
+ * @Developer Deepak Mankotia
6
+ * @Email deepakmankotiacse@gmail.com
7
+ */
8
+ class Magegeeks_Hideprice_Model_Observer
9
+ {
10
+
11
+
12
+ public function customerlogin($observer)
13
+ {
14
+ if($observer->getCustomer()->getStatus_type()):
15
+
16
+ return true;
17
+ else:
18
+
19
+ Mage::getSingleton('customer/session')->logout();
20
+ Mage::getSingleton('customer/session')->addError('This account is not activated yet.');
21
+
22
+ return false;
23
+ endif;
24
+
25
+ }
26
+
27
+ }
28
+
29
+
30
+
app/code/local/Magegeeks/Hideprice/etc/config.xml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magegeeks_Hideprice>
5
+ <version>0.1.0</version>
6
+ </Magegeeks_Hideprice>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <hideprice>
11
+ <class>Magegeeks_Hideprice_Helper</class>
12
+ </hideprice>
13
+ </helpers>
14
+ <models>
15
+ <magegeeks_hideprice>
16
+ <class>Magegeeks_Hideprice_Model</class>
17
+
18
+ </magegeeks_hideprice>
19
+ </models>
20
+ <events>
21
+ <customer_login>
22
+ <observers>
23
+ <magegeeks_hideprice_observer>
24
+ <type>singleton</type>
25
+ <class>Magegeeks_Hideprice_Model_Observer</class>
26
+ <method>customerlogin</method>
27
+ </magegeeks_hideprice_observer>
28
+ </observers>
29
+ </customer_login>
30
+ </events>
31
+ </global>
32
+ <frontend>
33
+ <routers>
34
+ <routeurfrontend>
35
+ <use>standard</use>
36
+ <args>
37
+ <module>Magegeeks_Hideprice</module>
38
+ <frontName>hideprice</frontName>
39
+ </args>
40
+ </routeurfrontend>
41
+ </routers>
42
+ <layout>
43
+ <updates>
44
+ <hideprice>
45
+ <file>hideprice.xml</file>
46
+ </hideprice>
47
+ </updates>
48
+ </layout>
49
+
50
+ </frontend>
51
+ <adminhtml>
52
+ <acl>
53
+ <resources>
54
+ <all>
55
+ <title>Magegeeks Extensions</title>
56
+ </all>
57
+ <admin>
58
+ <children>
59
+ <system>
60
+ <children>
61
+ <config>
62
+ <children>
63
+ <magegeeks_hideprice translate="title" module="hideprice">
64
+ <title>Magegeeks Section</title>
65
+ <sort_order>0</sort_order>
66
+ </magegeeks_hideprice>
67
+ </children>
68
+ </config>
69
+ </children>
70
+ </system>
71
+ </children>
72
+ </admin>
73
+ </resources>
74
+ </acl>
75
+ </adminhtml>
76
+ </config>
app/code/local/Magegeeks/Hideprice/etc/system.xml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <magegeeks translate="label" module="hideprice">
5
+ <label>Magegeeks Extensions</label>
6
+ <sort_order>100</sort_order>
7
+ </magegeeks>
8
+ </tabs>
9
+ <sections>
10
+ <magegeeks_hideprice translate="label" module="hideprice">
11
+ <label>Price Hide Extension</label>
12
+ <tab>magegeeks</tab>
13
+ <sort_order>1000</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+
18
+ <groups>
19
+ <magegeeks_group translate="label" module="hideprice">
20
+ <label>Price/Cart settings</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>1000</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+
27
+ <fields>
28
+ <price_enable translate="label">
29
+ <label>Enable Extension : </label>
30
+ <comment>This will enable price hide functinality to Guestes users.</comment>
31
+ <frontend_type>select</frontend_type>
32
+ <sort_order>10</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
37
+ </price_enable>
38
+
39
+ <price_text translate="label">
40
+ <label>Price text : </label>
41
+ <comment>Text to display instead of price for guest user.</comment>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>11</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+
48
+ </price_text>
49
+ <cart_text translate="label">
50
+ <label>Cart text : </label>
51
+ <comment>Text to display instead of Cart button for guest user.</comment>
52
+ <frontend_type>text</frontend_type>
53
+ <sort_order>12</sort_order>
54
+ <show_in_default>1</show_in_default>
55
+ <show_in_website>1</show_in_website>
56
+ <show_in_store>1</show_in_store>
57
+
58
+ </cart_text>
59
+
60
+ </fields>
61
+ </magegeeks_group>
62
+ </groups>
63
+ </magegeeks_hideprice>
64
+ </sections>
65
+ </config>
app/design/frontend/base/default/layout/hideprice.xml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @package Magegeeks_Hideprice
5
+ * @Developer Deepak Mankotia
6
+ * @Email deepakmankotiacse@gmail.com
7
+ */
8
+
9
+ -->
10
+ <layout>
11
+ <default>
12
+ <reference name="catalog_product_price_template">
13
+ <action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>hideprice/price.phtml</template></action>
14
+ <action method="addPriceBlockType"><type>grouped</type><block>catalog/product_price</block><template>hideprice/price.phtml</template></action>
15
+ <action method="addPriceBlockType"><type>configurable</type><block>catalog/product_price</block><template>hideprice/price.phtml</template></action>
16
+ <action method="addPriceBlockType"><type>virtual</type><block>catalog/product_price</block><template>hideprice/price.phtml</template></action>
17
+ <action method="addPriceBlockType"><type>bundled</type><block>catalog/product_price</block><template>hideprice/price.phtml</template></action>
18
+ </reference>
19
+ </default>
20
+
21
+ <catalog_category_default>
22
+ <reference name="product_list">
23
+ <action method="setTemplate"><template>hideprice/list.phtml</template></action>
24
+ </reference>
25
+ </catalog_category_default>
26
+
27
+ <catalog_category_layered>
28
+ <reference name="product_list">
29
+ <action method="setTemplate"><template>hideprice/list.phtml</template></action>
30
+ </reference>
31
+ </catalog_category_layered>
32
+ <catalog_product_view>
33
+ <reference name="product.info.addtocart">
34
+ <action method="setTemplate"><template>hideprice/addtocart.phtml</template></action>
35
+ </reference>
36
+ </catalog_product_view>
37
+ <catalog_product_compare_index>
38
+ <reference name="catalog.compare.list">
39
+ <action method="setTemplate"><template>hideprice/compare/list.phtml</template></action>
40
+ </reference>
41
+ </catalog_product_compare_index>
42
+ </layout>
app/design/frontend/base/default/template/hideprice/addtocart.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Magegeeks_Hideprice
5
+ * @Developer Deepak Mankotia
6
+ * @Email deepakmankotiacse@gmail.com
7
+ */
8
+
9
+
10
+ ?>
11
+ <?php
12
+ #condition to check user is loggedin or not
13
+ if(!Mage::getSingleton('customer/session')->isLoggedIn() AND Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_enable')):
14
+ echo '<span class="login_for_price"><b>'.Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/cart_text').'</b></span><br>';
15
+ return;
16
+ endif;
17
+ ?>
18
+ <?php $_product = $this->getProduct(); ?>
19
+ <?php $buttonTitle = $this->__('Add to Cart'); ?>
20
+ <?php if($_product->isSaleable()): ?>
21
+ <div class="add-to-cart">
22
+ <?php if(!$_product->isGrouped()): ?>
23
+ <label for="qty"><?php echo $this->__('Qty:') ?></label>
24
+ <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
25
+ <?php endif; ?>
26
+ <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
27
+ <?php echo $this->getChildHtml('', true, true) ?>
28
+ </div>
29
+ <?php endif; ?>
app/design/frontend/base/default/template/hideprice/compare/list.phtml ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Magegeeks_Hideprice
5
+ * @Developer Deepak Mankotia
6
+ * @Email deepakmankotiacse@gmail.com
7
+ */
8
+
9
+
10
+ ?>
11
+ <div class="page-title title-buttons">
12
+ <h1><?php echo $this->__('Compare Products') ?></h1>
13
+ <a href="#" onclick="window.print(); return false;" class="link-print"><?php echo $this->__('Print This Page') ?></a>
14
+ </div>
15
+ <?php $_total=$this->getItems()->getSize() ?>
16
+ <?php if($_total): ?>
17
+ <table class="data-table compare-table" id="product_comparison">
18
+ <?php $_i=0 ?>
19
+ <?php foreach($this->getItems() as $_item): ?>
20
+ <?php if($_i++%10==0): ?>
21
+ <col width="1" />
22
+ <?php endif; ?>
23
+ <col width="<?php echo floor(100/$_total); ?>%" />
24
+ <?php endforeach; ?>
25
+ <?php if ($_total>2): ?>
26
+ <thead>
27
+ <tr>
28
+ <?php $_i=0 ?>
29
+ <?php foreach($this->getItems() as $_item): ?>
30
+ <?php if($_i++%10==0): ?>
31
+ <th>&nbsp;</th>
32
+ <?php endif; ?>
33
+ <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>
34
+ <?php endforeach; ?>
35
+ </tr>
36
+ </thead>
37
+ <?php endif ?>
38
+ <tbody>
39
+ <tr class="product-shop-row">
40
+ <?php $_i=0 ?>
41
+ <?php foreach($this->getItems() as $_item): ?>
42
+ <?php if($_i++%10==0): ?>
43
+ <th>&nbsp;</th>
44
+ <?php endif; ?>
45
+ <td>
46
+ <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>
47
+ <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>
48
+ <?php echo $this->getReviewsSummaryHtml($_item, 'short') ?>
49
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-top') ?>
50
+
51
+ <?php
52
+ if(!Mage::getSingleton('customer/session')->isLoggedIn() AND Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_enable')):
53
+ echo '<span class="login_for_details" style="float:left"><b>'.Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/cart_text').'</b></span>';
54
+
55
+ else:
56
+ ?>
57
+ <?php if($_product->isSaleable()): ?>
58
+ <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>
59
+ <?php else: ?>
60
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
61
+ <?php endif; ?>
62
+ <?php endif;?>
63
+
64
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
65
+ <ul class="add-to-links">
66
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
67
+ </ul>
68
+ <?php endif; ?>
69
+ </td>
70
+ <?php endforeach; ?>
71
+ </tr>
72
+ </tbody>
73
+ <tbody>
74
+ <?php foreach ($this->getAttributes() as $_attribute): ?>
75
+ <tr>
76
+ <?php $_i=0 ?>
77
+ <?php foreach($this->getItems() as $_item): ?>
78
+ <?php if($_i++%10==0): ?>
79
+ <th><span class="nobr"><?php echo $_attribute->getStoreLabel() ?></span></th>
80
+ <?php endif; ?>
81
+ <td>
82
+ <?php switch ($_attribute->getAttributeCode()) {
83
+ case "price": ?>
84
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode()) ?>
85
+ <?php break;
86
+ case "small_image": ?>
87
+ <img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->escapeHtml($_item->getName()) ?>" title="<?php echo $this->escapeHtml($_item->getName()) ?>" />
88
+ <?php break;
89
+ case "date":
90
+ echo substr($this->getProductAttributeValue($_item, $_attribute),0,10);
91
+ break;
92
+ default: ?>
93
+ <div class="std">
94
+ <?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?>
95
+ </div>
96
+ <?php break;
97
+ } ?>
98
+ </td>
99
+ <?php endforeach; ?>
100
+ </tr>
101
+ <?php endforeach; ?>
102
+ </tbody>
103
+ <tbody>
104
+ <tr class="add-to-row">
105
+ <?php $_i=0 ?>
106
+ <?php foreach($this->getItems() as $_item): ?>
107
+ <?php if($_i++%10==0): ?>
108
+ <th>&nbsp;</th>
109
+ <?php endif; ?>
110
+ <td>
111
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
112
+
113
+ <?php
114
+ if(!Mage::getSingleton('customer/session')->isLoggedIn() AND Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_enable')):
115
+ echo '<span class="login_for_details" style="float:left"><b>'.Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/cart_text').'</b></span>';
116
+
117
+ else:
118
+ ?>
119
+ <?php if($_product->isSaleable()): ?>
120
+ <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>
121
+ <?php else: ?>
122
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
123
+ <?php endif; ?>
124
+ <?php endif;?>
125
+
126
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
127
+ <ul class="add-to-links">
128
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item);?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
129
+ </ul>
130
+ <?php endif; ?>
131
+ </td>
132
+ <?php endforeach; ?>
133
+ </tr>
134
+ </tbody>
135
+ </table>
136
+ <div class="buttons-set">
137
+ <button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
138
+ <span class="please-wait" id="compare-list-please-wait" style="display:none;">
139
+ <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...') ?>
140
+ </span>
141
+ </div>
142
+ <script type="text/javascript">
143
+ decorateTable('product_comparison');
144
+
145
+ /**
146
+ * Send remove item request, after that reload windows
147
+ */
148
+ function removeItem(url)
149
+ {
150
+ new Ajax.Request(url, {
151
+ parameters: {isAjax: 1, method: 'POST'},
152
+ onLoading: function(){$('compare-list-please-wait').show();},
153
+ onSuccess: function(transport) {
154
+ $('compare-list-please-wait').hide();
155
+ window.location.reload();
156
+ window.opener.location.reload();
157
+ }
158
+ });
159
+ }
160
+ </script>
161
+ <?php else: ?>
162
+ <script type="text/javascript">window.close();</script>
163
+ <?php endif; ?>
app/design/frontend/base/default/template/hideprice/list.phtml ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Magegeeks_Hideprice
5
+ * @Developer Deepak Mankotia
6
+ * @Email deepakmankotiacse@gmail.com
7
+ */
8
+
9
+
10
+ ?>
11
+ <?php
12
+ $_productCollection=$this->getLoadedProductCollection();
13
+ $_helper = $this->helper('catalog/output');
14
+ ?>
15
+ <?php if(!$_productCollection->count()): ?>
16
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
17
+ <?php else: ?>
18
+ <div class="category-products">
19
+ <?php echo $this->getToolbarHtml() ?>
20
+ <?php // List mode ?>
21
+ <?php if($this->getMode()!='grid'): ?>
22
+ <?php $_iterator = 0; ?>
23
+ <ol class="products-list" id="products-list">
24
+ <?php foreach ($_productCollection as $_product): ?>
25
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
26
+ <?php // Product Image ?>
27
+ <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) ?>" /></a>
28
+ <?php // Product description ?>
29
+ <div class="product-shop">
30
+ <div class="f-fix">
31
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
32
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
33
+ <?php if($_product->getRatingSummary()): ?>
34
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
35
+ <?php endif; ?>
36
+ <?php echo $this->getPriceHtml($_product, true) ?>
37
+
38
+
39
+ <?php
40
+ if(!Mage::getSingleton('customer/session')->isLoggedIn() AND Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_enable')):
41
+ echo '<span class="login_for_details" style="float:left"><b>'.Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/cart_text').'</b></span>';
42
+
43
+ else:
44
+ ?>
45
+ <?php if($_product->isSaleable()): ?>
46
+ <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>
47
+ <?php else: ?>
48
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
49
+ <?php endif; ?>
50
+ <?php endif;?>
51
+
52
+ <div class="desc std">
53
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
54
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
55
+ </div>
56
+ <ul class="add-to-links">
57
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
58
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
59
+ <?php endif; ?>
60
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
61
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
62
+ <?php endif; ?>
63
+ </ul>
64
+ </div>
65
+ </div>
66
+ </li>
67
+ <?php endforeach; ?>
68
+ </ol>
69
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
70
+
71
+ <?php else: ?>
72
+
73
+ <?php // Grid Mode ?>
74
+
75
+ <?php $_collectionSize = $_productCollection->count() ?>
76
+ <?php $_columnCount = $this->getColumnCount(); ?>
77
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
78
+ <?php if ($i++%$_columnCount==0): ?>
79
+ <ul class="products-grid">
80
+ <?php endif ?>
81
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
82
+ <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) ?>" /></a>
83
+ <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>
84
+ <?php if($_product->getRatingSummary()): ?>
85
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
86
+ <?php endif; ?>
87
+ <?php echo $this->getPriceHtml($_product, true) ?>
88
+ <div class="actions">
89
+ <?php
90
+ if(!Mage::getSingleton('customer/session')->isLoggedIn() AND Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_enable')):
91
+ echo '<span class="login_for_details" style="float:left"><b>'.Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/cart_text').'</b></span>';
92
+
93
+ else:
94
+ ?>
95
+ <?php if($_product->isSaleable()): ?>
96
+ <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>
97
+ <?php else: ?>
98
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
99
+ <?php endif; ?>
100
+ <?php endif;?>
101
+
102
+ <ul class="add-to-links">
103
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
104
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
105
+ <?php endif; ?>
106
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
107
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
108
+ <?php endif; ?>
109
+ </ul>
110
+ </div>
111
+ </li>
112
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
113
+ </ul>
114
+ <?php endif ?>
115
+ <?php endforeach ?>
116
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
117
+ <?php endif; ?>
118
+
119
+ <div class="toolbar-bottom">
120
+ <?php echo $this->getToolbarHtml() ?>
121
+ </div>
122
+ </div>
123
+ <?php endif; ?>
app/design/frontend/base/default/template/hideprice/price.phtml ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package Magegeeks_Hideprice
5
+ * @Developer Deepak Mankotia
6
+ * @Email deepakmankotiacse@gmail.com
7
+ */
8
+
9
+
10
+ ?>
11
+ <?php
12
+ #check wheather user is log in or not
13
+ if(!Mage::getSingleton('customer/session')->isLoggedIn() AND Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_enable')):
14
+ echo '<span class="login_for_price"><b>'.Mage::getStoreConfig('magegeeks_hideprice/magegeeks_group/price_text').'</b></span><br>';
15
+ return;
16
+ endif;
17
+ ?>
18
+ <?php
19
+ $_coreHelper = $this->helper('core');
20
+ $_weeeHelper = $this->helper('weee');
21
+ $_taxHelper = $this->helper('tax');
22
+ /* @var $_coreHelper Mage_Core_Helper_Data */
23
+ /* @var $_weeeHelper Mage_Weee_Helper_Data */
24
+ /* @var $_taxHelper Mage_Tax_Helper_Data */
25
+
26
+ $_product = $this->getProduct();
27
+ $_storeId = $_product->getStoreId();
28
+ $_store = $_product->getStore();
29
+ $_id = $_product->getId();
30
+ $_weeeSeparator = '';
31
+ $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
32
+ $_minimalPriceValue = $_product->getMinimalPrice();
33
+ $_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
34
+ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
35
+ $_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
36
+ $_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
37
+ ?>
38
+
39
+ <?php if (!$_product->isGrouped()): ?>
40
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
41
+ <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
42
+ <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
43
+ <?php if ($_weeeHelper->isTaxable()): ?>
44
+ <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
45
+ <?php endif; ?>
46
+ <?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
47
+ <?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
48
+
49
+ <div class="price-box">
50
+ <?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
51
+ <?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
52
+ <?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
53
+ <?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
54
+ <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
55
+ <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
56
+ <?php if ($_finalPrice >= $_price): ?>
57
+ <?php if ($_taxHelper->displayBothPrices()): ?>
58
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
59
+ <span class="price-excluding-tax">
60
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
61
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
62
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
63
+ </span>
64
+ </span>
65
+ <span class="price-including-tax">
66
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
67
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
68
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
69
+ </span>
70
+ </span>
71
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
72
+ <span class="price-excluding-tax">
73
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
74
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
75
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
76
+ </span>
77
+ </span>
78
+ <span class="weee">(
79
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
80
+ <?php echo $_weeeSeparator; ?>
81
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
82
+ <?php $_weeeSeparator = ' + '; ?>
83
+ <?php endforeach; ?>
84
+ )</span>
85
+ <span class="price-including-tax">
86
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
87
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
88
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
89
+ </span>
90
+ </span>
91
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
92
+ <span class="price-excluding-tax">
93
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
94
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
95
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
96
+ </span>
97
+ </span>
98
+ <span class="price-including-tax">
99
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
100
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
101
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
102
+ </span>
103
+ <span class="weee">(
104
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
105
+ <?php echo $_weeeSeparator; ?>
106
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
107
+ <?php $_weeeSeparator = ' + '; ?>
108
+ <?php endforeach; ?>
109
+ )</span>
110
+ </span>
111
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
112
+ <span class="price-excluding-tax">
113
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
114
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
115
+ <?php echo $_coreHelper->formatPrice($_price, false) ?>
116
+ </span>
117
+ </span>
118
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
119
+ <span class="weee">
120
+ <?php echo $_weeeTaxAttribute->getName(); ?>
121
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
122
+ </span>
123
+ <?php endforeach; ?>
124
+ <span class="price-including-tax">
125
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
126
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
127
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
128
+ </span>
129
+ </span>
130
+ <?php else: ?>
131
+ <span class="price-excluding-tax">
132
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
133
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
134
+ <?php if ($_finalPrice == $_price): ?>
135
+ <?php echo $_coreHelper->formatPrice($_price, false) ?>
136
+ <?php else: ?>
137
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
138
+ <?php endif; ?>
139
+ </span>
140
+ </span>
141
+ <span class="price-including-tax">
142
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
143
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
144
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
145
+ </span>
146
+ </span>
147
+ <?php endif; ?>
148
+ <?php else: ?>
149
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1))): // including ?>
150
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
151
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
152
+ <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
153
+ </span>
154
+
155
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // show description ?>
156
+ <span class="weee">(
157
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
158
+ <?php echo $_weeeSeparator; ?>
159
+ <?php echo $_weeeTaxAttribute->getName(); ?>
160
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
161
+ <?php $_weeeSeparator = ' + '; ?>
162
+ <?php endforeach; ?>
163
+ )</span>
164
+ <?php endif; ?>
165
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
166
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
167
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, true) ?>
168
+ </span>
169
+ <span class="weee">(
170
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
171
+ <?php echo $_weeeSeparator; ?>
172
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
173
+ <?php $_weeeSeparator = ' + '; ?>
174
+ <?php endforeach; ?>
175
+ )</span>
176
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
177
+ <span class="regular-price"><?php echo $_coreHelper->formatPrice($_price, true) ?></span><br/>
178
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
179
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
180
+ <span class="weee">
181
+ <?php echo $_weeeTaxAttribute->getName(); ?>
182
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
183
+ </span>
184
+ <?php endforeach; ?>
185
+ <span class="regular-price"
186
+ id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
187
+ <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
188
+ </span>
189
+ <?php else: ?>
190
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
191
+ <?php if ($_finalPrice == $_price): ?>
192
+ <?php echo $_coreHelper->formatPrice($_price, true) ?>
193
+ <?php else: ?>
194
+ <?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
195
+ <?php endif; ?>
196
+ </span>
197
+ <?php endif; ?>
198
+ <?php endif; ?>
199
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
200
+ <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
201
+ <?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
202
+
203
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
204
+ <p class="old-price">
205
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
206
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
207
+ <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
208
+ </span>
209
+ </p>
210
+
211
+ <?php if ($_taxHelper->displayBothPrices()): ?>
212
+ <p class="special-price">
213
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
214
+ <span class="price-excluding-tax">
215
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
216
+ <span class="price"
217
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
218
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
219
+ </span>
220
+ </span>
221
+ <span class="price-including-tax">
222
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
223
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
224
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
225
+ </span>
226
+ </span>
227
+ </p>
228
+ <?php else: ?>
229
+ <p class="special-price">
230
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
231
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
232
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
233
+ </span>
234
+ </p>
235
+ <?php endif; ?>
236
+
237
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
238
+ <p class="old-price">
239
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
240
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
241
+ <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
242
+ </span>
243
+ </p>
244
+
245
+ <p class="special-price">
246
+ <?php if ($_taxHelper->displayBothPrices()): ?>
247
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
248
+ <span class="price-excluding-tax">
249
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
250
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
251
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
252
+ </span>
253
+ </span>
254
+ <span class="weee">(
255
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
256
+ <?php echo $_weeeSeparator; ?>
257
+ <?php echo $_weeeTaxAttribute->getName(); ?>
258
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
259
+ <?php $_weeeSeparator = ' + '; ?>
260
+ <?php endforeach; ?>
261
+ )</span>
262
+ <span class="price-including-tax">
263
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
264
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
265
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
266
+ </span>
267
+ </span>
268
+ <?php else: ?>
269
+ <p class="special-price">
270
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
271
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
272
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
273
+ </span>
274
+ </p>
275
+ <span class="weee">(
276
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
277
+ <?php echo $_weeeSeparator; ?>
278
+ <?php echo $_weeeTaxAttribute->getName(); ?>
279
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
280
+ <?php $_weeeSeparator = ' + '; ?>
281
+ <?php endforeach; ?>
282
+ )</span>
283
+ <?php endif; ?>
284
+ </p>
285
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
286
+ <p class="old-price">
287
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
288
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
289
+ <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
290
+ </span>
291
+ </p>
292
+
293
+ <p class="special-price">
294
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
295
+ <span class="price-excluding-tax">
296
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
297
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
298
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
299
+ </span>
300
+ </span>
301
+ <span class="weee">(
302
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
303
+ <?php echo $_weeeSeparator; ?>
304
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
305
+ <?php $_weeeSeparator = ' + '; ?>
306
+ <?php endforeach; ?>
307
+ )</span>
308
+ <span class="price-including-tax">
309
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
310
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
311
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
312
+ </span>
313
+ </span>
314
+ </p>
315
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
316
+ <p class="old-price">
317
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
318
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
319
+ <?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
320
+ </span>
321
+ </p>
322
+
323
+ <p class="special-price">
324
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
325
+ <span class="price-excluding-tax">
326
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
327
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
328
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
329
+ </span>
330
+ </span>
331
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
332
+ <span class="weee">
333
+ <?php echo $_weeeTaxAttribute->getName(); ?>
334
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
335
+ </span>
336
+ <?php endforeach; ?>
337
+ <span class="price-including-tax">
338
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
339
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
340
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
341
+ </span>
342
+ </span>
343
+ </p>
344
+ <?php else: // excl. ?>
345
+ <p class="old-price">
346
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
347
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
348
+ <?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
349
+ </span>
350
+ </p>
351
+
352
+ <?php if ($_taxHelper->displayBothPrices()): ?>
353
+ <p class="special-price">
354
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
355
+ <span class="price-excluding-tax">
356
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
357
+ <span class="price"
358
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
359
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
360
+ </span>
361
+ </span>
362
+ <span class="price-including-tax">
363
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
364
+ <span class="price"
365
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
366
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
367
+ </span>
368
+ </span>
369
+ </p>
370
+ <?php else: ?>
371
+ <p class="special-price">
372
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
373
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
374
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
375
+ </span>
376
+ </p>
377
+ <?php endif; ?>
378
+ <?php endif; ?>
379
+
380
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
381
+
382
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_convertedFinalPrice): ?>
383
+
384
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
385
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
386
+ <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
387
+ <?php endif; ?>
388
+
389
+ <?php if ($this->getUseLinkForAsLowAs()): ?>
390
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
391
+ <?php else: ?>
392
+ <span class="minimal-price-link">
393
+ <?php endif ?>
394
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
395
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
396
+ <?php echo $_coreHelper->formatPrice($_minimalPriceDisplayValue, false) ?>
397
+ </span>
398
+ <?php if ($this->getUseLinkForAsLowAs()): ?>
399
+ </a>
400
+ <?php else: ?>
401
+ </span>
402
+ <?php endif ?>
403
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
404
+ </div>
405
+
406
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
407
+ <?php
408
+ $showMinPrice = $this->getDisplayMinimalPrice();
409
+ if ($showMinPrice && $_minimalPriceValue) {
410
+ $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
411
+ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
412
+ $price = $showMinPrice ? $_minimalPriceValue : 0;
413
+ } else {
414
+ $price = $_convertedFinalPrice;
415
+ $_exclTax = $_taxHelper->getPrice($_product, $price);
416
+ $_inclTax = $_taxHelper->getPrice($_product, $price, true);
417
+ }
418
+ ?>
419
+ <?php if ($price): ?>
420
+ <div class="price-box">
421
+ <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
422
+ <?php if ($showMinPrice): ?>
423
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
424
+ <?php endif ?>
425
+ <?php if ($_taxHelper->displayBothPrices()): ?>
426
+ <span class="price-excluding-tax">
427
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
428
+ <span class="price"
429
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
430
+ <?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
431
+ </span>
432
+ </span>
433
+ <span class="price-including-tax">
434
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
435
+ <span class="price"
436
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
437
+ <?php echo $_coreHelper->formatPrice($_inclTax, false) ?>
438
+ </span>
439
+ </span>
440
+ <?php else: ?>
441
+ <?php
442
+ $_showPrice = $_inclTax;
443
+ if (!$_taxHelper->displayPriceIncludingTax()) {
444
+ $_showPrice = $_exclTax;
445
+ }
446
+ ?>
447
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
448
+ <?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
449
+ </span>
450
+ <?php endif; ?>
451
+ </p>
452
+ </div>
453
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
454
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
app/etc/modules/Magegeeks_Hideprice.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magegeeks_Hideprice>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>0.1.0</version>
8
+ </Magegeeks_Hideprice>
9
+ </modules>
10
+ </config>
11
+
12
+
package.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Hide-Price-and-Add-to-Cart-for-Guests-Users</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Online store owners often have a need no price on product page or hide price if not logged in on the detail pages for a wide range of reasons including when a product price is not fixed or needs to be quoted based on specifications and so on. The Hideprice extension provides functionality to globally hide price for guest user with simple solution</summary>
10
+ <description>Price Hide extension is the most comprehensive &amp;amp; customizable extension to hide product prices and Add to cart from guests, visitors, customers based on store's business requirements. Hide price extension is fully loaded with add-on functionalities like "Call for price", "Hide add to cart button" to manage products in faster, reliable manner. Price Hide extension allows store owners to define custom messages to personalize the shopping flow.&#xD;
11
+ Disable "Add to cart" button&#xD;
12
+ Apply to one or more product and categories&#xD;
13
+ Display a message instead of the button&#xD;
14
+ Customized as per your needs.</description>
15
+ <notes>Compatible with 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7, 1.8, 1.8.1, 1.9.&#xD;
16
+ The latest upgrade version of Hideprice for Guest Users includes the following features:&#xD;
17
+ Disable "Add to cart" button&#xD;
18
+ Apply to one or more product and categories&#xD;
19
+ Display a message instead of the button&#xD;
20
+ Customized as per your needs.&#xD;
21
+ This extension has been tested for compatibility with Community Edition 1.5 later in systems without additional extensions. The compatibility and behaviour is guaranteed for installations on clean code for the preceding versions.</notes>
22
+ <authors><author><name>Deepak mnakotia</name><user>deepakmankotia</user><email>deepakmankotiacse@gmail.com</email></author></authors>
23
+ <date>2015-07-04</date>
24
+ <time>06:12:45</time>
25
+ <contents><target name="magelocal"><dir name="Magegeeks"><dir name="Hideprice"><dir name="Helper"><file name="Data.php" hash="a1414beebeafcb9297673009fbf7b4cf"/></dir><dir name="Model"><file name="Observer.php" hash="3b430f9268337ece3ccf94e90dd80616"/></dir><dir name="etc"><file name="config.xml" hash="6f85cfa75e6ea05be2825f5dea5e5b87"/><file name="system.xml" hash="1fd4b5e862faa8de12fbeba6083f95fe"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hideprice.xml" hash="a15e450407946e0c5651ec9ea83fc960"/></dir><dir name="template"><dir name="hideprice"><file name="addtocart.phtml" hash="27439bb0b9186b805bf0124fa9ed460f"/><dir name="compare"><file name="list.phtml" hash="cabf9da4fa8d70e0c42af1915763d296"/></dir><file name="list.phtml" hash="dff1dae14a856f117e36312ee513d4a1"/><file name="price.phtml" hash="97f903aa0a4a429dd08ad8fb4bc31754"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magegeeks_Hideprice.xml" hash="ba50aaeebca6fe8a0dcb04fe01aa8a13"/></dir></target></contents>
26
+ <compatible/>
27
+ <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
28
+ </package>