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.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 2.0.0
- app/code/community/Aumento/PriceHide/etc/config.xml +14 -0
- app/code/community/Aumento/PriceHide/etc/system.xml +10 -0
- app/design/frontend/default/default/layout/pricehide.xml +54 -0
- app/design/frontend/default/default/template/pricehide/price.phtml +4 -0
- app/design/frontend/default/default/template/pricehide/product-list.phtml +144 -0
- app/design/frontend/default/default/template/pricehide/product-view-addtocart.phtml +58 -0
- app/design/frontend/default/default/template/pricehide/product-view.phtml +169 -0
- package.xml +4 -4
app/code/community/Aumento/PriceHide/etc/config.xml
CHANGED
@@ -41,6 +41,9 @@
|
|
41 |
<product_price>Aumento_PriceHide_Block_Price</product_price>
|
42 |
</rewrite>
|
43 |
</catalog>
|
|
|
|
|
|
|
44 |
</blocks>
|
45 |
|
46 |
<helpers>
|
@@ -48,6 +51,17 @@
|
|
48 |
<class>Aumento_PriceHide_Helper</class>
|
49 |
</pricehide>
|
50 |
</helpers>
|
|
|
51 |
</global>
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</config>
|
41 |
<product_price>Aumento_PriceHide_Block_Price</product_price>
|
42 |
</rewrite>
|
43 |
</catalog>
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
</blocks>
|
48 |
|
49 |
<helpers>
|
51 |
<class>Aumento_PriceHide_Helper</class>
|
52 |
</pricehide>
|
53 |
</helpers>
|
54 |
+
|
55 |
</global>
|
56 |
|
57 |
+
<frontend>
|
58 |
+
<layout>
|
59 |
+
<updates>
|
60 |
+
<pricehide>
|
61 |
+
<file>pricehide.xml</file>
|
62 |
+
</pricehide>
|
63 |
+
</updates>
|
64 |
+
</layout>
|
65 |
+
</frontend>
|
66 |
+
|
67 |
</config>
|
app/code/community/Aumento/PriceHide/etc/system.xml
CHANGED
@@ -57,6 +57,16 @@
|
|
57 |
<show_in_store>0</show_in_store>
|
58 |
</title>
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
</fields>
|
61 |
</pricehideconfig>
|
62 |
</groups>
|
57 |
<show_in_store>0</show_in_store>
|
58 |
</title>
|
59 |
|
60 |
+
<hideadd translate="label">
|
61 |
+
<label>Hide Add Button</label>
|
62 |
+
<frontend_type>select</frontend_type>
|
63 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
64 |
+
<sort_order>3</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>1</show_in_website>
|
67 |
+
<show_in_store>0</show_in_store>
|
68 |
+
</hideadd>
|
69 |
+
|
70 |
</fields>
|
71 |
</pricehideconfig>
|
72 |
</groups>
|
app/design/frontend/default/default/layout/pricehide.xml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--
|
2 |
+
/**
|
3 |
+
* Aumento.io
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This program is free software: you can redistribute it and/or modify
|
8 |
+
* it under the terms of the GNU General Public License as published by
|
9 |
+
* the Free Software Foundation, either version 3 of the License, or
|
10 |
+
* (at your option) any later version.
|
11 |
+
*
|
12 |
+
* This program is distributed in the hope that it will be useful,
|
13 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
* GNU General Public License for more details.
|
16 |
+
*
|
17 |
+
* You should have received a copy of the GNU General Public License
|
18 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19 |
+
*
|
20 |
+
*
|
21 |
+
* @package Aumento_PriceHide
|
22 |
+
* @copyright Copyright (c) 2012 Aumentio.io (http://www.aumento.io)
|
23 |
+
* @license http://www.gnu.org/licenses GNU General Public License, version 3 (GPL-3.0)
|
24 |
+
*/
|
25 |
+
-->
|
26 |
+
|
27 |
+
<!--
|
28 |
+
Make sure you merge your template files with the below if need
|
29 |
+
-->
|
30 |
+
|
31 |
+
<layout version="0.1.0">
|
32 |
+
<catalog_category_default>
|
33 |
+
<reference name="content">
|
34 |
+
<reference name="product_list">
|
35 |
+
<action method="setTemplate"> <template>pricehide/product-list.phtml</template></action>
|
36 |
+
</reference>
|
37 |
+
</reference>
|
38 |
+
</catalog_category_default>
|
39 |
+
|
40 |
+
<catalog_product_view>
|
41 |
+
<reference name="product.info">
|
42 |
+
<reference name="product.info.addtocart">
|
43 |
+
<action method="setTemplate"> <template>pricehide/product-view-addtocart.phtml</template></action>
|
44 |
+
</reference>
|
45 |
+
</reference>
|
46 |
+
|
47 |
+
<reference name="product.info">
|
48 |
+
<action method="setTemplate"> <template>pricehide/product-view.phtml</template></action>
|
49 |
+
</reference>
|
50 |
+
|
51 |
+
</catalog_product_view>
|
52 |
+
|
53 |
+
</layout>
|
54 |
+
|
app/design/frontend/default/default/template/pricehide/price.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<p>
|
3 |
+
<?php echo $this->config_message; ?>
|
4 |
+
</p>
|
app/design/frontend/default/default/template/pricehide/product-list.phtml
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Product list template
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_productCollection=$this->getLoadedProductCollection();
|
36 |
+
$_helper = $this->helper('catalog/output');
|
37 |
+
?>
|
38 |
+
<?php if(!$_productCollection->count()): ?>
|
39 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
40 |
+
<?php else: ?>
|
41 |
+
<div class="category-products">
|
42 |
+
<?php echo $this->getToolbarHtml() ?>
|
43 |
+
<?php // List mode ?>
|
44 |
+
<?php if($this->getMode()!='grid'): ?>
|
45 |
+
<?php $_iterator = 0; ?>
|
46 |
+
<ol class="products-list" id="products-list">
|
47 |
+
<?php foreach ($_productCollection as $_product): ?>
|
48 |
+
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
|
49 |
+
<?php // Product Image ?>
|
50 |
+
<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>
|
51 |
+
<?php // Product description ?>
|
52 |
+
<div class="product-shop">
|
53 |
+
<div class="f-fix">
|
54 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
55 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
56 |
+
<?php if($_product->getRatingSummary()): ?>
|
57 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
58 |
+
<?php endif; ?>
|
59 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
60 |
+
<?php if($_product->isSaleable()): ?>
|
61 |
+
<?php if (!(Mage::getSingleton('customer/session')->isLoggedIn()) && (Mage::getStoreConfig('catalog/pricehideconfig/active') == 1) ) : ?>
|
62 |
+
<?php if (Mage::getStoreConfig('catalog/pricehideconfig/hideadd') == 0) : ?>
|
63 |
+
<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>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php else: ?>
|
66 |
+
<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>
|
67 |
+
<?php endif; ?>
|
68 |
+
|
69 |
+
<?php else: ?>
|
70 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
71 |
+
<?php endif; ?>
|
72 |
+
<div class="desc std">
|
73 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
74 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
75 |
+
</div>
|
76 |
+
<ul class="add-to-links">
|
77 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
78 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
81 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
82 |
+
<?php endif; ?>
|
83 |
+
</ul>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
</li>
|
87 |
+
<?php endforeach; ?>
|
88 |
+
</ol>
|
89 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
90 |
+
|
91 |
+
<?php else: ?>
|
92 |
+
|
93 |
+
<?php // Grid Mode ?>
|
94 |
+
|
95 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
96 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
97 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
98 |
+
<?php if ($i++%$_columnCount==0): ?>
|
99 |
+
<ul class="products-grid">
|
100 |
+
<?php endif ?>
|
101 |
+
|
102 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
103 |
+
<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>
|
104 |
+
<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>
|
105 |
+
<?php if($_product->getRatingSummary()): ?>
|
106 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
107 |
+
<?php endif; ?>
|
108 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
109 |
+
<div class="actions">
|
110 |
+
<?php if($_product->isSaleable()): ?>
|
111 |
+
<?php if (!(Mage::getSingleton('customer/session')->isLoggedIn()) && (Mage::getStoreConfig('catalog/pricehideconfig/active') == 1) ) : ?>
|
112 |
+
|
113 |
+
<?php if (Mage::getStoreConfig('catalog/pricehideconfig/hideadd') == 0) : ?>
|
114 |
+
<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>
|
115 |
+
<?php endif; ?>
|
116 |
+
|
117 |
+
<?php else: ?>
|
118 |
+
<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>
|
119 |
+
<?php endif; ?>
|
120 |
+
<?php else: ?>
|
121 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
122 |
+
<?php endif; ?>
|
123 |
+
<ul class="add-to-links">
|
124 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
125 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
128 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
129 |
+
<?php endif; ?>
|
130 |
+
</ul>
|
131 |
+
</div>
|
132 |
+
</li>
|
133 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
134 |
+
</ul>
|
135 |
+
<?php endif ?>
|
136 |
+
<?php endforeach ?>
|
137 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
138 |
+
<?php endif; ?>
|
139 |
+
|
140 |
+
<div class="toolbar-bottom">
|
141 |
+
<?php echo $this->getToolbarHtml() ?>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/pricehide/product-view-addtocart.phtml
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_product = $this->getProduct(); ?>
|
28 |
+
<?php $buttonTitle = $this->__('Add to Cart'); ?>
|
29 |
+
<?php if($_product->isSaleable()): ?>
|
30 |
+
<div class="add-to-cart">
|
31 |
+
|
32 |
+
<?php if (!(Mage::getSingleton('customer/session')->isLoggedIn()) && (Mage::getStoreConfig('catalog/pricehideconfig/active') == 1) ) : ?>
|
33 |
+
|
34 |
+
<?php if (Mage::getStoreConfig('catalog/pricehideconfig/hideadd') == 0) : ?>
|
35 |
+
|
36 |
+
<?php if(!$_product->isGrouped()): ?>
|
37 |
+
<label for="qty"><?php echo $this->__('Qty:') ?></label>
|
38 |
+
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
|
39 |
+
<?php endif; ?>
|
40 |
+
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
|
41 |
+
|
42 |
+
<?php endif; ?>
|
43 |
+
|
44 |
+
<?php else: ?>
|
45 |
+
|
46 |
+
<?php if(!$_product->isGrouped()): ?>
|
47 |
+
<label for="qty"><?php echo $this->__('Qty:') ?></label>
|
48 |
+
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
|
49 |
+
<?php endif; ?>
|
50 |
+
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
|
51 |
+
|
52 |
+
<?php endif; ?>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
<?php echo $this->getChildHtml('', true, true) ?>
|
57 |
+
</div>
|
58 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/pricehide/product-view.phtml
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Product view template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View
|
31 |
+
* @see Mage_Review_Block_Product_View
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $_helper = $this->helper('catalog/output'); ?>
|
35 |
+
<?php $_product = $this->getProduct(); ?>
|
36 |
+
<script type="text/javascript">
|
37 |
+
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
|
38 |
+
</script>
|
39 |
+
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
40 |
+
<div class="product-view">
|
41 |
+
<div class="product-essential">
|
42 |
+
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
|
43 |
+
<div class="no-display">
|
44 |
+
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
45 |
+
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<div class="product-shop">
|
49 |
+
<div class="product-name">
|
50 |
+
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
<?php if ($this->canEmailToFriend()): ?>
|
54 |
+
<p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
|
55 |
+
<?php endif; ?>
|
56 |
+
|
57 |
+
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
|
58 |
+
<?php echo $this->getChildHtml('alert_urls') ?>
|
59 |
+
<?php echo $this->getChildHtml('product_type_data') ?>
|
60 |
+
<?php echo $this->getTierPriceHtml() ?>
|
61 |
+
<?php echo $this->getChildHtml('extrahint') ?>
|
62 |
+
|
63 |
+
<?php if (!$this->hasOptions()):?>
|
64 |
+
<div class="add-to-box">
|
65 |
+
<?php if($_product->isSaleable()): ?>
|
66 |
+
<?php echo $this->getChildHtml('addtocart') ?>
|
67 |
+
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
|
68 |
+
<span class="or"> <!--<?php echo $this->__('OR') ?>--></span>
|
69 |
+
<?php endif; ?>
|
70 |
+
<?php endif; ?>
|
71 |
+
<?php echo $this->getChildHtml('addto') ?>
|
72 |
+
</div>
|
73 |
+
<?php echo $this->getChildHtml('extra_buttons') ?>
|
74 |
+
<?php elseif (!$_product->isSaleable()): ?>
|
75 |
+
<div class="add-to-box">
|
76 |
+
<?php echo $this->getChildHtml('addto') ?>
|
77 |
+
</div>
|
78 |
+
<?php endif; ?>
|
79 |
+
|
80 |
+
<?php if ($_product->getShortDescription()):?>
|
81 |
+
<div class="short-description">
|
82 |
+
<h2><?php echo $this->__('Quick Overview') ?></h2>
|
83 |
+
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
|
84 |
+
</div>
|
85 |
+
<?php endif;?>
|
86 |
+
|
87 |
+
<?php echo $this->getChildHtml('other');?>
|
88 |
+
|
89 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
90 |
+
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
|
91 |
+
<?php endif;?>
|
92 |
+
|
93 |
+
</div>
|
94 |
+
|
95 |
+
<div class="product-img-box">
|
96 |
+
<?php echo $this->getChildHtml('media') ?>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<div class="clearer"></div>
|
100 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
101 |
+
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
|
102 |
+
<?php endif;?>
|
103 |
+
</form>
|
104 |
+
<script type="text/javascript">
|
105 |
+
//<![CDATA[
|
106 |
+
var productAddToCartForm = new VarienForm('product_addtocart_form');
|
107 |
+
productAddToCartForm.submit = function(button, url) {
|
108 |
+
if (this.validator.validate()) {
|
109 |
+
var form = this.form;
|
110 |
+
var oldUrl = form.action;
|
111 |
+
|
112 |
+
if (url) {
|
113 |
+
form.action = url;
|
114 |
+
}
|
115 |
+
var e = null;
|
116 |
+
try {
|
117 |
+
this.form.submit();
|
118 |
+
} catch (e) {
|
119 |
+
}
|
120 |
+
this.form.action = oldUrl;
|
121 |
+
if (e) {
|
122 |
+
throw e;
|
123 |
+
}
|
124 |
+
|
125 |
+
if (button && button != 'undefined') {
|
126 |
+
button.disabled = true;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
}.bind(productAddToCartForm);
|
130 |
+
|
131 |
+
productAddToCartForm.submitLight = function(button, url){
|
132 |
+
if(this.validator) {
|
133 |
+
var nv = Validation.methods;
|
134 |
+
delete Validation.methods['required-entry'];
|
135 |
+
delete Validation.methods['validate-one-required'];
|
136 |
+
delete Validation.methods['validate-one-required-by-name'];
|
137 |
+
// Remove custom datetime validators
|
138 |
+
for (var methodName in Validation.methods) {
|
139 |
+
if (methodName.match(/^validate-datetime-.*/i)) {
|
140 |
+
delete Validation.methods[methodName];
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
if (this.validator.validate()) {
|
145 |
+
if (url) {
|
146 |
+
this.form.action = url;
|
147 |
+
}
|
148 |
+
this.form.submit();
|
149 |
+
}
|
150 |
+
Object.extend(Validation.methods, nv);
|
151 |
+
}
|
152 |
+
}.bind(productAddToCartForm);
|
153 |
+
//]]>
|
154 |
+
</script>
|
155 |
+
</div>
|
156 |
+
|
157 |
+
<div class="product-collateral">
|
158 |
+
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
|
159 |
+
<div class="box-collateral <?php echo "box-{$alias}"?>">
|
160 |
+
<?php if ($title = $this->getChildData($alias, 'title')):?>
|
161 |
+
<h2><?php echo $this->escapeHtml($title); ?></h2>
|
162 |
+
<?php endif;?>
|
163 |
+
<?php echo $html; ?>
|
164 |
+
</div>
|
165 |
+
<?php endforeach;?>
|
166 |
+
<?php echo $this->getChildHtml('upsell_products') ?>
|
167 |
+
<?php echo $this->getChildHtml('product_additional_data') ?>
|
168 |
+
</div>
|
169 |
+
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>aumento_pricehide</name>
|
4 |
-
<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,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="
|
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.0.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-11-24</date>
|
14 |
+
<time>13:54:38</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="54b1cf0566d3e9c598a63606443292d7"/></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>
|