Changing Discount Price Break Price
Posted: Thu Mar 28, 2019 8:31 pm
Hi Everyone,
I have a customized default theme for my website and I was wondering if anybody had any ideas how I could change the discount price to show as the price excluding VAT. I have used an XML file to make some changes so far and at present it is showing the price including VAT which is how the website is setup. As we are a mainly business 2 business supplier, we want to show the price ex. VAT as the "headline" price rather than including VAT. You can take a look at a discount break page at https://www.hutchingsdirect.co.uk/black ... 200-ew-bag , so what I am trying to achieve is that the blue box should read "2+ Price Only £9.61 Each - Ex. VAT" rather than "2+ Price Only £11.53 Each - Inc. VAT". Changing the text either side of the price is easy but I am struggling with changing the price from Including VAT to Excluding VAT. Currently the XML file in vqmod I use for this is:
I have a customized default theme for my website and I was wondering if anybody had any ideas how I could change the discount price to show as the price excluding VAT. I have used an XML file to make some changes so far and at present it is showing the price including VAT which is how the website is setup. As we are a mainly business 2 business supplier, we want to show the price ex. VAT as the "headline" price rather than including VAT. You can take a look at a discount break page at https://www.hutchingsdirect.co.uk/black ... 200-ew-bag , so what I am trying to achieve is that the blue box should read "2+ Price Only £9.61 Each - Ex. VAT" rather than "2+ Price Only £11.53 Each - Inc. VAT". Changing the text either side of the price is easy but I am struggling with changing the price from Including VAT to Excluding VAT. Currently the XML file in vqmod I use for this is:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id><![CDATA[Swap Ex Tax And Inc Tax In Product 2.3.0.2]]></id>
<version><![CDATA[1.0]]></version>
<vqmver><![CDATA[2.6.1]]></vqmver>
<author><![CDATA[Hutchings Direct]]></author>
<file name="catalog/view/theme/default/template/product/product.tpl">
<operation error="skip">
<search position="replace" offset="27"><![CDATA[
<?php if ($price) { ?>
]]></search>
<add position="replace"><![CDATA[
<?php if ($price) { ?>
<ul class="list-unstyled">
<?php if ($tax) { ?>
<li><h2><?php echo $tax; ?><span style="font-weight: 500; font-size: 14px;"> <?php echo $text_tax; ?></span></h2></li>
<?php } ?>
<?php if (!$special) { ?>
<li>
<h5><?php echo $price; ?> Including VAT</h5>
</li>
<?php } else { ?>
<li><h2 style="color:rgb(147,0,0); font-weight: 500; font-size: 14px !important;">Was <?php echo $price; ?><span style="text-decoration: none; font-weight: 500; font-size: 14px;"> Including VAT</span></h2></li>
<li>
<li><h2 style="font-family: 'Open Sans', sans-serif !important; background-color: rgb(35, 161, 209) !important; font-size: 19px !important; height: 42px !important; padding-top: 10px !important; padding-bottom: 10px !important; padding-left: 10px !important; padding-right: 10px !important; color: rgb(255, 255, 255) !important;">Now <?php echo $special; ?> Including VAT</h2></li>
</li>
<?php } ?>
<?php if ($points) { ?>
<li><?php echo $text_points; ?> <?php echo $points; ?></li>
<?php } ?>
<?php if ($discounts) { ?>
<li>
<hr>
</li>
<?php foreach ($discounts as $discount) { ?>
<li><h5 style="background-color: rgb(35,161,209) !important; color: rgb(255, 255, 255) !important; padding-left: 10px !important; padding-right: 10px !important; padding-top: 10px !important; padding-bottom: 10px !important; font-weight: 700 !important; font-size: 17px !important;"><?php echo $discount['quantity']; ?><?php echo $text_discount; ?> <?php echo $discount['price']; ?><span style="color: rgb(255,255,255) !important;"> Each - Inc. VAT</h5></span></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
]]></add>
</operation>
</file>
</modification>