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 | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Aumento/PriceHide/Block/Price.php +56 -0
- app/code/local/Aumento/PriceHide/Helper/Data.php +6 -0
- app/code/local/Aumento/PriceHide/etc/config.xml +53 -0
- app/code/local/Aumento/PriceHide/etc/system.xml +65 -0
- app/design/frontend/package/theme/template/pricehide/price.phtml +4 -0
- app/etc/modules/Aumento_PriceHide.xml +37 -0
- package.xml +18 -0
app/code/local/Aumento/PriceHide/Block/Price.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Aumento.io
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This program is free software: you can redistribute it and/or modify
|
9 |
+
* it under the terms of the GNU General Public License as published by
|
10 |
+
* the Free Software Foundation, either version 3 of the License, or
|
11 |
+
* (at your option) any later version.
|
12 |
+
*
|
13 |
+
* This program is distributed in the hope that it will be useful,
|
14 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
+
* GNU General Public License for more details.
|
17 |
+
*
|
18 |
+
* You should have received a copy of the GNU General Public License
|
19 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
20 |
+
*
|
21 |
+
*
|
22 |
+
* @package Aumento_PriceHide
|
23 |
+
* @copyright Copyright (c) 2012 Aumentio.io (http://www.aumento.io)
|
24 |
+
* @license http://www.gnu.org/licenses GNU General Public License, version 3 (GPL-3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aumento_PriceHide_Block_Price extends Mage_Catalog_Block_Product_Price {
|
29 |
+
|
30 |
+
public $config_message = '';
|
31 |
+
|
32 |
+
private $config_enabled = '';
|
33 |
+
|
34 |
+
protected function _construct() {
|
35 |
+
parent::_construct();
|
36 |
+
|
37 |
+
$this->config_message = Mage::getStoreConfig('catalog/pricehideconfig/title');
|
38 |
+
$this->config_enabled = Mage::getStoreConfig('catalog/pricehideconfig/active');
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
protected function _toHtml(){
|
44 |
+
|
45 |
+
if ( ($this->config_enabled == 1) && !($this->helper('customer')->isLoggedIn()) ) {
|
46 |
+
$this->setTemplate('pricehide/price.phtml');
|
47 |
+
}
|
48 |
+
|
49 |
+
if (!$this->getProduct() || $this->getProduct()->getCanShowPrice() === false) {
|
50 |
+
return '';
|
51 |
+
}
|
52 |
+
|
53 |
+
return parent::_toHtml();
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
app/code/local/Aumento/PriceHide/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Aumento_PriceHide_Helper_Data extends Mage_Core_Helper_Data
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/local/Aumento/PriceHide/etc/config.xml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
/**
|
5 |
+
* Aumento.io
|
6 |
+
*
|
7 |
+
* NOTICE OF LICENSE
|
8 |
+
*
|
9 |
+
* This program is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* This program is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @package Aumento_PriceHide
|
24 |
+
* @copyright Copyright (c) 2012 Aumentio.io (http://www.aumento.io)
|
25 |
+
* @license http://www.gnu.org/licenses GNU General Public License, version 3 (GPL-3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
|
29 |
+
<config>
|
30 |
+
<modules>
|
31 |
+
<Aumento_PriceHide>
|
32 |
+
<version>1.0</version>
|
33 |
+
</Aumento_PriceHide>
|
34 |
+
</modules>
|
35 |
+
|
36 |
+
<global>
|
37 |
+
|
38 |
+
<blocks>
|
39 |
+
<catalog>
|
40 |
+
<rewrite>
|
41 |
+
<product_price>Aumento_PriceHide_Block_Price</product_price>
|
42 |
+
</rewrite>
|
43 |
+
</catalog>
|
44 |
+
</blocks>
|
45 |
+
|
46 |
+
<helpers>
|
47 |
+
<pricehide>
|
48 |
+
<class>Aumento_PriceHide_Helper</class>
|
49 |
+
</pricehide>
|
50 |
+
</helpers>
|
51 |
+
</global>
|
52 |
+
|
53 |
+
</config>
|
app/code/local/Aumento/PriceHide/etc/system.xml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
/**
|
5 |
+
* Aumento.io
|
6 |
+
*
|
7 |
+
* NOTICE OF LICENSE
|
8 |
+
*
|
9 |
+
* This program is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* This program is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @category Mage
|
24 |
+
* @package Aumento_PriceHide
|
25 |
+
* @copyright Copyright (c) 2012 Aumentio.io (http://www.aumento.io)
|
26 |
+
* @license http://www.gnu.org/licenses GNU General Public License, version 3 (GPL-3.0)
|
27 |
+
*/
|
28 |
+
-->
|
29 |
+
|
30 |
+
<config>
|
31 |
+
<sections>
|
32 |
+
<catalog>
|
33 |
+
<groups>
|
34 |
+
<pricehideconfig translate="label">
|
35 |
+
<label>Aumento.io Price Hide</label>
|
36 |
+
|
37 |
+
<show_in_default>1</show_in_default>
|
38 |
+
<show_in_website>1</show_in_website>
|
39 |
+
<show_in_store>0</show_in_store>
|
40 |
+
<fields>
|
41 |
+
<active translate="label">
|
42 |
+
<label>Enabled</label>
|
43 |
+
<frontend_type>select</frontend_type>
|
44 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
45 |
+
<sort_order>1</sort_order>
|
46 |
+
<show_in_default>1</show_in_default>
|
47 |
+
<show_in_website>1</show_in_website>
|
48 |
+
<show_in_store>0</show_in_store>
|
49 |
+
</active>
|
50 |
+
|
51 |
+
<title translate="label">
|
52 |
+
<label>Message to display</label>
|
53 |
+
<frontend_type>text</frontend_type>
|
54 |
+
<sort_order>2</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<show_in_website>1</show_in_website>
|
57 |
+
<show_in_store>0</show_in_store>
|
58 |
+
</title>
|
59 |
+
|
60 |
+
</fields>
|
61 |
+
</pricehideconfig>
|
62 |
+
</groups>
|
63 |
+
</catalog>
|
64 |
+
</sections>
|
65 |
+
</config>
|
app/design/frontend/package/theme/template/pricehide/price.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<p>
|
3 |
+
<?php echo $this->config_message; ?>
|
4 |
+
</p>
|
app/etc/modules/Aumento_PriceHide.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
/**
|
5 |
+
* Aumento.io
|
6 |
+
*
|
7 |
+
* NOTICE OF LICENSE
|
8 |
+
*
|
9 |
+
* This program is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* This program is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @category Mage
|
24 |
+
* @package Aumento_PriceHide
|
25 |
+
* @copyright Copyright (c) 2012 Aumentio.io (http://www.aumento.io)
|
26 |
+
* @license http://www.gnu.org/licenses GNU General Public License, version 3 (GPL-3.0)
|
27 |
+
*/
|
28 |
+
-->
|
29 |
+
|
30 |
+
<config>
|
31 |
+
<modules>
|
32 |
+
<Aumento_PriceHide>
|
33 |
+
<active>true</active>
|
34 |
+
<codePool>local</codePool>
|
35 |
+
</Aumento_PriceHide>
|
36 |
+
</modules>
|
37 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>aumento-pricehide</name>
|
4 |
+
<version>1.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>
|
8 |
+
<extends/>
|
9 |
+
<summary>The PriceHide extension only show product pricing to logged-in users and hide it from guests.</summary>
|
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-09-14</date>
|
14 |
+
<time>17:57:37</time>
|
15 |
+
<contents><target name="magelocal"><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="29e7e28ca074f2c031183c0228a5808d"/><file name="system.xml" hash="b80b196397e1f3c6f0ed3fde74d8acf6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Aumento_PriceHide.xml" hash="43f10d8a114b538b6c6d9f9308c7efb8"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="soccernmoore"><dir name="theme267"><dir name="template"><dir name="pricehide"><file name="price.phtml" hash="69244d385c8c540ce8623db2213407fa"/></dir></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>
|