Version Notes
Work with simple products only.
Need improvement to work with currency displayed as 1 000 for Russian rubles or 1,000.
Download this release
Release Info
| Developer | Gershon |
| Extension | YouSave_Alternative_Pricing |
| Version | 1.0.1 |
| Comparing to | |
| See all releases | |
Version 1.0.1
- app/code/local/ILex/YouSave/.DS_Store +0 -0
- app/code/local/ILex/YouSave/Helper/Data.php +5 -0
- app/code/local/ILex/YouSave/etc/adminhtml.xml +23 -0
- app/code/local/ILex/YouSave/etc/config.xml +24 -0
- app/code/local/ILex/YouSave/etc/system.xml +48 -0
- app/design/frontend/base/default/layout/yousave.xml +158 -0
- app/design/frontend/base/default/template/yousave/product/price.phtml +453 -0
- app/etc/modules/ILex_YouSave.xml +10 -0
- package.xml +20 -0
app/code/local/ILex/YouSave/.DS_Store
ADDED
|
Binary file
|
app/code/local/ILex/YouSave/Helper/Data.php
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class ILex_YouSave_Helper_Data extends Mage_Core_Helper_Abstract
|
| 3 |
+
{
|
| 4 |
+
}
|
| 5 |
+
|
app/code/local/ILex/YouSave/etc/adminhtml.xml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<acl>
|
| 4 |
+
<resources>
|
| 5 |
+
<admin>
|
| 6 |
+
<children>
|
| 7 |
+
<system>
|
| 8 |
+
<children>
|
| 9 |
+
<config>
|
| 10 |
+
<children>
|
| 11 |
+
<yousave translate="title" module="yousave">
|
| 12 |
+
<title>You Save Section</title>
|
| 13 |
+
<sort_order>0</sort_order>
|
| 14 |
+
</yousave>
|
| 15 |
+
</children>
|
| 16 |
+
</config>
|
| 17 |
+
</children>
|
| 18 |
+
</system>
|
| 19 |
+
</children>
|
| 20 |
+
</admin>
|
| 21 |
+
</resources>
|
| 22 |
+
</acl>
|
| 23 |
+
</config>
|
app/code/local/ILex/YouSave/etc/config.xml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<ILex_YouSave>
|
| 5 |
+
<version>0.1.0</version>
|
| 6 |
+
</ILex_YouSave>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<helpers>
|
| 10 |
+
<yousave>
|
| 11 |
+
<class>ILex_YouSave_Helper</class>
|
| 12 |
+
</yousave>
|
| 13 |
+
</helpers>
|
| 14 |
+
</global>
|
| 15 |
+
<frontend>
|
| 16 |
+
<layout>
|
| 17 |
+
<updates>
|
| 18 |
+
<yousave>
|
| 19 |
+
<file>yousave.xml</file>
|
| 20 |
+
</yousave>
|
| 21 |
+
</updates>
|
| 22 |
+
</layout>
|
| 23 |
+
</frontend>
|
| 24 |
+
</config>
|
app/code/local/ILex/YouSave/etc/system.xml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<tabs><!--creates tabs on the adminhtml page-->
|
| 4 |
+
<yousave translate="label" module="yousave">
|
| 5 |
+
<label>AMarketing</label><!--creates a tab with the title of Training (a menu's title is called title a tabs title is called training)-->
|
| 6 |
+
<sort_order>102</sort_order><!--the order of the tab-->
|
| 7 |
+
</yousave>
|
| 8 |
+
</tabs>
|
| 9 |
+
<sections>
|
| 10 |
+
<yousave translate="label" module="yousave">
|
| 11 |
+
<label>You Save</label>
|
| 12 |
+
<tab>yousave</tab>
|
| 13 |
+
<frontend_type>text</frontend_type>
|
| 14 |
+
<sort_order>1000</sort_order>
|
| 15 |
+
<show_in_default>1</show_in_default>
|
| 16 |
+
<show_in_website>1</show_in_website>
|
| 17 |
+
<show_in_store>1</show_in_store>
|
| 18 |
+
<groups>
|
| 19 |
+
<!--<general translate="label">-->
|
| 20 |
+
<general translate="label" module="yousave">
|
| 21 |
+
<label>General</label>
|
| 22 |
+
<frontend_type>text</frontend_type>
|
| 23 |
+
<sort_order>1000</sort_order>
|
| 24 |
+
<show_in_default>1</show_in_default>
|
| 25 |
+
<show_in_website>1</show_in_website>
|
| 26 |
+
<show_in_store>1</show_in_store>
|
| 27 |
+
<comment>
|
| 28 |
+
<![CDATA[<div class="creare-container">
|
| 29 |
+
<div class="creare-header">This module was developed by <a href="http://il-magento.net" target="_blank">www.il-magento.net</a> - <strong>Magento Design, Development & Extensions</strong>.</div>
|
| 30 |
+
|
| 31 |
+
<div class="creare-clear"></div>]]>
|
| 32 |
+
</comment>
|
| 33 |
+
<fields>
|
| 34 |
+
<enable translate="label">
|
| 35 |
+
<label>Enable</label>
|
| 36 |
+
<frontend_type>select</frontend_type>
|
| 37 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
| 38 |
+
<sort_order>0</sort_order>
|
| 39 |
+
<show_in_default>1</show_in_default>
|
| 40 |
+
<show_in_website>1</show_in_website>
|
| 41 |
+
<show_in_store>1</show_in_store>
|
| 42 |
+
</enable>
|
| 43 |
+
</fields>
|
| 44 |
+
</general>
|
| 45 |
+
</groups>
|
| 46 |
+
</yousave>
|
| 47 |
+
</sections>
|
| 48 |
+
</config>
|
app/design/frontend/base/default/layout/yousave.xml
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
|
| 3 |
+
<layout version="0.1.0">
|
| 4 |
+
|
| 5 |
+
<catalog_category_default>
|
| 6 |
+
<reference name="product_list">
|
| 7 |
+
<reference name="catalog_product_price_template">
|
| 8 |
+
<action method="addPriceBlockType">
|
| 9 |
+
<type>simple</type>
|
| 10 |
+
<block>catalog/product_price</block>
|
| 11 |
+
<template>yousave/product/price.phtml</template>
|
| 12 |
+
</action>
|
| 13 |
+
<action method="addPriceBlockType">
|
| 14 |
+
<type>configurable</type>
|
| 15 |
+
<block>catalog/product_price</block>
|
| 16 |
+
<template>yousave/product/price.phtml</template>
|
| 17 |
+
</action>
|
| 18 |
+
<action method="addPriceBlockType">
|
| 19 |
+
<type>grouped</type>
|
| 20 |
+
<block>catalog/product_price</block>
|
| 21 |
+
<template>yousave/product/price.phtml</template>
|
| 22 |
+
</action>
|
| 23 |
+
</reference>
|
| 24 |
+
</reference>
|
| 25 |
+
</catalog_category_default>
|
| 26 |
+
|
| 27 |
+
<catalog_category_view>
|
| 28 |
+
<reference name="product_list">
|
| 29 |
+
<reference name="catalog_product_price_template">
|
| 30 |
+
<action method="addPriceBlockType">
|
| 31 |
+
<type>simple</type>
|
| 32 |
+
<block>catalog/product_price</block>
|
| 33 |
+
<template>yousave/product/price.phtml</template>
|
| 34 |
+
</action>
|
| 35 |
+
<action method="addPriceBlockType">
|
| 36 |
+
<type>configurable</type>
|
| 37 |
+
<block>catalog/product_price</block>
|
| 38 |
+
<template>yousave/product/price.phtml</template>
|
| 39 |
+
</action>
|
| 40 |
+
<action method="addPriceBlockType">
|
| 41 |
+
<type>grouped</type>
|
| 42 |
+
<block>catalog/product_price</block>
|
| 43 |
+
<template>yousave/product/price.phtml</template>
|
| 44 |
+
</action>
|
| 45 |
+
</reference>
|
| 46 |
+
</reference>
|
| 47 |
+
</catalog_category_view>
|
| 48 |
+
|
| 49 |
+
<catalog_category_layered>
|
| 50 |
+
<reference name="product_list">
|
| 51 |
+
<reference name="catalog_product_price_template">
|
| 52 |
+
<action method="addPriceBlockType">
|
| 53 |
+
<type>simple</type>
|
| 54 |
+
<block>catalog/product_price</block>
|
| 55 |
+
<template>yousave/product/price.phtml</template>
|
| 56 |
+
</action>
|
| 57 |
+
<action method="addPriceBlockType">
|
| 58 |
+
<type>configurable</type>
|
| 59 |
+
<block>catalog/product_price</block>
|
| 60 |
+
<template>yousave/product/price.phtml</template>
|
| 61 |
+
</action>
|
| 62 |
+
<action method="addPriceBlockType">
|
| 63 |
+
<type>grouped</type>
|
| 64 |
+
<block>catalog/product_price</block>
|
| 65 |
+
<template>yousave/product/price.phtml</template>
|
| 66 |
+
</action>
|
| 67 |
+
</reference>
|
| 68 |
+
</reference>
|
| 69 |
+
</catalog_category_layered>
|
| 70 |
+
|
| 71 |
+
<catalog_product_compare_index>
|
| 72 |
+
<reference name="catalog.compare.list">
|
| 73 |
+
<reference name="catalog_product_price_template">
|
| 74 |
+
<action method="addPriceBlockType">
|
| 75 |
+
<type>simple</type>
|
| 76 |
+
<block>catalog/product_price</block>
|
| 77 |
+
<template>yousave/product/price.phtml</template>
|
| 78 |
+
</action>
|
| 79 |
+
<action method="addPriceBlockType">
|
| 80 |
+
<type>configurable</type>
|
| 81 |
+
<block>catalog/product_price</block>
|
| 82 |
+
<template>yousave/product/price.phtml</template>
|
| 83 |
+
</action>
|
| 84 |
+
<action method="addPriceBlockType">
|
| 85 |
+
<type>grouped</type>
|
| 86 |
+
<block>catalog/product_price</block>
|
| 87 |
+
<template>yousave/product/price.phtml</template>
|
| 88 |
+
</action>
|
| 89 |
+
</reference>
|
| 90 |
+
</reference>
|
| 91 |
+
</catalog_product_compare_index>
|
| 92 |
+
|
| 93 |
+
<catalogsearch_result_index>
|
| 94 |
+
<reference name="search_result_list">
|
| 95 |
+
<reference name="catalog_product_price_template">
|
| 96 |
+
<action method="addPriceBlockType">
|
| 97 |
+
<type>simple</type>
|
| 98 |
+
<block>catalog/product_price</block>
|
| 99 |
+
<template>yousave/product/price.phtml</template>
|
| 100 |
+
</action>
|
| 101 |
+
<action method="addPriceBlockType">
|
| 102 |
+
<type>configurable</type>
|
| 103 |
+
<block>catalog/product_price</block>
|
| 104 |
+
<template>yousave/product/price.phtml</template>
|
| 105 |
+
</action>
|
| 106 |
+
<action method="addPriceBlockType">
|
| 107 |
+
<type>grouped</type>
|
| 108 |
+
<block>catalog/product_price</block>
|
| 109 |
+
<template>yousave/product/price.phtml</template>
|
| 110 |
+
</action>
|
| 111 |
+
</reference>
|
| 112 |
+
</reference>
|
| 113 |
+
</catalogsearch_result_index>
|
| 114 |
+
|
| 115 |
+
<catalogsearch_advanced_result>
|
| 116 |
+
<reference name="search_result_list">
|
| 117 |
+
<reference name="catalog_product_price_template">
|
| 118 |
+
<action method="addPriceBlockType">
|
| 119 |
+
<type>simple</type>
|
| 120 |
+
<block>catalog/product_price</block>
|
| 121 |
+
<template>yousave/product/price.phtml</template>
|
| 122 |
+
</action>
|
| 123 |
+
<action method="addPriceBlockType">
|
| 124 |
+
<type>configurable</type>
|
| 125 |
+
<block>catalog/product_price</block>
|
| 126 |
+
<template>yousave/product/price.phtml</template>
|
| 127 |
+
</action>
|
| 128 |
+
<action method="addPriceBlockType">
|
| 129 |
+
<type>grouped</type>
|
| 130 |
+
<block>catalog/product_price</block>
|
| 131 |
+
<template>yousave/product/price.phtml</template>
|
| 132 |
+
</action>
|
| 133 |
+
</reference>
|
| 134 |
+
</reference>
|
| 135 |
+
</catalogsearch_advanced_result>
|
| 136 |
+
|
| 137 |
+
<catalog_product_view>
|
| 138 |
+
<reference name="catalog.product.related">
|
| 139 |
+
<reference name="catalog_product_price_template">
|
| 140 |
+
<action method="addPriceBlockType">
|
| 141 |
+
<type>simple</type>
|
| 142 |
+
<block>catalog/product_price</block>
|
| 143 |
+
<template>yousave/product/price.phtml</template>
|
| 144 |
+
</action>
|
| 145 |
+
<action method="addPriceBlockType">
|
| 146 |
+
<type>configurable</type>
|
| 147 |
+
<block>catalog/product_price</block>
|
| 148 |
+
<template>yousave/product/price.phtml</template>
|
| 149 |
+
</action>
|
| 150 |
+
<action method="addPriceBlockType">
|
| 151 |
+
<type>grouped</type>
|
| 152 |
+
<block>catalog/product_price</block>
|
| 153 |
+
<template>yousave/product/price.phtml</template>
|
| 154 |
+
</action>
|
| 155 |
+
</reference>
|
| 156 |
+
</reference>
|
| 157 |
+
</catalog_product_view>
|
| 158 |
+
</layout>
|
app/design/frontend/base/default/template/yousave/product/price.phtml
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* DISCLAIMER
|
| 16 |
+
*
|
| 17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
+
* versions in the future. If you wish to customize Magento for your
|
| 19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
|
| 28 |
+
<?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 |
+
$_coreHelper = $this->helper('core');
|
| 37 |
+
$_weeeHelper = $this->helper('weee');
|
| 38 |
+
$_taxHelper = $this->helper('tax');
|
| 39 |
+
/* @var $_coreHelper Mage_Core_Helper_Data */
|
| 40 |
+
/* @var $_weeeHelper Mage_Weee_Helper_Data */
|
| 41 |
+
/* @var $_taxHelper Mage_Tax_Helper_Data */
|
| 42 |
+
|
| 43 |
+
$_product = $this->getProduct();
|
| 44 |
+
$_storeId = $_product->getStoreId();
|
| 45 |
+
$_id = $_product->getId();
|
| 46 |
+
$_weeeSeparator = '';
|
| 47 |
+
$_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
|
| 48 |
+
$_minimalPriceValue = $_product->getMinimalPrice();
|
| 49 |
+
$_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
|
| 50 |
+
?>
|
| 51 |
+
|
| 52 |
+
<?php if (!$_product->isGrouped()): ?>
|
| 53 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
|
| 54 |
+
<?php if ($_weeeHelper->typeOfDisplay($_product, array(Mage_Weee_Model_Tax::DISPLAY_INCL_DESCR, Mage_Weee_Model_Tax::DISPLAY_EXCL_DESCR_INCL, 4))): ?>
|
| 55 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
|
| 56 |
+
<?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
|
| 57 |
+
<?php endif; ?>
|
| 58 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
|
| 59 |
+
<?php if ($_weeeHelper->isTaxable() && !$_taxHelper->priceIncludesTax($_storeId)): ?>
|
| 60 |
+
<?php $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
|
| 61 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes); ?>
|
| 62 |
+
<?php endif; ?>
|
| 63 |
+
|
| 64 |
+
<div class="price-box">
|
| 65 |
+
<?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
|
| 66 |
+
<?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
|
| 67 |
+
<?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
|
| 68 |
+
<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
|
| 69 |
+
<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
|
| 70 |
+
<?php if ($_finalPrice >= $_price): ?>
|
| 71 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 72 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 73 |
+
<span class="price-excluding-tax">
|
| 74 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 75 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 76 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
|
| 77 |
+
</span>
|
| 78 |
+
</span>
|
| 79 |
+
<span class="price-including-tax">
|
| 80 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 81 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 82 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 83 |
+
</span>
|
| 84 |
+
</span>
|
| 85 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 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->currency($_price + $_weeeTaxAmount, true, 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->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 96 |
+
</span>
|
| 97 |
+
<span class="weee">(
|
| 98 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 99 |
+
<?php echo $_weeeSeparator; ?>
|
| 100 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 101 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 102 |
+
<?php endforeach; ?>
|
| 103 |
+
)</span>
|
| 104 |
+
</span>
|
| 105 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 106 |
+
<span class="price-excluding-tax">
|
| 107 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 108 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 109 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
|
| 110 |
+
</span>
|
| 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->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 116 |
+
</span>
|
| 117 |
+
<span class="weee">(
|
| 118 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 119 |
+
<?php echo $_weeeSeparator; ?>
|
| 120 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 121 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 122 |
+
<?php endforeach; ?>
|
| 123 |
+
)</span>
|
| 124 |
+
</span>
|
| 125 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 126 |
+
<span class="price-excluding-tax">
|
| 127 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 128 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 129 |
+
<?php echo $_coreHelper->currency($_price, true, false) ?>
|
| 130 |
+
</span>
|
| 131 |
+
</span>
|
| 132 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 133 |
+
<span class="weee">
|
| 134 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 135 |
+
</span>
|
| 136 |
+
<?php endforeach; ?>
|
| 137 |
+
<span class="price-including-tax">
|
| 138 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 139 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 140 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 141 |
+
</span>
|
| 142 |
+
</span>
|
| 143 |
+
<?php else: ?>
|
| 144 |
+
<span class="price-excluding-tax">
|
| 145 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 146 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 147 |
+
<?php if ($_finalPrice == $_price): ?>
|
| 148 |
+
<?php echo $_coreHelper->currency($_price, true, false) ?>
|
| 149 |
+
<?php else: ?>
|
| 150 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
| 151 |
+
<?php endif; ?>
|
| 152 |
+
</span>
|
| 153 |
+
</span>
|
| 154 |
+
<span class="price-including-tax">
|
| 155 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 156 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 157 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
|
| 158 |
+
</span>
|
| 159 |
+
</span>
|
| 160 |
+
<?php endif; ?>
|
| 161 |
+
<?php else: ?>
|
| 162 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 163 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 164 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
| 165 |
+
</span>
|
| 166 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 167 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 168 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
| 169 |
+
</span>
|
| 170 |
+
<span class="weee">(
|
| 171 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 172 |
+
<?php echo $_weeeSeparator; ?>
|
| 173 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 174 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 175 |
+
<?php endforeach; ?>
|
| 176 |
+
)</span>
|
| 177 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 178 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 179 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
| 180 |
+
</span>
|
| 181 |
+
<span class="weee">(
|
| 182 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 183 |
+
<?php echo $_weeeSeparator; ?>
|
| 184 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 185 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 186 |
+
<?php endforeach; ?>
|
| 187 |
+
)</span>
|
| 188 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 189 |
+
<span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
|
| 190 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 191 |
+
<span class="weee">
|
| 192 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 193 |
+
</span>
|
| 194 |
+
<?php endforeach; ?>
|
| 195 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 196 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
| 197 |
+
</span>
|
| 198 |
+
<?php else: ?>
|
| 199 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 200 |
+
<?php if ($_finalPrice == $_price): ?>
|
| 201 |
+
<?php echo $_coreHelper->currency($_price, true, true) ?>
|
| 202 |
+
<?php else: ?>
|
| 203 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
|
| 204 |
+
<?php endif; ?>
|
| 205 |
+
</span>
|
| 206 |
+
<?php endif; ?>
|
| 207 |
+
<?php endif; ?>
|
| 208 |
+
<?php else: /* if ($_finalPrice == $_price): */ ?>
|
| 209 |
+
<?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
|
| 210 |
+
|
| 211 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
| 212 |
+
<p class="old-price">
|
| 213 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 214 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 215 |
+
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
|
| 216 |
+
</span>
|
| 217 |
+
</p>
|
| 218 |
+
|
| 219 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 220 |
+
<p class="special-price">
|
| 221 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 222 |
+
<span class="price-excluding-tax">
|
| 223 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 224 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 225 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
|
| 226 |
+
</span>
|
| 227 |
+
</span>
|
| 228 |
+
<span class="price-including-tax">
|
| 229 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 230 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 231 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 232 |
+
</span>
|
| 233 |
+
</span>
|
| 234 |
+
</p>
|
| 235 |
+
<?php else: ?>
|
| 236 |
+
<p class="special-price">
|
| 237 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 238 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 239 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 240 |
+
</span>
|
| 241 |
+
</p>
|
| 242 |
+
<?php endif; ?>
|
| 243 |
+
|
| 244 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
| 245 |
+
<p class="old-price">
|
| 246 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 247 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 248 |
+
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
|
| 249 |
+
</span>
|
| 250 |
+
</p>
|
| 251 |
+
|
| 252 |
+
<p class="special-price">
|
| 253 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 254 |
+
<span class="price-excluding-tax">
|
| 255 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 256 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 257 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
|
| 258 |
+
</span>
|
| 259 |
+
</span>
|
| 260 |
+
<span class="weee">(
|
| 261 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 262 |
+
<?php echo $_weeeSeparator; ?>
|
| 263 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 264 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 265 |
+
<?php endforeach; ?>
|
| 266 |
+
)</span>
|
| 267 |
+
<span class="price-including-tax">
|
| 268 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 269 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 270 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 271 |
+
</span>
|
| 272 |
+
</span>
|
| 273 |
+
</p>
|
| 274 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
| 275 |
+
<p class="old-price">
|
| 276 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 277 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 278 |
+
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
|
| 279 |
+
</span>
|
| 280 |
+
</p>
|
| 281 |
+
|
| 282 |
+
<p class="special-price">
|
| 283 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 284 |
+
<span class="price-excluding-tax">
|
| 285 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 286 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 287 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
|
| 288 |
+
</span>
|
| 289 |
+
</span>
|
| 290 |
+
<span class="weee">(
|
| 291 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 292 |
+
<?php echo $_weeeSeparator; ?>
|
| 293 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
| 294 |
+
<?php $_weeeSeparator = ' + '; ?>
|
| 295 |
+
<?php endforeach; ?>
|
| 296 |
+
)</span>
|
| 297 |
+
<span class="price-including-tax">
|
| 298 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 299 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 300 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 301 |
+
</span>
|
| 302 |
+
</span>
|
| 303 |
+
</p>
|
| 304 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
| 305 |
+
<p class="old-price">
|
| 306 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 307 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 308 |
+
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
|
| 309 |
+
</span>
|
| 310 |
+
</p>
|
| 311 |
+
|
| 312 |
+
<p class="special-price">
|
| 313 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 314 |
+
<span class="price-excluding-tax">
|
| 315 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 316 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 317 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
| 318 |
+
</span>
|
| 319 |
+
</span>
|
| 320 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
| 321 |
+
<span class="weee">
|
| 322 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
| 323 |
+
</span>
|
| 324 |
+
<?php endforeach; ?>
|
| 325 |
+
<span class="price-including-tax">
|
| 326 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 327 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 328 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
| 329 |
+
</span>
|
| 330 |
+
</span>
|
| 331 |
+
</p>
|
| 332 |
+
<?php else: // excl. ?>
|
| 333 |
+
<p class="old-price">
|
| 334 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
| 335 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 336 |
+
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
|
| 337 |
+
</span>
|
| 338 |
+
</p>
|
| 339 |
+
|
| 340 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 341 |
+
<p class="special-price">
|
| 342 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 343 |
+
<span class="price-excluding-tax">
|
| 344 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 345 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 346 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
| 347 |
+
</span>
|
| 348 |
+
</span>
|
| 349 |
+
<span class="price-including-tax">
|
| 350 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 351 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 352 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
|
| 353 |
+
</span>
|
| 354 |
+
</span>
|
| 355 |
+
</p>
|
| 356 |
+
<?php else: ?>
|
| 357 |
+
<p class="special-price">
|
| 358 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
| 359 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 360 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
| 361 |
+
</span>
|
| 362 |
+
</p>
|
| 363 |
+
<?php if(Mage::getStoreConfig('yousave/general/enable') == 1) : ?>
|
| 364 |
+
<?php
|
| 365 |
+
/* Get the regular and special price */
|
| 366 |
+
$ecco_finalPrice = $_finalPrice;
|
| 367 |
+
$ecco_regularPrice = $_regularPrice;
|
| 368 |
+
|
| 369 |
+
/* Calculate the difference */
|
| 370 |
+
$ecco_price=$ecco_regularPrice - $ecco_finalPrice;
|
| 371 |
+
?>
|
| 372 |
+
<?php
|
| 373 |
+
/* Calculate percentage difference */
|
| 374 |
+
$getpercentage = number_format($_finalPrice / $_regularPrice * 100, 2);
|
| 375 |
+
$finalpercentage = 100 - $getpercentage;
|
| 376 |
+
|
| 377 |
+
$currency = $_coreHelper->currency($_price+$_weeeTaxAmount,true,false);
|
| 378 |
+
|
| 379 |
+
?>
|
| 380 |
+
<p class="you-save-price">
|
| 381 |
+
<span class="price-label"><?php echo $this->__('You Save:') ?></span>
|
| 382 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 383 |
+
<!-- print the save value and percentage -->
|
| 384 |
+
<?php echo $_coreHelper->currency($ecco_price,true,false); ?> <?php echo '(' . number_format($finalpercentage, 0) . '%)'; ?>
|
| 385 |
+
</span>
|
| 386 |
+
</p>
|
| 387 |
+
<?php endif; ?>
|
| 388 |
+
<?php endif; ?>
|
| 389 |
+
<?php endif; ?>
|
| 390 |
+
|
| 391 |
+
<?php endif; /* if ($_finalPrice == $_price): */ ?>
|
| 392 |
+
|
| 393 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
|
| 394 |
+
|
| 395 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
|
| 396 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
|
| 397 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
|
| 398 |
+
<?php endif; ?>
|
| 399 |
+
|
| 400 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
| 401 |
+
<a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
|
| 402 |
+
<?php else:?>
|
| 403 |
+
<span class="minimal-price-link">
|
| 404 |
+
<?php endif?>
|
| 405 |
+
<span class="label"><?php echo $this->__('As low as:') ?></span>
|
| 406 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 407 |
+
<?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>
|
| 408 |
+
</span>
|
| 409 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
| 410 |
+
</a>
|
| 411 |
+
<?php else:?>
|
| 412 |
+
</span>
|
| 413 |
+
<?php endif?>
|
| 414 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
|
| 415 |
+
</div>
|
| 416 |
+
|
| 417 |
+
<?php else: /* if (!$_product->isGrouped()): */ ?>
|
| 418 |
+
<?php
|
| 419 |
+
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
|
| 420 |
+
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
|
| 421 |
+
?>
|
| 422 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
|
| 423 |
+
<div class="price-box">
|
| 424 |
+
<p class="minimal-price">
|
| 425 |
+
<span class="price-label"><?php echo $this->__('Starting at:') ?></span>
|
| 426 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
| 427 |
+
<span class="price-excluding-tax">
|
| 428 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
| 429 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 430 |
+
<?php echo $_coreHelper->currency($_exclTax, true, false) ?>
|
| 431 |
+
</span>
|
| 432 |
+
</span>
|
| 433 |
+
<span class="price-including-tax">
|
| 434 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
| 435 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 436 |
+
<?php echo $_coreHelper->currency($_inclTax, true, false) ?>
|
| 437 |
+
</span>
|
| 438 |
+
</span>
|
| 439 |
+
<?php else: ?>
|
| 440 |
+
<?php
|
| 441 |
+
$_showPrice = $_inclTax;
|
| 442 |
+
if (!$_taxHelper->displayPriceIncludingTax()) {
|
| 443 |
+
$_showPrice = $_exclTax;
|
| 444 |
+
}
|
| 445 |
+
?>
|
| 446 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
| 447 |
+
<?php echo $_coreHelper->currency($_showPrice, true, false) ?>
|
| 448 |
+
</span>
|
| 449 |
+
<?php endif; ?>
|
| 450 |
+
</p>
|
| 451 |
+
</div>
|
| 452 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
|
| 453 |
+
<?php endif; /* if (!$_product->isGrouped()): */ ?>
|
app/etc/modules/ILex_YouSave.xml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<ILex_YouSave>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>local</codePool>
|
| 7 |
+
<version>0.1.0</version>
|
| 8 |
+
</ILex_YouSave>
|
| 9 |
+
</modules>
|
| 10 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>YouSave_Alternative_Pricing</name>
|
| 4 |
+
<version>1.0.1</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license>GPL</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>Calculates and displays percentage and amount customer save if special price exists for product.</summary>
|
| 10 |
+
<description>Calculates and displays percentage and amount customer save if special price exists for product.
|
| 11 |
+
Tested on multi store version.</description>
|
| 12 |
+
<notes>Work with simple products only.
|
| 13 |
+
Need improvement to work with currency displayed as 1 000 for Russian rubles or 1,000.</notes>
|
| 14 |
+
<authors><author><name>Gershon</name><user>AMarketing</user><email>gershon.webgate@gmail.com</email></author></authors>
|
| 15 |
+
<date>2014-02-26</date>
|
| 16 |
+
<time>14:22:35</time>
|
| 17 |
+
<contents><target name="magelocal"><dir name="ILex"><dir name="YouSave"><dir name="Helper"><file name="Data.php" hash="75c0cf94463d816dcb7dc71e9044d701"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6e4c5f1da113b29b989c58877d615baa"/><file name="config.xml" hash="e9348e648f112b698337b6962865daa1"/><file name="system.xml" hash="5352a2f66d174cfe658beaae378f8233"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ILex_YouSave.xml" hash="6ad940bd02b204cb03ac07f971d3d140"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="yousave.xml" hash="223fb349999a16a6ef866b5ea182b889"/></dir><dir name="template"><dir name="yousave"><dir name="product"><file name="price.phtml" hash="90cf1159b838685c5711eb4a61638ee1"/></dir></dir></dir></dir></dir></dir></target></contents>
|
| 18 |
+
<compatible/>
|
| 19 |
+
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
| 20 |
+
</package>
|
