Advertisement
andhiirawan

Magento Stackexchange Question 74109 : price.phtml

Nov 24th, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 28.34 KB | None | 0 0
  1. <!-- for http://magento.stackexchange.com questions : Configurable products price text not showing : http://magento.stackexchange.com/questions/74109/configurable-products-price-text-not-showing -->
  2. <!-- Path : app\design\frontend\rwd\default\template\catalog\product\price.phtml -->
  3. <?php
  4. /**
  5.  * Magento
  6.  *
  7.  * NOTICE OF LICENSE
  8.  *
  9.  * This source file is subject to the Academic Free License (AFL 3.0)
  10.  * that is bundled with this package in the file LICENSE_AFL.txt.
  11.  * It is also available through the world-wide-web at this URL:
  12.  * http://opensource.org/licenses/afl-3.0.php
  13.  * If you did not receive a copy of the license and are unable to
  14.  * obtain it through the world-wide-web, please send an email
  15.  * to license@magento.com so we can send you a copy immediately.
  16.  *
  17.  * DISCLAIMER
  18.  *
  19.  * Do not edit or add to this file if you wish to upgrade Magento to newer
  20.  * versions in the future. If you wish to customize Magento for your
  21.  * needs please refer to http://www.magento.com for more information.
  22.  *
  23.  * @category    design
  24.  * @package     base_default
  25.  * @copyright   Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
  26.  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  27.  */
  28. ?>
  29.  
  30. <?php
  31. /**
  32.  * Template for displaying product price in different places (products grid, product view page etc)
  33.  *
  34.  * @see Mage_Catalog_Block_Product_Abstract
  35.  */
  36. ?>
  37. <?php
  38. $_coreHelper = $this->helper('core');
  39. $_weeeHelper = $this->helper('weee');
  40. $_taxHelper = $this->helper('tax');
  41. /* @var $_coreHelper Mage_Core_Helper_Data */
  42. /* @var $_weeeHelper Mage_Weee_Helper_Data */
  43. /* @var $_taxHelper Mage_Tax_Helper_Data */
  44.  
  45. $_product = $this->getProduct();
  46. $_storeId = $_product->getStoreId();
  47. $_store = $_product->getStore();
  48. $_id = $_product->getId();
  49. $_weeeSeparator = '';
  50. $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
  51. $_minimalPriceValue = $_product->getMinimalPrice();
  52. $_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
  53. $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
  54. $_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
  55. $_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
  56. ?>
  57.  
  58. <?php if (!$_product->isGrouped()): ?>
  59.     <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
  60.     <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
  61.     <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
  62.     <?php if ($_weeeHelper->isTaxable()): ?>
  63.         <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
  64.     <?php endif; ?>
  65.     <?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
  66.     <?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
  67.  
  68.     <div class="price-box">
  69.     <?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
  70.     <?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
  71.     <?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
  72.     <?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
  73.     <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
  74.     <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
  75.     <?php if ($_finalPrice >= $_price): ?>
  76.         <?php if ($_taxHelper->displayBothPrices()): ?>
  77.             <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
  78.                 <span class="price-excluding-tax">
  79.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  80.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  81.                         <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
  82.                     </span>
  83.                 </span>
  84.                 <span class="price-including-tax">
  85.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  86.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  87.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  88.                     </span>
  89.                 </span>
  90.             <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
  91.                 <span class="price-excluding-tax">
  92.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  93.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  94.                         <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
  95.                     </span>
  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 class="price-including-tax">
  105.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  106.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  107.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  108.                     </span>
  109.                 </span>
  110.             <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
  111.                 <span class="price-excluding-tax">
  112.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  113.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  114.                         <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
  115.                     </span>
  116.                 </span>
  117.                 <span class="price-including-tax">
  118.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  119.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  120.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  121.                     </span>
  122.                     <span class="weee">(
  123.                         <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  124.                             <?php echo $_weeeSeparator; ?>
  125.                             <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  126.                             <?php $_weeeSeparator = ' + '; ?>
  127.                         <?php endforeach; ?>
  128.                         )</span>
  129.                 </span>
  130.             <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
  131.                 <span class="price-excluding-tax">
  132.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  133.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  134.                         <?php echo $_coreHelper->formatPrice($_price, false) ?>
  135.                     </span>
  136.                 </span>
  137.                 <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  138.                     <span class="weee">
  139.                         <?php echo $_weeeTaxAttribute->getName(); ?>
  140.                         : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  141.                     </span>
  142.                 <?php endforeach; ?>
  143.                 <span class="price-including-tax">
  144.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  145.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  146.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  147.                     </span>
  148.                 </span>
  149.             <?php else: ?>
  150.                 <span class="price-excluding-tax">
  151.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  152.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  153.                         <?php if ($_finalPrice == $_price): ?>
  154.                             <?php echo $_coreHelper->formatPrice($_price, false) ?>
  155.                         <?php else: ?>
  156.                             <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
  157.                         <?php endif; ?>
  158.                     </span>
  159.                 </span>
  160.                 <span class="price-including-tax">
  161.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  162.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  163.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
  164.                     </span>
  165.                 </span>
  166.             <?php endif; ?>
  167.         <?php else: ?>
  168.             <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1))): // including ?>
  169.                 <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
  170.                 <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  171.                      <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
  172.                 </span>
  173.  
  174.                 <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // show description ?>
  175.                     <span class="weee">(
  176.                         <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  177.                             <?php echo $_weeeSeparator; ?>
  178.                             <?php echo $_weeeTaxAttribute->getName(); ?>
  179.                             : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
  180.                             <?php $_weeeSeparator = ' + '; ?>
  181.                         <?php endforeach; ?>
  182.                         )</span>
  183.                 <?php endif; ?>
  184.             <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
  185.                 <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  186.                     <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, true) ?>
  187.                 </span>
  188.                 <span class="weee">(
  189.                     <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  190.                         <?php echo $_weeeSeparator; ?>
  191.                         <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  192.                         <?php $_weeeSeparator = ' + '; ?>
  193.                     <?php endforeach; ?>
  194.                     )</span>
  195.             <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
  196.                 <span class="regular-price"><?php echo $_coreHelper->formatPrice($_price, true) ?></span><br/>
  197.                 <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
  198.                 <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  199.                     <span class="weee">
  200.                        <?php echo $_weeeTaxAttribute->getName(); ?>
  201.                         : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
  202.                     </span>
  203.                 <?php endforeach; ?>
  204.                 <span class="regular-price"
  205.                       id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  206.                     <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
  207.                 </span>
  208.             <?php else: ?>
  209.                 <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  210.                     <?php if ($_finalPrice == $_price): ?>
  211.                         <?php echo $_coreHelper->formatPrice($_price, true) ?>
  212.                     <?php else: ?>
  213.                         <?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
  214.                     <?php endif; ?>
  215.                 </span>
  216.             <?php endif; ?>
  217.         <?php endif; ?>
  218.     <?php else: /* if ($_finalPrice == $_price): */ ?>
  219.         <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
  220.         <?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
  221.  
  222.         <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
  223.             <p class="old-price">
  224.                 <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  225.                 <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">                                
  226.                     <?php echo "RRP:".$_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
  227.                 </span>
  228.             </p>
  229.  
  230.             <?php if ($_taxHelper->displayBothPrices()): ?>
  231.                 <p class="special-price">
  232.                     <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  233.                     <span class="price-excluding-tax">
  234.                         <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  235.                         <span class="price"
  236.                               id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  237.                             <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
  238.                         </span>
  239.                     </span>
  240.                 <span class="price-including-tax">
  241.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  242.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  243.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  244.                     </span>
  245.                 </span>
  246.                 </p>
  247.             <?php else: ?>
  248.                 <p class="special-price">
  249.                     <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  250.                 <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  251.                     <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
  252.                 </span>
  253.                 </p>
  254.             <?php endif; ?>
  255.  
  256.         <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
  257.             <p class="old-price">
  258.                 <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  259.                 <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  260.                     <?php echo "RRP:".$_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
  261.                 </span>
  262.             </p>
  263.  
  264.             <p class="special-price">
  265.             <?php if ($_taxHelper->displayBothPrices()): ?>
  266.                 <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  267.                 <span class="price-excluding-tax">
  268.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  269.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  270.                       <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
  271.                     </span>
  272.                 </span>
  273.                 <span class="weee">(
  274.                     <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  275.                         <?php echo $_weeeSeparator; ?>
  276.                         <?php echo $_weeeTaxAttribute->getName(); ?>
  277.                         : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  278.                         <?php $_weeeSeparator = ' + '; ?>
  279.                     <?php endforeach; ?>
  280.                     )</span>
  281.                 <span class="price-including-tax">
  282.                 <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  283.                 <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  284.                     <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  285.                 </span>
  286.                 </span>
  287.             <?php else: ?>
  288.                 <p class="special-price">
  289.                     <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
  290.                 <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  291.                     <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
  292.                 </span>
  293.                 </p>
  294.                 <span class="weee">(
  295.                     <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  296.                         <?php echo $_weeeSeparator; ?>
  297.                         <?php echo $_weeeTaxAttribute->getName(); ?>
  298.                         : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  299.                         <?php $_weeeSeparator = ' + '; ?>
  300.                     <?php endforeach; ?>
  301.                     )</span>
  302.             <?php endif; ?>
  303.             </p>
  304.         <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
  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 "RRP:".$_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
  309.                 </span>
  310.             </p>
  311.  
  312.             <p class="special-price">
  313.                 <span class="price-label"><?php echo $_specialPriceStoreLabel ?></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 "Price ".$_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
  318.                     </span>
  319.                 </span>
  320.             <span class="weee">(
  321.                 <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  322.                     <?php echo $_weeeSeparator; ?>
  323.                     <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  324.                     <?php $_weeeSeparator = ' + '; ?>
  325.                 <?php endforeach; ?>
  326.                 )</span>
  327.             <span class="price-including-tax">
  328.                 <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  329.                 <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  330.                     <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  331.                 </span>
  332.             </span>
  333.             </p>
  334.         <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
  335.             <p class="old-price">
  336.                 <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  337.                 <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  338.                     <?php echo "RRP:".$_coreHelper->formatPrice($_regularPrice, false) ?>
  339.                 </span>
  340.             </p>
  341.  
  342.             <p class="special-price">
  343.                 <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  344.                 <span class="price-excluding-tax">
  345.                     <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  346.                     <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  347.                         <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice, false) ?>
  348.                     </span>
  349.                 </span>
  350.                 <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  351.                     <span class="weee">
  352.                         <?php echo $_weeeTaxAttribute->getName(); ?>
  353.                         : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  354.                     </span>
  355.                 <?php endforeach; ?>
  356.                 <span class="price-including-tax">
  357.                     <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  358.                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  359.                         <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  360.                     </span>
  361.                 </span>
  362.             </p>
  363.         <?php else: // excl. ?>
  364.             <div class="old-price c4">
  365.                 <div class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  366.                    <?php echo "RRP:".$_coreHelper->formatPrice($_regularPrice, false) ?>
  367.                 </div>
  368.             </div>
  369.  
  370.             <?php if ($_taxHelper->displayBothPrices()): ?>
  371.                 <p class="special-price">
  372.                     <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  373.                     <span class="price-excluding-tax">
  374.                         <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  375.                         <span class="price"
  376.                               id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  377.                             <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice, false) ?>
  378.                         </span>
  379.                     </span>
  380.                     <span class="price-including-tax">
  381.                         <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  382.                         <span class="price"
  383.                               id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  384.                             <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
  385.                         </span>
  386.                     </span>
  387.                 </p>
  388.             <?php else: ?>
  389.                 <p class="special-price">
  390.                     <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  391.                 <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  392.                     <?php echo "Price ".$_coreHelper->formatPrice($_finalPrice, false) ?>
  393.                 </span>
  394.                 </p>
  395.             <?php endif; ?>
  396.         <?php endif; ?>
  397.  
  398.     <?php endif; /* if ($_finalPrice == $_price): */ ?>
  399.  
  400.     <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_convertedFinalPrice): ?>
  401.  
  402.         <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
  403.         <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
  404.             <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
  405.         <?php endif; ?>
  406.  
  407.         <?php if ($this->getUseLinkForAsLowAs()): ?>
  408.             <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
  409.         <?php else: ?>
  410.             <span class="minimal-price-link">
  411.         <?php endif ?>
  412.         <span class="label"><?php echo $this->__('As low as:') ?></span>
  413.         <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  414.                 <?php echo $_coreHelper->formatPrice($_minimalPriceDisplayValue, false) ?>
  415.             </span>
  416.         <?php if ($this->getUseLinkForAsLowAs()): ?>
  417.             </a>
  418.         <?php else: ?>
  419.             </span>
  420.         <?php endif ?>
  421.     <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
  422.     </div>
  423.  
  424. <?php else: /* if (!$_product->isGrouped()): */ ?>
  425.     <?php
  426.     $showMinPrice = $this->getDisplayMinimalPrice();
  427.     if ($showMinPrice && $_minimalPriceValue) {
  428.         $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
  429.         $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
  430.         $price = $showMinPrice ? $_minimalPriceValue : 0;
  431.     } else {
  432.         $price = $_convertedFinalPrice;
  433.         $_exclTax = $_taxHelper->getPrice($_product, $price);
  434.         $_inclTax = $_taxHelper->getPrice($_product, $price, true);
  435.     }
  436.     ?>
  437.     <?php if ($price): ?>
  438.         <div class="price-box">
  439.             <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
  440.                 <?php if ($showMinPrice): ?>
  441.                     <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
  442.                 <?php endif ?>
  443.                 <?php if ($_taxHelper->displayBothPrices()): ?>
  444.                     <span class="price-excluding-tax">
  445.                         <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  446.                         <span class="price"
  447.                               id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  448.                             <?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
  449.                         </span>
  450.                     </span>
  451.                     <span class="price-including-tax">
  452.                         <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  453.                         <span class="price"
  454.                               id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  455.                             <?php echo $_coreHelper->formatPrice($_inclTax, false) ?>
  456.                         </span>
  457.                     </span>
  458.                 <?php else: ?>
  459.                     <?php
  460.                     $_showPrice = $_inclTax;
  461.                     if (!$_taxHelper->displayPriceIncludingTax()) {
  462.                         $_showPrice = $_exclTax;
  463.                     }
  464.                     ?>
  465.                     <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
  466.                     <?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
  467.                 </span>
  468.                 <?php endif; ?>
  469.             </p>
  470.                         <div class="clear"></div>
  471.         </div>
  472.     <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
  473. <?php endif; /* if (!$_product->isGrouped()): */ ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement