Advertisement
Guest User

price.phtml

a guest
Mar 13th, 2015
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.72 KB | None | 0 0
  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) 2014 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. $_store = $_product->getStore();
  46. $_id = $_product->getId();
  47. $_weeeSeparator = '';
  48. $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
  49. $_minimalPriceValue = $_product->getMinimalPrice();
  50. $_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
  51. $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
  52. $_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
  53. $_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
  54. $helperSettings = Mage::helper('em0113settings');
  55. ?>
  56.  
  57. <?php if (!$_product->isGrouped()): ?>
  58. <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
  59. <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
  60. <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
  61. <?php if ($_weeeHelper->isTaxable()): ?>
  62. <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
  63. <?php endif; ?>
  64. <?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
  65. <?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
  66.  
  67. <div class="price-box">
  68. <?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
  69. <?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
  70. <?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
  71. <?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
  72. <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
  73. <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
  74. <?php if ($_finalPrice >= $_price): ?>
  75. <?php if ($_taxHelper->displayBothPrices()): ?>
  76. <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
  77. <span class="price-excluding-tax">
  78. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  79. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  80. <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
  81. </span>
  82. </span>
  83. <span class="price-including-tax">
  84. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  85. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  86. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  87. </span>
  88. </span>
  89. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
  90. <span class="price-excluding-tax">
  91. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  92. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  93. <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
  94. </span>
  95. </span>
  96. <span class="weee">(
  97. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  98. <?php echo $_weeeSeparator; ?>
  99. <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  100. <?php $_weeeSeparator = ' + '; ?>
  101. <?php endforeach; ?>
  102. )</span>
  103. <span class="price-including-tax">
  104. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  105. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  106. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  107. </span>
  108. </span>
  109. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
  110. <span class="price-excluding-tax">
  111. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  112. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  113. <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
  114. </span>
  115. </span>
  116. <span class="price-including-tax">
  117. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  118. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  119. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  120. </span>
  121. <span class="weee">(
  122. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  123. <?php echo $_weeeSeparator; ?>
  124. <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  125. <?php $_weeeSeparator = ' + '; ?>
  126. <?php endforeach; ?>
  127. )</span>
  128. </span>
  129. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
  130. <span class="price-excluding-tax">
  131. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  132. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  133. <?php echo $_coreHelper->formatPrice($_price, false) ?>
  134. </span>
  135. </span>
  136. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  137. <span class="weee">
  138. <?php echo $_weeeTaxAttribute->getName(); ?>
  139. : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  140. </span>
  141. <?php endforeach; ?>
  142. <span class="price-including-tax">
  143. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  144. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  145. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  146. </span>
  147. </span>
  148. <?php else: ?>
  149. <span class="price-excluding-tax">
  150. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  151. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  152. <?php if ($_finalPrice == $_price): ?>
  153. <?php echo $_coreHelper->formatPrice($_price, false) ?>
  154. <?php else: ?>
  155. <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
  156. <?php endif; ?>
  157. </span>
  158. </span>
  159. <span class="price-including-tax">
  160. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  161. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  162. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
  163. </span>
  164. </span>
  165. <?php endif; ?>
  166. <?php else: ?>
  167. <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1))): // including ?>
  168. <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
  169. <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  170. <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
  171. </span>
  172.  
  173. <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // show description ?>
  174. <span class="weee">(
  175. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  176. <?php echo $_weeeSeparator; ?>
  177. <?php echo $_weeeTaxAttribute->getName(); ?>
  178. : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
  179. <?php $_weeeSeparator = ' + '; ?>
  180. <?php endforeach; ?>
  181. )</span>
  182. <?php endif; ?>
  183. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
  184. <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  185. <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, true) ?>
  186. </span>
  187. <span class="weee">(
  188. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  189. <?php echo $_weeeSeparator; ?>
  190. <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  191. <?php $_weeeSeparator = ' + '; ?>
  192. <?php endforeach; ?>
  193. )</span>
  194. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
  195. <span class="regular-price"><?php echo $_coreHelper->formatPrice($_price, true) ?></span><br/>
  196. <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
  197. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  198. <span class="weee">
  199. <?php echo $_weeeTaxAttribute->getName(); ?>
  200. : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
  201. </span>
  202. <?php endforeach; ?>
  203. <span class="regular-price"
  204. id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  205. <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
  206. </span>
  207. <?php else: ?>
  208. <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  209. <?php if ($_finalPrice == $_price): ?>
  210. <?php echo $_coreHelper->formatPrice($_price, true) ?>
  211. <?php else: ?>
  212. <?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
  213. <?php endif; ?>
  214. </span>
  215. <?php endif; ?>
  216. <?php endif; ?>
  217. <?php else: /* if ($_finalPrice == $_price): */ ?>
  218. <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
  219. <?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
  220.  
  221. <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
  222. <p class="old-price">
  223. <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  224. <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  225. <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
  226. </span>
  227. </p>
  228.  
  229. <?php if ($_taxHelper->displayBothPrices()): ?>
  230. <p class="special-price">
  231. <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  232. <span class="price-excluding-tax">
  233. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  234. <span class="price"
  235. id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  236. <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
  237. </span>
  238. </span>
  239. <span class="price-including-tax">
  240. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  241. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  242. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  243. </span>
  244. </span>
  245. </p>
  246. <?php else: ?>
  247. <p class="special-price">
  248. <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  249. <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  250. <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
  251. </span>
  252. </p>
  253. <?php endif; ?>
  254.  
  255. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
  256. <p class="old-price">
  257. <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  258. <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  259. <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
  260. </span>
  261. </p>
  262.  
  263. <p class="special-price">
  264. <?php if ($_taxHelper->displayBothPrices()): ?>
  265. <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  266. <span class="price-excluding-tax">
  267. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  268. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  269. <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
  270. </span>
  271. </span>
  272. <span class="weee">(
  273. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  274. <?php echo $_weeeSeparator; ?>
  275. <?php echo $_weeeTaxAttribute->getName(); ?>
  276. : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  277. <?php $_weeeSeparator = ' + '; ?>
  278. <?php endforeach; ?>
  279. )</span>
  280. <span class="price-including-tax">
  281. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  282. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  283. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  284. </span>
  285. </span>
  286. <?php else: ?>
  287. <p class="special-price">
  288. <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
  289. <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>>
  290. <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
  291. </span>
  292. </p>
  293. <span class="weee">(
  294. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  295. <?php echo $_weeeSeparator; ?>
  296. <?php echo $_weeeTaxAttribute->getName(); ?>
  297. : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  298. <?php $_weeeSeparator = ' + '; ?>
  299. <?php endforeach; ?>
  300. )</span>
  301. <?php endif; ?>
  302. </p>
  303. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
  304. <p class="old-price">
  305. <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  306. <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  307. <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
  308. </span>
  309. </p>
  310.  
  311. <p class="special-price">
  312. <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
  313. <span class="price-excluding-tax">
  314. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  315. <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  316. <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
  317. </span>
  318. </span>
  319. <span class="weee">(
  320. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  321. <?php echo $_weeeSeparator; ?>
  322. <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
  323. <?php $_weeeSeparator = ' + '; ?>
  324. <?php endforeach; ?>
  325. )</span>
  326. <span class="price-including-tax">
  327. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  328. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  329. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  330. </span>
  331. </span>
  332. </p>
  333. <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
  334. <p class="old-price">
  335. <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  336. <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?><?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>">
  337. <?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
  338. </span>
  339. </p>
  340.  
  341. <p class="special-price">
  342. <span class="price-label"><?php echo $_specialPriceStoreLabel ?></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() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  346. <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
  347. </span>
  348. </span>
  349. <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
  350. <span class="weee">
  351. <?php echo $_weeeTaxAttribute->getName(); ?>
  352. : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
  353. </span>
  354. <?php endforeach; ?>
  355. <span class="price-including-tax">
  356. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  357. <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  358. <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
  359. </span>
  360. </span>
  361. </p>
  362. <?php else: // excl. ?>
  363. <p class="old-price">
  364. <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
  365. <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="price"<?php endif;?>>
  366. <?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
  367. </span>
  368. </p>
  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() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  377. <?php echo $_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() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  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() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  392. <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
  393. </span>
  394. </p>
  395. <?php endif; ?>
  396. <?php endif; ?>
  397. <?php // Discount percents output start ?>
  398. <?php if($_finalPrice < $_price): ?>
  399. <?php $_pricedifference = $_price - $_finalPrice; ?>
  400. <?php $_savePercent = 100 - round(($_finalPrice / $_price)*100); ?>
  401. <p class="special-price yousave">
  402. <span class="label"><?php echo $this->__('You Save:') ?>
  403.  
  404. <?php echo $_pricedifference; ?> (<?php echo $_savePercent; ?>%)
  405. </span>
  406. </p>
  407. <?php endif; ?>
  408. <?php // Discount percent output end ?>
  409.  
  410. <?php endif; /* if ($_finalPrice == $_price): */ ?>
  411.  
  412. <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_convertedFinalPrice): ?>
  413.  
  414. <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
  415. <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
  416. <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
  417. <?php endif; ?>
  418.  
  419. <?php if ($this->getUseLinkForAsLowAs()): ?>
  420. <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
  421. <?php else: ?>
  422. <span class="minimal-price-link">
  423. <?php endif ?>
  424. <span class="label"><?php echo $this->__('As low as:') ?></span>
  425. <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  426. <?php echo $_coreHelper->formatPrice($_minimalPriceDisplayValue, false) ?>
  427. </span>
  428. <?php if ($this->getUseLinkForAsLowAs()): ?>
  429. </a>
  430. <?php else: ?>
  431. </span>
  432. <?php endif ?>
  433. <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
  434. </div>
  435.  
  436. <?php else: /* if (!$_product->isGrouped()): */ ?>
  437. <?php
  438. $showMinPrice = $this->getDisplayMinimalPrice();
  439. if ($showMinPrice && $_minimalPriceValue) {
  440. $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
  441. $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
  442. $price = $showMinPrice ? $_minimalPriceValue : 0;
  443. } else {
  444. $price = $_convertedFinalPrice;
  445. $_exclTax = $_taxHelper->getPrice($_product, $price);
  446. $_inclTax = $_taxHelper->getPrice($_product, $price, true);
  447. }
  448. ?>
  449. <?php if ($price): ?>
  450. <div class="price-box">
  451. <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
  452. <?php if ($showMinPrice): ?>
  453. <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
  454. <?php endif ?>
  455. <?php if ($_taxHelper->displayBothPrices()): ?>
  456. <span class="price-excluding-tax">
  457. <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
  458. <span class="price"
  459. id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  460. <?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
  461. </span>
  462. </span>
  463. <span class="price-including-tax">
  464. <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
  465. <span class="price"
  466. id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="highPrice"<?php endif;?>>
  467. <?php echo $_coreHelper->formatPrice($_inclTax, false) ?>
  468. </span>
  469. </span>
  470. <?php else: ?>
  471. <?php
  472. $_showPrice = $_inclTax;
  473. if (!$_taxHelper->displayPriceIncludingTax()) {
  474. $_showPrice = $_exclTax;
  475. }
  476. ?>
  477. <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
  478. <?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
  479. </span>
  480. <?php endif; ?>
  481. </p>
  482. </div>
  483. <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
  484. <?php endif; /* if (!$_product->isGrouped()): */ ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement