Version Notes
Hide Price for non logged in users stable version.
Download this release
Release Info
| Developer | Ansh |
| Extension | Ansh_HidePrice |
| Version | 1.0.0 |
| Comparing to | |
| See all releases | |
Version 1.0.0
- app/code/local/Ansh/HidePrice/Block/HelloWorld1.php~ +5 -0
- app/code/local/Ansh/HidePrice/Block/HidePrice.php +12 -0
- app/code/local/Ansh/HidePrice/Helper/Data.php +56 -0
- app/code/local/Ansh/HidePrice/Helper/Data.php~ +6 -0
- app/code/local/Ansh/HidePrice/etc/adminhtml.xml +22 -0
- app/code/local/Ansh/HidePrice/etc/config.xml +36 -0
- app/code/local/Ansh/HidePrice/etc/config.xml~ +36 -0
- app/code/local/Ansh/HidePrice/etc/system.xml +42 -0
- app/design/frontend/rwd/default/layout/hideprice.xml +68 -0
- app/design/frontend/rwd/default/template/hideprice/addtocart.phtml +44 -0
- app/design/frontend/rwd/default/template/hideprice/compare/list.phtml +182 -0
- app/design/frontend/rwd/default/template/hideprice/helloworld.phtml~ +13 -0
- app/design/frontend/rwd/default/template/hideprice/helloworld1.phtml~ +2 -0
- app/design/frontend/rwd/default/template/hideprice/list.phtml +142 -0
- app/design/frontend/rwd/default/template/hideprice/price.phtml +481 -0
- app/design/frontend/rwd/default/template/hideprice/price.phtml~ +478 -0
- app/design/frontend/rwd/default/template/hideprice/view.phtml +174 -0
- app/design/frontend/rwd/default/template/hideprice/view/addto.phtml +47 -0
- app/design/frontend/rwd/default/template/hideprice/view/addto.phtml~ +46 -0
- app/etc/modules/Ansh_HidePrice.xml +9 -0
- package.xml +18 -0
app/code/local/Ansh/HidePrice/Block/HelloWorld1.php~
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Ansh_HelloWorld1_Block_HelloWorld1 extends Mage_Core_Block_Template
|
| 3 |
+
{
|
| 4 |
+
// necessary methods
|
| 5 |
+
}
|
app/code/local/Ansh/HidePrice/Block/HidePrice.php
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Hide Price block
|
| 4 |
+
*
|
| 5 |
+
* @category Ansh
|
| 6 |
+
* @package Ansh_HidePrice
|
| 7 |
+
* @author Ansh <easternenterprisebv@gmail.com>
|
| 8 |
+
*/
|
| 9 |
+
class Ansh_HidePrice_Block_HidePrice extends Mage_Core_Block_Template
|
| 10 |
+
{
|
| 11 |
+
// necessary methods
|
| 12 |
+
}
|
app/code/local/Ansh/HidePrice/Helper/Data.php
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Hide Price helper
|
| 5 |
+
*
|
| 6 |
+
* @category Ansh
|
| 7 |
+
* @package Ansh_HidePrice
|
| 8 |
+
* @author Ansh <easternenterprisebv@gmail.com>
|
| 9 |
+
*/
|
| 10 |
+
class Ansh_HidePrice_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Retrieve status of HidePriceextension
|
| 14 |
+
*
|
| 15 |
+
* @return string
|
| 16 |
+
*/
|
| 17 |
+
public function hidePriceForGuestsEnabled() {
|
| 18 |
+
$status = Mage::getStoreConfig('hideprice_options/general/enabled');
|
| 19 |
+
|
| 20 |
+
return $status;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* Retrieve Login Url
|
| 25 |
+
*
|
| 26 |
+
* @return string
|
| 27 |
+
*/
|
| 28 |
+
public function getLoginUrl() {
|
| 29 |
+
return Mage::getUrl('customer/account/login');
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
/**
|
| 33 |
+
* Check Customer is Logged In
|
| 34 |
+
*
|
| 35 |
+
* @return boolean
|
| 36 |
+
*/
|
| 37 |
+
public function getCustomerIsLoggedIn() {
|
| 38 |
+
|
| 39 |
+
$hidePriceEnabled = $this->hidePriceForGuestsEnabled();
|
| 40 |
+
|
| 41 |
+
if ($hidePriceEnabled) { //if extension is enabled
|
| 42 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
| 43 |
+
return true;
|
| 44 |
+
} else {
|
| 45 |
+
return false;
|
| 46 |
+
}
|
| 47 |
+
} else { //if extension is disabled
|
| 48 |
+
/*
|
| 49 |
+
* If Hide price is disabled then Price,Add to wishlist
|
| 50 |
+
* and Add to compare should be visible to non loggedin users
|
| 51 |
+
* */
|
| 52 |
+
return true;
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
}
|
app/code/local/Ansh/HidePrice/Helper/Data.php~
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Ansh_Customcontact_Helper_Data extends Mage_Core_Helper_Abstract
|
| 4 |
+
{
|
| 5 |
+
|
| 6 |
+
}
|
app/code/local/Ansh/HidePrice/etc/adminhtml.xml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<acl>
|
| 4 |
+
<resources>
|
| 5 |
+
<admin>
|
| 6 |
+
<children>
|
| 7 |
+
<system>
|
| 8 |
+
<children>
|
| 9 |
+
<config>
|
| 10 |
+
<children>
|
| 11 |
+
<hideprice_options>
|
| 12 |
+
<title>Hide Price Section</title>
|
| 13 |
+
</hideprice_options>
|
| 14 |
+
</children>
|
| 15 |
+
</config>
|
| 16 |
+
</children>
|
| 17 |
+
</system>
|
| 18 |
+
</children>
|
| 19 |
+
</admin>
|
| 20 |
+
</resources>
|
| 21 |
+
</acl>
|
| 22 |
+
</config>
|
app/code/local/Ansh/HidePrice/etc/config.xml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<ansh_hideprice>
|
| 5 |
+
<version>0.1.0</version>
|
| 6 |
+
</ansh_hideprice>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<!-- start of block -->
|
| 10 |
+
<blocks>
|
| 11 |
+
<hideprice>
|
| 12 |
+
<rewrite>
|
| 13 |
+
<hideprice>Ansh_HidePrice_Block_HidePrice</hideprice>
|
| 14 |
+
</rewrite>
|
| 15 |
+
</hideprice>
|
| 16 |
+
</blocks>
|
| 17 |
+
<!-- end of block -->
|
| 18 |
+
|
| 19 |
+
<!-- start of helper -->
|
| 20 |
+
<helpers>
|
| 21 |
+
<hideprice>
|
| 22 |
+
<class>Ansh_HidePrice_Helper</class>
|
| 23 |
+
</hideprice>
|
| 24 |
+
</helpers>
|
| 25 |
+
<!-- end of helper -->
|
| 26 |
+
</global>
|
| 27 |
+
<frontend>
|
| 28 |
+
<layout>
|
| 29 |
+
<updates>
|
| 30 |
+
<hideprice>
|
| 31 |
+
<file>hideprice.xml</file>
|
| 32 |
+
</hideprice>
|
| 33 |
+
</updates>
|
| 34 |
+
</layout>
|
| 35 |
+
</frontend>
|
| 36 |
+
</config>
|
app/code/local/Ansh/HidePrice/etc/config.xml~
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<global>
|
| 4 |
+
<modules>
|
| 5 |
+
<ansh_helloworld1>
|
| 6 |
+
<version>0.1.0</version>
|
| 7 |
+
</ansh_helloworld1>
|
| 8 |
+
</modules>
|
| 9 |
+
<blocks>
|
| 10 |
+
<helloworld1>
|
| 11 |
+
<rewrite>
|
| 12 |
+
<helloworld1>Ansh_HelloWorld1_Block_HelloWorld1</helloworld1>
|
| 13 |
+
</rewrite>
|
| 14 |
+
</helloworld1>
|
| 15 |
+
</blocks>
|
| 16 |
+
|
| 17 |
+
</global>
|
| 18 |
+
<frontend>
|
| 19 |
+
<routers>
|
| 20 |
+
<helloworld1>
|
| 21 |
+
<use>standard</use>
|
| 22 |
+
<args>
|
| 23 |
+
<module>Ansh_HelloWorld1</module>
|
| 24 |
+
<frontName>helloworld1</frontName>
|
| 25 |
+
</args>
|
| 26 |
+
</helloworld1>
|
| 27 |
+
</routers>
|
| 28 |
+
<layout>
|
| 29 |
+
<updates>
|
| 30 |
+
<helloworld1>
|
| 31 |
+
<file>helloworld1.xml</file>
|
| 32 |
+
</helloworld1>
|
| 33 |
+
</updates>
|
| 34 |
+
</layout>
|
| 35 |
+
</frontend>
|
| 36 |
+
</config>
|
app/code/local/Ansh/HidePrice/etc/system.xml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<tabs>
|
| 4 |
+
<hideprice translate="label" module="hideprice">
|
| 5 |
+
<label>Ansh Hide Price</label>
|
| 6 |
+
<sort_order>1</sort_order>
|
| 7 |
+
</hideprice>
|
| 8 |
+
</tabs>
|
| 9 |
+
|
| 10 |
+
<sections>
|
| 11 |
+
<hideprice_options translate="label" module="hideprice">
|
| 12 |
+
<label>Ansh Hide Price Settings</label>
|
| 13 |
+
<tab>hideprice</tab>
|
| 14 |
+
<frontend_type>text</frontend_type>
|
| 15 |
+
<sort_order>1</sort_order>
|
| 16 |
+
<show_in_default>1</show_in_default>
|
| 17 |
+
<show_in_website>1</show_in_website>
|
| 18 |
+
<show_in_store>1</show_in_store>
|
| 19 |
+
<groups>
|
| 20 |
+
<general translate="label">
|
| 21 |
+
<label>General Settings</label>
|
| 22 |
+
<frontend_type>text</frontend_type>
|
| 23 |
+
<sort_order>1</sort_order>
|
| 24 |
+
<show_in_default>1</show_in_default>
|
| 25 |
+
<show_in_website>1</show_in_website>
|
| 26 |
+
<show_in_store>0</show_in_store>
|
| 27 |
+
<fields>
|
| 28 |
+
<enabled translate="label">
|
| 29 |
+
<label>Enable hide price for guest</label>
|
| 30 |
+
<frontend_type>select</frontend_type>
|
| 31 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 32 |
+
<sort_order>1</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 |
+
</enabled>
|
| 37 |
+
</fields>
|
| 38 |
+
</general>
|
| 39 |
+
</groups>
|
| 40 |
+
</hideprice_options>
|
| 41 |
+
</sections>
|
| 42 |
+
</config>
|
app/design/frontend/rwd/default/layout/hideprice.xml
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
|
| 3 |
+
<layout version="0.1.0">
|
| 4 |
+
|
| 5 |
+
<default>
|
| 6 |
+
<reference name="catalog_product_price_template">
|
| 7 |
+
<action method="addPriceBlockType">
|
| 8 |
+
<type>simple</type>
|
| 9 |
+
<block>catalog/product_price</block>
|
| 10 |
+
<template>hideprice/price.phtml</template>
|
| 11 |
+
</action>
|
| 12 |
+
<action method="addPriceBlockType">
|
| 13 |
+
<type>grouped</type>
|
| 14 |
+
<block>catalog/product_price</block>
|
| 15 |
+
<template>hideprice/price.phtml</template>
|
| 16 |
+
</action>
|
| 17 |
+
<action method="addPriceBlockType">
|
| 18 |
+
<type>configurable</type>
|
| 19 |
+
<block>catalog/product_price</block>
|
| 20 |
+
<template>hideprice/price.phtml</template>
|
| 21 |
+
</action>
|
| 22 |
+
<action method="addPriceBlockType">
|
| 23 |
+
<type>virtual</type>
|
| 24 |
+
<block>catalog/product_price</block>
|
| 25 |
+
<template>hideprice/price.phtml</template>
|
| 26 |
+
</action>
|
| 27 |
+
<action method="addPriceBlockType">
|
| 28 |
+
<type>bundled</type>
|
| 29 |
+
<block>catalog/product_price</block>
|
| 30 |
+
<template>hideprice/price.phtml</template>
|
| 31 |
+
</action>
|
| 32 |
+
</reference>
|
| 33 |
+
</default>
|
| 34 |
+
|
| 35 |
+
<!-- For default -->
|
| 36 |
+
<catalog_category_default>
|
| 37 |
+
<reference name="product_list">
|
| 38 |
+
<action method="setTemplate">
|
| 39 |
+
<template>hideprice/list.phtml</template>
|
| 40 |
+
</action>
|
| 41 |
+
</reference>
|
| 42 |
+
</catalog_category_default>
|
| 43 |
+
|
| 44 |
+
<!-- For layered navigation-->
|
| 45 |
+
<catalog_category_layered>
|
| 46 |
+
<reference name="product_list">
|
| 47 |
+
<action method="setTemplate">
|
| 48 |
+
<template>hideprice/list.phtml</template>
|
| 49 |
+
</action>
|
| 50 |
+
</reference>
|
| 51 |
+
</catalog_category_layered>
|
| 52 |
+
|
| 53 |
+
<catalog_product_view>
|
| 54 |
+
<reference name="product.info.addtocart">
|
| 55 |
+
<action method="setTemplate"><template>hideprice/addtocart.phtml</template></action>
|
| 56 |
+
</reference>
|
| 57 |
+
<reference name="product.info.addto">
|
| 58 |
+
<action method="setTemplate"><template>hideprice/view/addto.phtml</template></action>
|
| 59 |
+
</reference>
|
| 60 |
+
</catalog_product_view>
|
| 61 |
+
|
| 62 |
+
<catalog_product_compare_index>
|
| 63 |
+
<reference name="catalog.compare.list">
|
| 64 |
+
<action method="setTemplate"><template>hideprice/compare/list.phtml</template></action>
|
| 65 |
+
</reference>
|
| 66 |
+
</catalog_product_compare_index>
|
| 67 |
+
|
| 68 |
+
</layout>
|
app/design/frontend/rwd/default/template/hideprice/addtocart.phtml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
<?php
|
| 28 |
+
$hidePriceHelper = Mage::helper('hideprice');
|
| 29 |
+
if (!$hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 30 |
+
return;
|
| 31 |
+
}
|
| 32 |
+
?>
|
| 33 |
+
<?php $_product = $this->getProduct(); ?>
|
| 34 |
+
<?php $buttonTitle = $this->__('Add to Cart'); ?>
|
| 35 |
+
<?php if ($_product->isSaleable()): ?>
|
| 36 |
+
<div class="add-to-cart">
|
| 37 |
+
<?php if (!$_product->isGrouped()): ?>
|
| 38 |
+
<label for="qty"><?php echo $this->__('Qty:') ?></label>
|
| 39 |
+
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" />
|
| 40 |
+
<?php endif; ?>
|
| 41 |
+
<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>
|
| 42 |
+
<?php echo $this->getChildHtml('', true, true) ?>
|
| 43 |
+
</div>
|
| 44 |
+
<?php endif; ?>
|
app/design/frontend/rwd/default/template/hideprice/compare/list.phtml
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
/* @var $this Mage_Catalog_Block_Product_Compare_List */
|
| 27 |
+
?>
|
| 28 |
+
<?php $hidePriceHelper = Mage::helper('hideprice');?>
|
| 29 |
+
<div class="page-title title-buttons">
|
| 30 |
+
<h1><?php echo $this->__('Compare Products') ?></h1>
|
| 31 |
+
<a href="#" onclick="window.print();
|
| 32 |
+
return false;" class="link-print"><?php echo $this->__('Print This Page') ?></a>
|
| 33 |
+
</div>
|
| 34 |
+
<?php $_total = $this->getItems()->getSize() ?>
|
| 35 |
+
<?php if ($_total): ?>
|
| 36 |
+
<table class="data-table compare-table" id="product_comparison">
|
| 37 |
+
<?php $_i = 0 ?>
|
| 38 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
| 39 |
+
<?php if ($_i++ % 10 == 0): ?>
|
| 40 |
+
<col width="1" />
|
| 41 |
+
<?php endif; ?>
|
| 42 |
+
<col width="<?php echo floor(100 / $_total); ?>%" />
|
| 43 |
+
<?php endforeach; ?>
|
| 44 |
+
<?php if ($_total > 2): ?>
|
| 45 |
+
<thead>
|
| 46 |
+
<tr>
|
| 47 |
+
<?php $_i = 0 ?>
|
| 48 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
| 49 |
+
<?php if ($_i++ % 10 == 0): ?>
|
| 50 |
+
<th> </th>
|
| 51 |
+
<?php endif; ?>
|
| 52 |
+
<td class="a-right"><a href="#" class="btn-remove" onclick="removeItem('<?php echo $this->helper('catalog/product_compare')->getRemoveUrl($_item) ?>');" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>"><?php echo $this->__('Remove This Item') ?></a></td>
|
| 53 |
+
<?php endforeach; ?>
|
| 54 |
+
</tr>
|
| 55 |
+
</thead>
|
| 56 |
+
<?php endif ?>
|
| 57 |
+
<tbody>
|
| 58 |
+
<tr class="product-shop-row">
|
| 59 |
+
<?php $_i = 0 ?>
|
| 60 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
| 61 |
+
<?php if ($_i++ % 10 == 0): ?>
|
| 62 |
+
<th> </th>
|
| 63 |
+
<?php endif; ?>
|
| 64 |
+
<td>
|
| 65 |
+
<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>
|
| 66 |
+
<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>
|
| 67 |
+
<?php echo $this->getReviewsSummaryHtml($_item, 'short') ?>
|
| 68 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-top') ?>
|
| 69 |
+
<?php
|
| 70 |
+
if ($hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 71 |
+
|
| 72 |
+
?>
|
| 73 |
+
<?php if ($_item->isSaleable()): ?>
|
| 74 |
+
<p><button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
| 75 |
+
<?php else: ?>
|
| 76 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
| 77 |
+
<?php endif; ?>
|
| 78 |
+
|
| 79 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 80 |
+
<ul class="add-to-links">
|
| 81 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 82 |
+
</ul>
|
| 83 |
+
<?php endif; ?>
|
| 84 |
+
<?php } ?>
|
| 85 |
+
</td>
|
| 86 |
+
<?php endforeach; ?>
|
| 87 |
+
</tr>
|
| 88 |
+
</tbody>
|
| 89 |
+
<tbody>
|
| 90 |
+
<?php foreach ($this->getAttributes() as $_attribute): ?>
|
| 91 |
+
<tr>
|
| 92 |
+
<?php $_i = 0 ?>
|
| 93 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
| 94 |
+
<?php if ($_i++ % 10 == 0): ?>
|
| 95 |
+
<th><span class="nobr"><?php echo $_attribute->getStoreLabel() ?></span></th>
|
| 96 |
+
<?php endif; ?>
|
| 97 |
+
<td>
|
| 98 |
+
<?php switch ($_attribute->getAttributeCode()) {
|
| 99 |
+
case "price":
|
| 100 |
+
?>
|
| 101 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode()) ?>
|
| 102 |
+
<?php break;
|
| 103 |
+
case "small_image":
|
| 104 |
+
?>
|
| 105 |
+
<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()) ?>" />
|
| 106 |
+
<?php
|
| 107 |
+
break;
|
| 108 |
+
case "date":
|
| 109 |
+
echo substr($this->getProductAttributeValue($_item, $_attribute), 0, 10);
|
| 110 |
+
break;
|
| 111 |
+
default:
|
| 112 |
+
?>
|
| 113 |
+
<div class="std">
|
| 114 |
+
<?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?>
|
| 115 |
+
</div>
|
| 116 |
+
<?php break;
|
| 117 |
+
}
|
| 118 |
+
?>
|
| 119 |
+
</td>
|
| 120 |
+
<?php endforeach; ?>
|
| 121 |
+
</tr>
|
| 122 |
+
<?php endforeach; ?>
|
| 123 |
+
</tbody>
|
| 124 |
+
<tbody>
|
| 125 |
+
<tr class="add-to-row">
|
| 126 |
+
<?php $_i = 0 ?>
|
| 127 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
| 128 |
+
<?php if ($_i++ % 10 == 0): ?>
|
| 129 |
+
<th> </th>
|
| 130 |
+
<?php endif; ?>
|
| 131 |
+
<td>
|
| 132 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
|
| 133 |
+
<?php
|
| 134 |
+
if ($hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 135 |
+
|
| 136 |
+
?>
|
| 137 |
+
<?php if ($_item->isSaleable()): ?>
|
| 138 |
+
<p><button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
| 139 |
+
<?php else: ?>
|
| 140 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
| 141 |
+
<?php endif; ?>
|
| 142 |
+
|
| 143 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 144 |
+
<ul class="add-to-links">
|
| 145 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item); ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 146 |
+
</ul>
|
| 147 |
+
<?php endif; ?><?php } ?>
|
| 148 |
+
</td>
|
| 149 |
+
<?php endforeach; ?>
|
| 150 |
+
</tr>
|
| 151 |
+
</tbody>
|
| 152 |
+
</table>
|
| 153 |
+
<div class="buttons-set">
|
| 154 |
+
<button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Close Window')) ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
|
| 155 |
+
<span class="please-wait" id="compare-list-please-wait" style="display:none;">
|
| 156 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo Mage::helper('core')->quoteEscape($this->__('Please wait...')) ?>" title="<?php echo $this->__('Please wait...') ?>" class="v-middle" /> <?php echo $this->__('Please wait...') ?>
|
| 157 |
+
</span>
|
| 158 |
+
</div>
|
| 159 |
+
<script type="text/javascript">
|
| 160 |
+
decorateTable('product_comparison');
|
| 161 |
+
|
| 162 |
+
/**
|
| 163 |
+
* Send remove item request, after that reload windows
|
| 164 |
+
*/
|
| 165 |
+
function removeItem(url)
|
| 166 |
+
{
|
| 167 |
+
new Ajax.Request(url, {
|
| 168 |
+
parameters: {isAjax: 1, method: 'POST'},
|
| 169 |
+
onLoading: function() {
|
| 170 |
+
$('compare-list-please-wait').show();
|
| 171 |
+
},
|
| 172 |
+
onSuccess: function(transport) {
|
| 173 |
+
$('compare-list-please-wait').hide();
|
| 174 |
+
window.location.reload();
|
| 175 |
+
window.opener.location.reload();
|
| 176 |
+
}
|
| 177 |
+
});
|
| 178 |
+
}
|
| 179 |
+
</script>
|
| 180 |
+
<?php else: ?>
|
| 181 |
+
<script type="text/javascript">window.close();</script>
|
| 182 |
+
<?php endif; ?>
|
app/design/frontend/rwd/default/template/hideprice/helloworld.phtml~
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div>
|
| 2 |
+
|
| 3 |
+
<?php
|
| 4 |
+
|
| 5 |
+
echo "Hello World ! I am Iyngaran Iyathurai";
|
| 6 |
+
|
| 7 |
+
echo "<BR/>";
|
| 8 |
+
|
| 9 |
+
echo $this->myMessage();
|
| 10 |
+
|
| 11 |
+
?>
|
| 12 |
+
|
| 13 |
+
</div>
|
app/design/frontend/rwd/default/template/hideprice/helloworld1.phtml~
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
echo"<h1><b>Hello World</b></h1>";
|
app/design/frontend/rwd/default/template/hideprice/list.phtml
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.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 |
+
$hidePriceHelper = Mage::helper('hideprice');
|
| 38 |
+
?>
|
| 39 |
+
<?php if (!$_productCollection->count()): ?>
|
| 40 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
| 41 |
+
<?php else: ?>
|
| 42 |
+
<div class="category-products">
|
| 43 |
+
<?php echo $this->getToolbarHtml() ?>
|
| 44 |
+
<?php // List mode ?>
|
| 45 |
+
<?php if ($this->getMode() != 'grid'): ?>
|
| 46 |
+
<?php $_iterator = 0; ?>
|
| 47 |
+
<ol class="products-list" id="products-list">
|
| 48 |
+
<?php foreach ($_productCollection as $_product): ?>
|
| 49 |
+
<li class="item<?php if (++$_iterator == sizeof($_productCollection)): ?> last<?php endif; ?>">
|
| 50 |
+
<?php // Product Image ?>
|
| 51 |
+
<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>
|
| 52 |
+
<?php // Product description ?>
|
| 53 |
+
<div class="product-shop">
|
| 54 |
+
<div class="f-fix">
|
| 55 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
| 56 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?></a></h2>
|
| 57 |
+
<?php if ($_product->getRatingSummary()): ?>
|
| 58 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
| 59 |
+
<?php endif; ?>
|
| 60 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
| 61 |
+
<?php
|
| 62 |
+
if ($hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 63 |
+
|
| 64 |
+
?>
|
| 65 |
+
<?php if ($_product->isSaleable()): ?>
|
| 66 |
+
<p><button type="button" title="<?php echo Mage::helper('core')->quoteEscape($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 else: ?>
|
| 68 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
| 69 |
+
<?php endif; ?>
|
| 70 |
+
|
| 71 |
+
<div class="desc std">
|
| 72 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
| 73 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
| 74 |
+
</div>
|
| 75 |
+
<ul class="add-to-links">
|
| 76 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 77 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 78 |
+
<?php endif; ?>
|
| 79 |
+
<?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
|
| 80 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
| 81 |
+
<?php endif; ?>
|
| 82 |
+
</ul>
|
| 83 |
+
<?php } ?>
|
| 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;
|
| 98 |
+
foreach ($_productCollection as $_product): ?>
|
| 99 |
+
<?php if ($i++ % $_columnCount == 0): ?>
|
| 100 |
+
<ul class="products-grid">
|
| 101 |
+
<?php endif ?>
|
| 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" style="position: relative;min-height: 0px;">
|
| 110 |
+
<?php
|
| 111 |
+
if ($hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 112 |
+
|
| 113 |
+
?>
|
| 114 |
+
<?php if ($_product->isSaleable()): ?>
|
| 115 |
+
<button type="button" title="<?php echo Mage::helper('core')->quoteEscape($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>
|
| 116 |
+
<?php else: ?>
|
| 117 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
| 118 |
+
<?php endif; ?>
|
| 119 |
+
|
| 120 |
+
<ul class="add-to-links">
|
| 121 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 122 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 123 |
+
<?php endif; ?>
|
| 124 |
+
<?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
|
| 125 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
| 126 |
+
<?php endif; ?>
|
| 127 |
+
</ul>
|
| 128 |
+
<?php } ?>
|
| 129 |
+
</div>
|
| 130 |
+
</li>
|
| 131 |
+
<?php if ($i % $_columnCount == 0 || $i == $_collectionSize): ?>
|
| 132 |
+
</ul>
|
| 133 |
+
<?php endif ?>
|
| 134 |
+
<?php endforeach ?>
|
| 135 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd', 'even', 'first', 'last'])</script>
|
| 136 |
+
<?php endif; ?>
|
| 137 |
+
|
| 138 |
+
<div class="toolbar-bottom">
|
| 139 |
+
<?php echo $this->getToolbarHtml() ?>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<?php endif; ?>
|
app/design/frontend/rwd/default/template/hideprice/price.phtml
ADDED
|
@@ -0,0 +1,481 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
|
| 28 |
+
<?php
|
| 29 |
+
/**
|
| 30 |
+
* Template for displaying product price in different places (products grid, product view page etc)
|
| 31 |
+
*
|
| 32 |
+
* @see Mage_Catalog_Block_Product_Abstract
|
| 33 |
+
*/
|
| 34 |
+
?>
|
| 35 |
+
<?php
|
| 36 |
+
$hidePriceHelper = Mage::helper('hideprice');
|
| 37 |
+
|
| 38 |
+
if (!$hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 39 |
+
?>
|
| 40 |
+
<a href="<?php echo $hidePriceHelper->getLoginUrl(); ?>" title="<?php echo $this->__('Login to See Price'); ?>"><?php echo $this->__('Login to See Price'); ?></a>
|
| 41 |
+
<?php
|
| 42 |
+
return;
|
| 43 |
+
}
|
| 44 |
+
?>
|
| 45 |
+
<?php
|
| 46 |
+
$_coreHelper = $this->helper('core');
|
| 47 |
+
$_weeeHelper = $this->helper('weee');
|
| 48 |
+
$_taxHelper = $this->helper('tax');
|
| 49 |
+
/* @var $_coreHelper Mage_Core_Helper_Data */
|
| 50 |
+
/* @var $_weeeHelper Mage_Weee_Helper_Data */
|
| 51 |
+
/* @var $_taxHelper Mage_Tax_Helper_Data */
|
| 52 |
+
|
| 53 |
+
$_product = $this->getProduct();
|
| 54 |
+
$_storeId = $_product->getStoreId();
|
| 55 |
+
$_store = $_product->getStore();
|
| 56 |
+
$_id = $_product->getId();
|
| 57 |
+
$_weeeSeparator = '';
|
| 58 |
+
$_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
|
| 59 |
+
$_minimalPriceValue = $_product->getMinimalPrice();
|
| 60 |
+
$_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
|
| 61 |
+
$_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
|
| 62 |
+
$_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
|
| 63 |
+
$_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
|
| 64 |
+
?>
|
| 65 |
+
|
| 66 |
+
<?php if (!$_product->isGrouped()): ?>
|
| 67 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
|
| 68 |
+
<?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
|
| 69 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
|
| 70 |
+
<?php if ($_weeeHelper->isTaxable()): ?>
|
| 71 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
|
| 72 |
+
<?php endif; ?>
|
| 73 |
+
<?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
|
| 74 |
+
<?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
|
| 75 |
+
|
| 76 |
+
<div class="price-box">
|
| 77 |
+
<?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
|
| 78 |
+
<?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
|
| 79 |
+
<?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
|
| 80 |
+
<?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
|
| 81 |
+
<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
|
| 82 |
+
<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
|
| 83 |
+
<?php if ($_finalPrice >= $_price): ?>
|
| 84 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 85 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 86 |
+
<span class="price-excluding-tax">
|
| 87 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 88 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 89 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
|
| 90 |
+
</span>
|
| 91 |
+
</span>
|
| 92 |
+
<span class="price-including-tax">
|
| 93 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 94 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 95 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 96 |
+
</span>
|
| 97 |
+
</span>
|
| 98 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 99 |
+
<span class="price-excluding-tax">
|
| 100 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 101 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 102 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
|
| 103 |
+
</span>
|
| 104 |
+
</span>
|
| 105 |
+
<span class="weee">(
|
| 106 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 107 |
+
<?php echo $_weeeSeparator; ?>
|
| 108 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 109 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 110 |
+
<?php endforeach; ?>
|
| 111 |
+
)</span>
|
| 112 |
+
<span class="price-including-tax">
|
| 113 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 114 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 115 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 116 |
+
</span>
|
| 117 |
+
</span>
|
| 118 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 119 |
+
<span class="price-excluding-tax">
|
| 120 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 121 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 122 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
|
| 123 |
+
</span>
|
| 124 |
+
</span>
|
| 125 |
+
<span class="price-including-tax">
|
| 126 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 127 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 128 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 129 |
+
</span>
|
| 130 |
+
<span class="weee">(
|
| 131 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 132 |
+
<?php echo $_weeeSeparator; ?>
|
| 133 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 134 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 135 |
+
<?php endforeach; ?>
|
| 136 |
+
)</span>
|
| 137 |
+
</span>
|
| 138 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 139 |
+
<span class="price-excluding-tax">
|
| 140 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 141 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 142 |
+
<?php echo $_coreHelper->formatPrice($_price, false) ?>
|
| 143 |
+
</span>
|
| 144 |
+
</span>
|
| 145 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 146 |
+
<span class="weee">
|
| 147 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 148 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 149 |
+
</span>
|
| 150 |
+
<?php endforeach; ?>
|
| 151 |
+
<span class="price-including-tax">
|
| 152 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 153 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 154 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 155 |
+
</span>
|
| 156 |
+
</span>
|
| 157 |
+
<?php else: ?>
|
| 158 |
+
<span class="price-excluding-tax">
|
| 159 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 160 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 161 |
+
<?php if ($_finalPrice == $_price): ?>
|
| 162 |
+
<?php echo $_coreHelper->formatPrice($_price, false) ?>
|
| 163 |
+
<?php else: ?>
|
| 164 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 165 |
+
<?php endif; ?>
|
| 166 |
+
</span>
|
| 167 |
+
</span>
|
| 168 |
+
<span class="price-including-tax">
|
| 169 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 170 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 171 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
|
| 172 |
+
</span>
|
| 173 |
+
</span>
|
| 174 |
+
<?php endif; ?>
|
| 175 |
+
<?php else: ?>
|
| 176 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1))): // including ?>
|
| 177 |
+
<?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
|
| 178 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 179 |
+
<?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
|
| 180 |
+
</span>
|
| 181 |
+
|
| 182 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // show description ?>
|
| 183 |
+
<span class="weee">(
|
| 184 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 185 |
+
<?php echo $_weeeSeparator; ?>
|
| 186 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 187 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
|
| 188 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 189 |
+
<?php endforeach; ?>
|
| 190 |
+
)</span>
|
| 191 |
+
<?php endif; ?>
|
| 192 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 193 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 194 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, true) ?>
|
| 195 |
+
</span>
|
| 196 |
+
<span class="weee">(
|
| 197 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 198 |
+
<?php echo $_weeeSeparator; ?>
|
| 199 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 200 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 201 |
+
<?php endforeach; ?>
|
| 202 |
+
)</span>
|
| 203 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 204 |
+
<span class="regular-price"><?php echo $_coreHelper->formatPrice($_price, true) ?></span><br/>
|
| 205 |
+
<?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
|
| 206 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 207 |
+
<span class="weee">
|
| 208 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 209 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
|
| 210 |
+
</span>
|
| 211 |
+
<?php endforeach; ?>
|
| 212 |
+
<span class="regular-price"
|
| 213 |
+
id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 214 |
+
<?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
|
| 215 |
+
</span>
|
| 216 |
+
<?php else: ?>
|
| 217 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 218 |
+
<?php if ($_finalPrice == $_price): ?>
|
| 219 |
+
<?php echo $_coreHelper->formatPrice($_price, true) ?>
|
| 220 |
+
<?php else: ?>
|
| 221 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
|
| 222 |
+
<?php endif; ?>
|
| 223 |
+
</span>
|
| 224 |
+
<?php endif; ?>
|
| 225 |
+
<?php endif; ?>
|
| 226 |
+
<?php else: /* if ($_finalPrice == $_price): */ ?>
|
| 227 |
+
<?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
|
| 228 |
+
<?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
|
| 229 |
+
|
| 230 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 231 |
+
<p class="old-price">
|
| 232 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 233 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 234 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
|
| 235 |
+
</span>
|
| 236 |
+
</p>
|
| 237 |
+
|
| 238 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 239 |
+
<p class="special-price">
|
| 240 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 241 |
+
<span class="price-excluding-tax">
|
| 242 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 243 |
+
<span class="price"
|
| 244 |
+
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 245 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
|
| 246 |
+
</span>
|
| 247 |
+
</span>
|
| 248 |
+
<span class="price-including-tax">
|
| 249 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 250 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 251 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 252 |
+
</span>
|
| 253 |
+
</span>
|
| 254 |
+
</p>
|
| 255 |
+
<?php else: ?>
|
| 256 |
+
<p class="special-price">
|
| 257 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 258 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 259 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
|
| 260 |
+
</span>
|
| 261 |
+
</p>
|
| 262 |
+
<?php endif; ?>
|
| 263 |
+
|
| 264 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 265 |
+
<p class="old-price">
|
| 266 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 267 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 268 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
|
| 269 |
+
</span>
|
| 270 |
+
</p>
|
| 271 |
+
|
| 272 |
+
<p class="special-price">
|
| 273 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 274 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 275 |
+
<span class="price-excluding-tax">
|
| 276 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 277 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 278 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
|
| 279 |
+
</span>
|
| 280 |
+
</span>
|
| 281 |
+
<span class="weee">(
|
| 282 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 283 |
+
<?php echo $_weeeSeparator; ?>
|
| 284 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 285 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 286 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 287 |
+
<?php endforeach; ?>
|
| 288 |
+
)</span>
|
| 289 |
+
<span class="price-including-tax">
|
| 290 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 291 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 292 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 293 |
+
</span>
|
| 294 |
+
</span>
|
| 295 |
+
<?php else: ?>
|
| 296 |
+
<p class="special-price">
|
| 297 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 298 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 299 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
|
| 300 |
+
</span>
|
| 301 |
+
</p>
|
| 302 |
+
<span class="weee">(
|
| 303 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 304 |
+
<?php echo $_weeeSeparator; ?>
|
| 305 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 306 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 307 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 308 |
+
<?php endforeach; ?>
|
| 309 |
+
)</span>
|
| 310 |
+
<?php endif; ?>
|
| 311 |
+
</p>
|
| 312 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 313 |
+
<p class="old-price">
|
| 314 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 315 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 316 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
|
| 317 |
+
</span>
|
| 318 |
+
</p>
|
| 319 |
+
|
| 320 |
+
<p class="special-price">
|
| 321 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 322 |
+
<span class="price-excluding-tax">
|
| 323 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 324 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 325 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
|
| 326 |
+
</span>
|
| 327 |
+
</span>
|
| 328 |
+
<span class="weee">(
|
| 329 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 330 |
+
<?php echo $_weeeSeparator; ?>
|
| 331 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 332 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 333 |
+
<?php endforeach; ?>
|
| 334 |
+
)</span>
|
| 335 |
+
<span class="price-including-tax">
|
| 336 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 337 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 338 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 339 |
+
</span>
|
| 340 |
+
</span>
|
| 341 |
+
</p>
|
| 342 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 343 |
+
<p class="old-price">
|
| 344 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 345 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 346 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
|
| 347 |
+
</span>
|
| 348 |
+
</p>
|
| 349 |
+
|
| 350 |
+
<p class="special-price">
|
| 351 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 352 |
+
<span class="price-excluding-tax">
|
| 353 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 354 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 355 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 356 |
+
</span>
|
| 357 |
+
</span>
|
| 358 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 359 |
+
<span class="weee">
|
| 360 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 361 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 362 |
+
</span>
|
| 363 |
+
<?php endforeach; ?>
|
| 364 |
+
<span class="price-including-tax">
|
| 365 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 366 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 367 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 368 |
+
</span>
|
| 369 |
+
</span>
|
| 370 |
+
</p>
|
| 371 |
+
<?php else: // excl. ?>
|
| 372 |
+
<p class="old-price">
|
| 373 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 374 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 375 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
|
| 376 |
+
</span>
|
| 377 |
+
</p>
|
| 378 |
+
|
| 379 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 380 |
+
<p class="special-price">
|
| 381 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 382 |
+
<span class="price-excluding-tax">
|
| 383 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 384 |
+
<span class="price"
|
| 385 |
+
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 386 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 387 |
+
</span>
|
| 388 |
+
</span>
|
| 389 |
+
<span class="price-including-tax">
|
| 390 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 391 |
+
<span class="price"
|
| 392 |
+
id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 393 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
|
| 394 |
+
</span>
|
| 395 |
+
</span>
|
| 396 |
+
</p>
|
| 397 |
+
<?php else: ?>
|
| 398 |
+
<p class="special-price">
|
| 399 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 400 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 401 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 402 |
+
</span>
|
| 403 |
+
</p>
|
| 404 |
+
<?php endif; ?>
|
| 405 |
+
<?php endif; ?>
|
| 406 |
+
|
| 407 |
+
<?php endif; /* if ($_finalPrice == $_price): */ ?>
|
| 408 |
+
|
| 409 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_convertedFinalPrice): ?>
|
| 410 |
+
|
| 411 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
|
| 412 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
|
| 413 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
|
| 414 |
+
<?php endif; ?>
|
| 415 |
+
|
| 416 |
+
<?php if ($this->getUseLinkForAsLowAs()): ?>
|
| 417 |
+
<a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
|
| 418 |
+
<?php else: ?>
|
| 419 |
+
<span class="minimal-price-link">
|
| 420 |
+
<?php endif ?>
|
| 421 |
+
<span class="label"><?php echo $this->__('As low as:') ?></span>
|
| 422 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 423 |
+
<?php echo $_coreHelper->formatPrice($_minimalPriceDisplayValue, false) ?>
|
| 424 |
+
</span>
|
| 425 |
+
<?php if ($this->getUseLinkForAsLowAs()): ?>
|
| 426 |
+
</a>
|
| 427 |
+
<?php else: ?>
|
| 428 |
+
</span>
|
| 429 |
+
<?php endif ?>
|
| 430 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
|
| 431 |
+
</div>
|
| 432 |
+
|
| 433 |
+
<?php else: /* if (!$_product->isGrouped()): */ ?>
|
| 434 |
+
<?php
|
| 435 |
+
$showMinPrice = $this->getDisplayMinimalPrice();
|
| 436 |
+
if ($showMinPrice && $_minimalPriceValue) {
|
| 437 |
+
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
|
| 438 |
+
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
|
| 439 |
+
$price = $showMinPrice ? $_minimalPriceValue : 0;
|
| 440 |
+
} else {
|
| 441 |
+
$price = $_convertedFinalPrice;
|
| 442 |
+
$_exclTax = $_taxHelper->getPrice($_product, $price);
|
| 443 |
+
$_inclTax = $_taxHelper->getPrice($_product, $price, true);
|
| 444 |
+
}
|
| 445 |
+
?>
|
| 446 |
+
<?php if ($price): ?>
|
| 447 |
+
<div class="price-box">
|
| 448 |
+
<p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
|
| 449 |
+
<?php if ($showMinPrice): ?>
|
| 450 |
+
<span class="price-label"><?php echo $this->__('Starting at:') ?></span>
|
| 451 |
+
<?php endif ?>
|
| 452 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 453 |
+
<span class="price-excluding-tax">
|
| 454 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 455 |
+
<span class="price"
|
| 456 |
+
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 457 |
+
<?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
|
| 458 |
+
</span>
|
| 459 |
+
</span>
|
| 460 |
+
<span class="price-including-tax">
|
| 461 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 462 |
+
<span class="price"
|
| 463 |
+
id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 464 |
+
<?php echo $_coreHelper->formatPrice($_inclTax, false) ?>
|
| 465 |
+
</span>
|
| 466 |
+
</span>
|
| 467 |
+
<?php else: ?>
|
| 468 |
+
<?php
|
| 469 |
+
$_showPrice = $_inclTax;
|
| 470 |
+
if (!$_taxHelper->displayPriceIncludingTax()) {
|
| 471 |
+
$_showPrice = $_exclTax;
|
| 472 |
+
}
|
| 473 |
+
?>
|
| 474 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 475 |
+
<?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
|
| 476 |
+
</span>
|
| 477 |
+
<?php endif; ?>
|
| 478 |
+
</p>
|
| 479 |
+
</div>
|
| 480 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
|
| 481 |
+
<?php endif; /* if (!$_product->isGrouped()): */ ?>
|
app/design/frontend/rwd/default/template/hideprice/price.phtml~
ADDED
|
@@ -0,0 +1,478 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
|
| 28 |
+
<?php
|
| 29 |
+
/**
|
| 30 |
+
* Template for displaying product price in different places (products grid, product view page etc)
|
| 31 |
+
*
|
| 32 |
+
* @see Mage_Catalog_Block_Product_Abstract
|
| 33 |
+
*/
|
| 34 |
+
?>
|
| 35 |
+
<?php
|
| 36 |
+
if(!Mage::getSingleton('customer/session')->isLoggedIn()){
|
| 37 |
+
echo '<span class="login_for_price"><b>Login to See Price</b></span><br>';
|
| 38 |
+
return;
|
| 39 |
+
}
|
| 40 |
+
?>
|
| 41 |
+
- See more at: http://excellencemagentoblog.com/blog/2013/02/14/how-to-hide-price-from-non-logged-in-users-guest-users/#sthash.NNoPCrcX.dpuf
|
| 42 |
+
<?php
|
| 43 |
+
$_coreHelper = $this->helper('core');
|
| 44 |
+
$_weeeHelper = $this->helper('weee');
|
| 45 |
+
$_taxHelper = $this->helper('tax');
|
| 46 |
+
/* @var $_coreHelper Mage_Core_Helper_Data */
|
| 47 |
+
/* @var $_weeeHelper Mage_Weee_Helper_Data */
|
| 48 |
+
/* @var $_taxHelper Mage_Tax_Helper_Data */
|
| 49 |
+
|
| 50 |
+
$_product = $this->getProduct();
|
| 51 |
+
$_storeId = $_product->getStoreId();
|
| 52 |
+
$_store = $_product->getStore();
|
| 53 |
+
$_id = $_product->getId();
|
| 54 |
+
$_weeeSeparator = '';
|
| 55 |
+
$_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
|
| 56 |
+
$_minimalPriceValue = $_product->getMinimalPrice();
|
| 57 |
+
$_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
|
| 58 |
+
$_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
|
| 59 |
+
$_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
|
| 60 |
+
$_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
|
| 61 |
+
?>
|
| 62 |
+
|
| 63 |
+
<?php if (!$_product->isGrouped()): ?>
|
| 64 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
|
| 65 |
+
<?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
|
| 66 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
|
| 67 |
+
<?php if ($_weeeHelper->isTaxable()): ?>
|
| 68 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
|
| 69 |
+
<?php endif; ?>
|
| 70 |
+
<?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
|
| 71 |
+
<?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
|
| 72 |
+
|
| 73 |
+
<div class="price-box">
|
| 74 |
+
<?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
|
| 75 |
+
<?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
|
| 76 |
+
<?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
|
| 77 |
+
<?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
|
| 78 |
+
<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
|
| 79 |
+
<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
|
| 80 |
+
<?php if ($_finalPrice >= $_price): ?>
|
| 81 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 82 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 83 |
+
<span class="price-excluding-tax">
|
| 84 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 85 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 86 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
|
| 87 |
+
</span>
|
| 88 |
+
</span>
|
| 89 |
+
<span class="price-including-tax">
|
| 90 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 91 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 92 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 93 |
+
</span>
|
| 94 |
+
</span>
|
| 95 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 96 |
+
<span class="price-excluding-tax">
|
| 97 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 98 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 99 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
|
| 100 |
+
</span>
|
| 101 |
+
</span>
|
| 102 |
+
<span class="weee">(
|
| 103 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 104 |
+
<?php echo $_weeeSeparator; ?>
|
| 105 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 106 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 107 |
+
<?php endforeach; ?>
|
| 108 |
+
)</span>
|
| 109 |
+
<span class="price-including-tax">
|
| 110 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 111 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 112 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 113 |
+
</span>
|
| 114 |
+
</span>
|
| 115 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 116 |
+
<span class="price-excluding-tax">
|
| 117 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 118 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 119 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
|
| 120 |
+
</span>
|
| 121 |
+
</span>
|
| 122 |
+
<span class="price-including-tax">
|
| 123 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 124 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 125 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 126 |
+
</span>
|
| 127 |
+
<span class="weee">(
|
| 128 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 129 |
+
<?php echo $_weeeSeparator; ?>
|
| 130 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 131 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 132 |
+
<?php endforeach; ?>
|
| 133 |
+
)</span>
|
| 134 |
+
</span>
|
| 135 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 136 |
+
<span class="price-excluding-tax">
|
| 137 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 138 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 139 |
+
<?php echo $_coreHelper->formatPrice($_price, false) ?>
|
| 140 |
+
</span>
|
| 141 |
+
</span>
|
| 142 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 143 |
+
<span class="weee">
|
| 144 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 145 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 146 |
+
</span>
|
| 147 |
+
<?php endforeach; ?>
|
| 148 |
+
<span class="price-including-tax">
|
| 149 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 150 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 151 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 152 |
+
</span>
|
| 153 |
+
</span>
|
| 154 |
+
<?php else: ?>
|
| 155 |
+
<span class="price-excluding-tax">
|
| 156 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 157 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 158 |
+
<?php if ($_finalPrice == $_price): ?>
|
| 159 |
+
<?php echo $_coreHelper->formatPrice($_price, false) ?>
|
| 160 |
+
<?php else: ?>
|
| 161 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 162 |
+
<?php endif; ?>
|
| 163 |
+
</span>
|
| 164 |
+
</span>
|
| 165 |
+
<span class="price-including-tax">
|
| 166 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 167 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 168 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
|
| 169 |
+
</span>
|
| 170 |
+
</span>
|
| 171 |
+
<?php endif; ?>
|
| 172 |
+
<?php else: ?>
|
| 173 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1))): // including ?>
|
| 174 |
+
<?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
|
| 175 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 176 |
+
<?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
|
| 177 |
+
</span>
|
| 178 |
+
|
| 179 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // show description ?>
|
| 180 |
+
<span class="weee">(
|
| 181 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 182 |
+
<?php echo $_weeeSeparator; ?>
|
| 183 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 184 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
|
| 185 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 186 |
+
<?php endforeach; ?>
|
| 187 |
+
)</span>
|
| 188 |
+
<?php endif; ?>
|
| 189 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 190 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 191 |
+
<?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, true) ?>
|
| 192 |
+
</span>
|
| 193 |
+
<span class="weee">(
|
| 194 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 195 |
+
<?php echo $_weeeSeparator; ?>
|
| 196 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 197 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 198 |
+
<?php endforeach; ?>
|
| 199 |
+
)</span>
|
| 200 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 201 |
+
<span class="regular-price"><?php echo $_coreHelper->formatPrice($_price, true) ?></span><br/>
|
| 202 |
+
<?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
|
| 203 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 204 |
+
<span class="weee">
|
| 205 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 206 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
|
| 207 |
+
</span>
|
| 208 |
+
<?php endforeach; ?>
|
| 209 |
+
<span class="regular-price"
|
| 210 |
+
id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 211 |
+
<?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
|
| 212 |
+
</span>
|
| 213 |
+
<?php else: ?>
|
| 214 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 215 |
+
<?php if ($_finalPrice == $_price): ?>
|
| 216 |
+
<?php echo $_coreHelper->formatPrice($_price, true) ?>
|
| 217 |
+
<?php else: ?>
|
| 218 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
|
| 219 |
+
<?php endif; ?>
|
| 220 |
+
</span>
|
| 221 |
+
<?php endif; ?>
|
| 222 |
+
<?php endif; ?>
|
| 223 |
+
<?php else: /* if ($_finalPrice == $_price): */ ?>
|
| 224 |
+
<?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
|
| 225 |
+
<?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
|
| 226 |
+
|
| 227 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 228 |
+
<p class="old-price">
|
| 229 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 230 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 231 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
|
| 232 |
+
</span>
|
| 233 |
+
</p>
|
| 234 |
+
|
| 235 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 236 |
+
<p class="special-price">
|
| 237 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 238 |
+
<span class="price-excluding-tax">
|
| 239 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 240 |
+
<span class="price"
|
| 241 |
+
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 242 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
|
| 243 |
+
</span>
|
| 244 |
+
</span>
|
| 245 |
+
<span class="price-including-tax">
|
| 246 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 247 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 248 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 249 |
+
</span>
|
| 250 |
+
</span>
|
| 251 |
+
</p>
|
| 252 |
+
<?php else: ?>
|
| 253 |
+
<p class="special-price">
|
| 254 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 255 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 256 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
|
| 257 |
+
</span>
|
| 258 |
+
</p>
|
| 259 |
+
<?php endif; ?>
|
| 260 |
+
|
| 261 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 262 |
+
<p class="old-price">
|
| 263 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 264 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 265 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
|
| 266 |
+
</span>
|
| 267 |
+
</p>
|
| 268 |
+
|
| 269 |
+
<p class="special-price">
|
| 270 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 271 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 272 |
+
<span class="price-excluding-tax">
|
| 273 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 274 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 275 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
|
| 276 |
+
</span>
|
| 277 |
+
</span>
|
| 278 |
+
<span class="weee">(
|
| 279 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 280 |
+
<?php echo $_weeeSeparator; ?>
|
| 281 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 282 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 283 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 284 |
+
<?php endforeach; ?>
|
| 285 |
+
)</span>
|
| 286 |
+
<span class="price-including-tax">
|
| 287 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 288 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 289 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 290 |
+
</span>
|
| 291 |
+
</span>
|
| 292 |
+
<?php else: ?>
|
| 293 |
+
<p class="special-price">
|
| 294 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 295 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 296 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
|
| 297 |
+
</span>
|
| 298 |
+
</p>
|
| 299 |
+
<span class="weee">(
|
| 300 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 301 |
+
<?php echo $_weeeSeparator; ?>
|
| 302 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 303 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 304 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 305 |
+
<?php endforeach; ?>
|
| 306 |
+
)</span>
|
| 307 |
+
<?php endif; ?>
|
| 308 |
+
</p>
|
| 309 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 310 |
+
<p class="old-price">
|
| 311 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 312 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 313 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
|
| 314 |
+
</span>
|
| 315 |
+
</p>
|
| 316 |
+
|
| 317 |
+
<p class="special-price">
|
| 318 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 319 |
+
<span class="price-excluding-tax">
|
| 320 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 321 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 322 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
|
| 323 |
+
</span>
|
| 324 |
+
</span>
|
| 325 |
+
<span class="weee">(
|
| 326 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 327 |
+
<?php echo $_weeeSeparator; ?>
|
| 328 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 329 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 330 |
+
<?php endforeach; ?>
|
| 331 |
+
)</span>
|
| 332 |
+
<span class="price-including-tax">
|
| 333 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 334 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 335 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 336 |
+
</span>
|
| 337 |
+
</span>
|
| 338 |
+
</p>
|
| 339 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 340 |
+
<p class="old-price">
|
| 341 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 342 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 343 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
|
| 344 |
+
</span>
|
| 345 |
+
</p>
|
| 346 |
+
|
| 347 |
+
<p class="special-price">
|
| 348 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 349 |
+
<span class="price-excluding-tax">
|
| 350 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 351 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 352 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 353 |
+
</span>
|
| 354 |
+
</span>
|
| 355 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 356 |
+
<span class="weee">
|
| 357 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>
|
| 358 |
+
: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 359 |
+
</span>
|
| 360 |
+
<?php endforeach; ?>
|
| 361 |
+
<span class="price-including-tax">
|
| 362 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 363 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 364 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
|
| 365 |
+
</span>
|
| 366 |
+
</span>
|
| 367 |
+
</p>
|
| 368 |
+
<?php else: // excl. ?>
|
| 369 |
+
<p class="old-price">
|
| 370 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 371 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 372 |
+
<?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
|
| 373 |
+
</span>
|
| 374 |
+
</p>
|
| 375 |
+
|
| 376 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 377 |
+
<p class="special-price">
|
| 378 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 379 |
+
<span class="price-excluding-tax">
|
| 380 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 381 |
+
<span class="price"
|
| 382 |
+
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 383 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 384 |
+
</span>
|
| 385 |
+
</span>
|
| 386 |
+
<span class="price-including-tax">
|
| 387 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 388 |
+
<span class="price"
|
| 389 |
+
id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 390 |
+
<?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
|
| 391 |
+
</span>
|
| 392 |
+
</span>
|
| 393 |
+
</p>
|
| 394 |
+
<?php else: ?>
|
| 395 |
+
<p class="special-price">
|
| 396 |
+
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
|
| 397 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 398 |
+
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
|
| 399 |
+
</span>
|
| 400 |
+
</p>
|
| 401 |
+
<?php endif; ?>
|
| 402 |
+
<?php endif; ?>
|
| 403 |
+
|
| 404 |
+
<?php endif; /* if ($_finalPrice == $_price): */ ?>
|
| 405 |
+
|
| 406 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_convertedFinalPrice): ?>
|
| 407 |
+
|
| 408 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
|
| 409 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
|
| 410 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
|
| 411 |
+
<?php endif; ?>
|
| 412 |
+
|
| 413 |
+
<?php if ($this->getUseLinkForAsLowAs()): ?>
|
| 414 |
+
<a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
|
| 415 |
+
<?php else: ?>
|
| 416 |
+
<span class="minimal-price-link">
|
| 417 |
+
<?php endif ?>
|
| 418 |
+
<span class="label"><?php echo $this->__('As low as:') ?></span>
|
| 419 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 420 |
+
<?php echo $_coreHelper->formatPrice($_minimalPriceDisplayValue, false) ?>
|
| 421 |
+
</span>
|
| 422 |
+
<?php if ($this->getUseLinkForAsLowAs()): ?>
|
| 423 |
+
</a>
|
| 424 |
+
<?php else: ?>
|
| 425 |
+
</span>
|
| 426 |
+
<?php endif ?>
|
| 427 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
|
| 428 |
+
</div>
|
| 429 |
+
|
| 430 |
+
<?php else: /* if (!$_product->isGrouped()): */ ?>
|
| 431 |
+
<?php
|
| 432 |
+
$showMinPrice = $this->getDisplayMinimalPrice();
|
| 433 |
+
if ($showMinPrice && $_minimalPriceValue) {
|
| 434 |
+
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
|
| 435 |
+
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
|
| 436 |
+
$price = $showMinPrice ? $_minimalPriceValue : 0;
|
| 437 |
+
} else {
|
| 438 |
+
$price = $_convertedFinalPrice;
|
| 439 |
+
$_exclTax = $_taxHelper->getPrice($_product, $price);
|
| 440 |
+
$_inclTax = $_taxHelper->getPrice($_product, $price, true);
|
| 441 |
+
}
|
| 442 |
+
?>
|
| 443 |
+
<?php if ($price): ?>
|
| 444 |
+
<div class="price-box">
|
| 445 |
+
<p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
|
| 446 |
+
<?php if ($showMinPrice): ?>
|
| 447 |
+
<span class="price-label"><?php echo $this->__('Starting at:') ?></span>
|
| 448 |
+
<?php endif ?>
|
| 449 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 450 |
+
<span class="price-excluding-tax">
|
| 451 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 452 |
+
<span class="price"
|
| 453 |
+
id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 454 |
+
<?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
|
| 455 |
+
</span>
|
| 456 |
+
</span>
|
| 457 |
+
<span class="price-including-tax">
|
| 458 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 459 |
+
<span class="price"
|
| 460 |
+
id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 461 |
+
<?php echo $_coreHelper->formatPrice($_inclTax, false) ?>
|
| 462 |
+
</span>
|
| 463 |
+
</span>
|
| 464 |
+
<?php else: ?>
|
| 465 |
+
<?php
|
| 466 |
+
$_showPrice = $_inclTax;
|
| 467 |
+
if (!$_taxHelper->displayPriceIncludingTax()) {
|
| 468 |
+
$_showPrice = $_exclTax;
|
| 469 |
+
}
|
| 470 |
+
?>
|
| 471 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 472 |
+
<?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
|
| 473 |
+
</span>
|
| 474 |
+
<?php endif; ?>
|
| 475 |
+
</p>
|
| 476 |
+
</div>
|
| 477 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
|
| 478 |
+
<?php endif; /* if (!$_product->isGrouped()): */ ?>
|
app/design/frontend/rwd/default/template/hideprice/view.phtml
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
/**
|
| 27 |
+
* Product view template
|
| 28 |
+
*
|
| 29 |
+
* @see Mage_Catalog_Block_Product_View
|
| 30 |
+
* @see Mage_Review_Block_Product_View
|
| 31 |
+
*/
|
| 32 |
+
?>
|
| 33 |
+
<?php $_helper = $this->helper('catalog/output'); ?>
|
| 34 |
+
<?php $_product = $this->getProduct(); ?>
|
| 35 |
+
<?php $hidePriceHelper = Mage::helper('hideprice'); ?>
|
| 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()->toHtml() ?></div>
|
| 40 |
+
<div class="product-view">
|
| 41 |
+
<div class="product-essential">
|
| 42 |
+
<form action="<?php echo $this->getSubmitUrl($_product, array('_secure' => $this->_isSecure())) ?>" method="post" id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
|
| 43 |
+
<?php echo $this->getBlockHtml('formkey') ?>
|
| 44 |
+
<div class="no-display">
|
| 45 |
+
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
| 46 |
+
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<div class="product-shop">
|
| 50 |
+
<div class="product-name">
|
| 51 |
+
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
|
| 52 |
+
</div>
|
| 53 |
+
|
| 54 |
+
<?php if ($this->canEmailToFriend()): ?>
|
| 55 |
+
<p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
|
| 56 |
+
<?php endif; ?>
|
| 57 |
+
|
| 58 |
+
<?php echo $this->getReviewsSummaryHtml($_product, false, true) ?>
|
| 59 |
+
<?php echo $this->getChildHtml('alert_urls') ?>
|
| 60 |
+
<?php echo $this->getChildHtml('product_type_data') ?>
|
| 61 |
+
<?php echo $this->getTierPriceHtml() ?>
|
| 62 |
+
<?php echo $this->getChildHtml('extrahint') ?>
|
| 63 |
+
|
| 64 |
+
<?php if (!$this->hasOptions()): ?>
|
| 65 |
+
<div class="add-to-box">
|
| 66 |
+
<?php
|
| 67 |
+
if ($hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 68 |
+
?>
|
| 69 |
+
<?php if ($_product->isSaleable()): ?>
|
| 70 |
+
<?php echo $this->getChildHtml('addtocart') ?>
|
| 71 |
+
<?php if ($this->helper('wishlist')->isAllow() || $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
|
| 72 |
+
<span class="or"><?php echo $this->__('OR') ?></span>
|
| 73 |
+
<?php endif; ?>
|
| 74 |
+
<?php endif; ?>
|
| 75 |
+
<?php echo $this->getChildHtml('addto') ?>
|
| 76 |
+
<?php } ?>
|
| 77 |
+
</div>
|
| 78 |
+
<?php echo $this->getChildHtml('extra_buttons') ?>
|
| 79 |
+
<?php elseif (!$_product->isSaleable()): ?>
|
| 80 |
+
<div class="add-to-box">
|
| 81 |
+
<?php echo $this->getChildHtml('addto') ?>
|
| 82 |
+
</div>
|
| 83 |
+
<?php endif; ?>
|
| 84 |
+
|
| 85 |
+
<?php if ($_product->getShortDescription()): ?>
|
| 86 |
+
<div class="short-description">
|
| 87 |
+
<h2><?php echo $this->__('Quick Overview') ?></h2>
|
| 88 |
+
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
|
| 89 |
+
</div>
|
| 90 |
+
<?php endif; ?>
|
| 91 |
+
|
| 92 |
+
<?php echo $this->getChildHtml('other'); ?>
|
| 93 |
+
|
| 94 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()): ?>
|
| 95 |
+
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
|
| 96 |
+
<?php endif; ?>
|
| 97 |
+
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<div class="product-img-box">
|
| 101 |
+
<?php echo $this->getChildHtml('media') ?>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<div class="clearer"></div>
|
| 105 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()): ?>
|
| 106 |
+
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
|
| 107 |
+
<?php endif; ?>
|
| 108 |
+
</form>
|
| 109 |
+
<script type="text/javascript">
|
| 110 |
+
//<![CDATA[
|
| 111 |
+
var productAddToCartForm = new VarienForm('product_addtocart_form');
|
| 112 |
+
productAddToCartForm.submit = function(button, url) {
|
| 113 |
+
if (this.validator.validate()) {
|
| 114 |
+
var form = this.form;
|
| 115 |
+
var oldUrl = form.action;
|
| 116 |
+
|
| 117 |
+
if (url) {
|
| 118 |
+
form.action = url;
|
| 119 |
+
}
|
| 120 |
+
var e = null;
|
| 121 |
+
try {
|
| 122 |
+
this.form.submit();
|
| 123 |
+
} catch (e) {
|
| 124 |
+
}
|
| 125 |
+
this.form.action = oldUrl;
|
| 126 |
+
if (e) {
|
| 127 |
+
throw e;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
if (button && button != 'undefined') {
|
| 131 |
+
button.disabled = true;
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
}.bind(productAddToCartForm);
|
| 135 |
+
|
| 136 |
+
productAddToCartForm.submitLight = function(button, url) {
|
| 137 |
+
if (this.validator) {
|
| 138 |
+
var nv = Validation.methods;
|
| 139 |
+
delete Validation.methods['required-entry'];
|
| 140 |
+
delete Validation.methods['validate-one-required'];
|
| 141 |
+
delete Validation.methods['validate-one-required-by-name'];
|
| 142 |
+
// Remove custom datetime validators
|
| 143 |
+
for (var methodName in Validation.methods) {
|
| 144 |
+
if (methodName.match(/^validate-datetime-.*/i)) {
|
| 145 |
+
delete Validation.methods[methodName];
|
| 146 |
+
}
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
if (this.validator.validate()) {
|
| 150 |
+
if (url) {
|
| 151 |
+
this.form.action = url;
|
| 152 |
+
}
|
| 153 |
+
this.form.submit();
|
| 154 |
+
}
|
| 155 |
+
Object.extend(Validation.methods, nv);
|
| 156 |
+
}
|
| 157 |
+
}.bind(productAddToCartForm);
|
| 158 |
+
//]]>
|
| 159 |
+
</script>
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
<div class="product-collateral">
|
| 163 |
+
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html): ?>
|
| 164 |
+
<div class="box-collateral <?php echo "box-{$alias}" ?>">
|
| 165 |
+
<?php if ($title = $this->getChildData($alias, 'title')): ?>
|
| 166 |
+
<h2><?php echo $this->escapeHtml($title); ?></h2>
|
| 167 |
+
<?php endif; ?>
|
| 168 |
+
<?php echo $html; ?>
|
| 169 |
+
</div>
|
| 170 |
+
<?php endforeach; ?>
|
| 171 |
+
<?php echo $this->getChildHtml('upsell_products') ?>
|
| 172 |
+
<?php echo $this->getChildHtml('product_additional_data') ?>
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
app/design/frontend/rwd/default/template/hideprice/view/addto.phtml
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
|
| 28 |
+
<?php $_product = $this->getProduct(); ?>
|
| 29 |
+
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
|
| 30 |
+
<?php $hidePriceHelper = Mage::helper('hideprice');?>
|
| 31 |
+
<?php
|
| 32 |
+
if ($hidePriceHelper->getCustomerIsLoggedIn()) {
|
| 33 |
+
|
| 34 |
+
?>
|
| 35 |
+
<ul class="add-to-links">
|
| 36 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 37 |
+
<li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href);
|
| 38 |
+
return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 39 |
+
<?php endif; ?>
|
| 40 |
+
<?php
|
| 41 |
+
$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
|
| 42 |
+
?>
|
| 43 |
+
<?php if ($_compareUrl) : ?>
|
| 44 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
| 45 |
+
<?php endif; ?>
|
| 46 |
+
</ul>
|
| 47 |
+
<?php } ?>
|
app/design/frontend/rwd/default/template/hideprice/view/addto.phtml~
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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@magento.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.magento.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
|
| 28 |
+
<?php $_product = $this->getProduct(); ?>
|
| 29 |
+
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
|
| 30 |
+
<?php
|
| 31 |
+
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
| 32 |
+
echo '<span class="login_for_details" style="float:left"><b>Login to Add to Cart</b></span>';
|
| 33 |
+
} else {
|
| 34 |
+
?>
|
| 35 |
+
<ul class="add-to-links">
|
| 36 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
| 37 |
+
<li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
| 38 |
+
<?php endif; ?>
|
| 39 |
+
<?php
|
| 40 |
+
$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
|
| 41 |
+
?>
|
| 42 |
+
<?php if($_compareUrl) : ?>
|
| 43 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
| 44 |
+
<?php endif; ?>
|
| 45 |
+
</ul>
|
| 46 |
+
<?php } ?>
|
app/etc/modules/Ansh_HidePrice.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Ansh_HidePrice>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>local</codePool>
|
| 7 |
+
</Ansh_HidePrice>
|
| 8 |
+
</modules>
|
| 9 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>Ansh_HidePrice</name>
|
| 4 |
+
<version>1.0.0</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license uri="https://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>Hide Price for non logged in users.</summary>
|
| 10 |
+
<description>Hide Price for non logged in users.</description>
|
| 11 |
+
<notes>Hide Price for non logged in users stable version.</notes>
|
| 12 |
+
<authors><author><name>Ansh</name><user>MagentoAnshsystem</user><email>MagentoAnshsystem@gmail.com</email></author></authors>
|
| 13 |
+
<date>2016-03-18</date>
|
| 14 |
+
<time>09:15:29</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Ansh"><dir name="HidePrice"><dir name="Block"><file name="HelloWorld1.php~" hash="1fc68ff7b1ae8cd278179fb5de7ee413"/><file name="HidePrice.php" hash="840f5b04b4af43ed58267534f1a512b5"/></dir><dir name="Helper"><file name="Data.php" hash="aea532e941905b243a9eab532c797106"/><file name="Data.php~" hash="4f5d348d9023746ee06bb4f7387e81ef"/></dir><dir name="etc"><file name="adminhtml.xml" hash="24cf40ec5248d140c85d9d3eec3a0d6c"/><file name="config.xml" hash="c7ee262f3ffdc123c37dad0ce5cdb197"/><file name="config.xml~" hash="a765b84a303d6a33e4d4c9dbebee88cc"/><file name="system.xml" hash="617aa5e643138a48b14979f6fdbfb3d1"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ansh_HidePrice.xml" hash="c01604f8c11f2208f5f2e318ea263870"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="rwd"><dir name="default"><dir name="layout"><file name="hideprice.xml" hash="be39329da3239a6a5b3928499d919d3e"/></dir><dir name="template"><dir name="hideprice"><file name="addtocart.phtml" hash="becc50373c2a7ebb0d4ca5f694cbd2f9"/><dir name="compare"><file name="list.phtml" hash="a6f88cfa306158c7b0489c96e9742a85"/></dir><file name="helloworld.phtml~" hash="eac9ecff1edb8d101311ba68a6aa0668"/><file name="helloworld1.phtml~" hash="9384fc2dc8ebbd8f9ad261ea942b6845"/><file name="list.phtml" hash="eced54f5ec23e356417960bbd175fa3f"/><file name="price.phtml" hash="e862d96ea73652e79b62feedb0626883"/><file name="price.phtml~" hash="197e450525bcad7ba600e6f0e361fd46"/><dir name="view"><file name="addto.phtml" hash="af14a041c970ebf47173ce76d5f9e824"/><file name="addto.phtml~" hash="e9888c07df82992fa8db13e323e76c7f"/></dir><file name="view.phtml" hash="c1faf0f1df161e2ef11953ff3c3fa823"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
+
<compatible/>
|
| 17 |
+
<dependencies><required><php><min>5.5.0</min><max>5.6.0</max></php></required></dependencies>
|
| 18 |
+
</package>
|
