Tienda & UK VAT Relief
- Category: Misc
- Hits: 8339
I have been busy working on a new site hypodiabetic.com that specialises in selling Diabetic products. I use Tienda as the shopping cart for this site. I love Tienda, built from the ground up to work with Joomla while still in the development stages I can see it having a great future.
One unique feature of my site is that the UK government provides VAT Relief for Disabled People, but how do I get Tienda to understand this and get customers to complete the required forms?
Below are my notes on how I got this working in Tienda based on a great suggestion from IAin Mace on the Tienda support forum...
- This is all based on Tienda understanding shipping zones and that different zones that you ship to could incur different tax charges. The logic to this is to have two zones, one that charges VAT and another that does not. While this has been configured to work only with the UK, I'm sure it can be improved to cover multiple countries.
- We need to clear all zones under your country, go to Countries and rename United Kingdom to United Kingdom-old and disable it, then create a new United Kingdom
- Create two new Zones under your new United Kingdom called "Standard VAT (20%)" and "VAT Relief (0%)"
- Go to Geo Zones and create two Tax Geo Zones...
- UK Tax Zone: assign Zone "Standard VAT (20%)" and assign to all your payment methods
- UK Tax Zone - Exempt: assign Zone "VAT Relief (0%)" and assign to all your payment methods
- I have two Tax Classes, Set Tax Rates for both of your Tax Geo Zones under each...
- Taxable Goods:
- "UK Tax Zone" - 20 (This is for clients who do not get Tax relief)
- "UK Tax Zone - Exempt" - 0 (This is for clients who do get Tax relief)
- Non-Taxable Goods:
- Both Tax Geo Zones will be 0 as these are non-taxable goods and will never have tax charged
- Taxable Goods:
- You want to rename the Zones field in shipping to reflect the new use of this field...
- Enable "Load Custom Language File?" in General Configuration > Advanced Settings
- Create /language/en-GB/en-GB.com_tienda_custom.ini this file will override default text in Tienda
- Add the following text to rename zones and I also added some T&C text...
- ZONE=Vat Relief*
- TERMS & CONDITIONS=<b>*UK VAT Relief for Disabled People</b> <br>If you are Diabetic or purchasing on behalf of someone who is you are entitled to VAT Relief (0% VAT) on our products. Please create an account with us and complete our <a href="/form/6/1.html?usekey=userid">VAT Exempt Declaration Form</a>
- Test! You will now notice that on Checkout you can select "Vat Relief"
- Note: Remember to test on a product that requires shipping, as we are using Shipping Zones for this hack if the product does not require shipping Tienda will ignore it.
Cleaning up
When the invoice is sent out to the customer it will have your Vat Relief value inserted with the shipping address, to remove this...
- Follow the support article here and follow the steps under "Changing the email body/content"
- Now edit email.php and edit \ move shipping_zone_name as needed
- Here is my email.php as an example...
{codecitation class="brush: text; collapse: true;"}
:
,
get('shop_city', ''); ?>, get('shop_zip', ''); ?>, shop_country_name; ?>
:
:
:
</div>
<div>
<h3><?php echo JText::_("Order Information"); ?></h3>
<strong><?php echo JText::_("Order ID"); ?></strong>: <br/>
<strong><?php echo JText::_("Date"); ?></strong>: <br/>
<strong><?php echo JText::_("Vat Relief"); ?></strong>: <br/>
<strong><?php echo JText::_("Status"); ?></strong>: <br/>
</div>
<div>
<h3><?php echo JText::_("Payment Information"); ?></h3>
<strong><?php echo JText::_("Amount"); ?></strong>: <br/>
<strong><?php echo JText::_("Billing Address"); ?></strong>:
<?php
echo $row->billing_first_name." ".$row->billing_last_name."<br/>";
echo $row->billing_address_1.", ";
echo $row->billing_address_2 ? $row->billing_address_2.", " : "";
echo $row->billing_city.", ";
echo $row->billing_postal_code." ";
echo $row->billing_country_name;
?>
<br/>
<strong><?php echo JText::_("Associated Payment Records"); ?></strong>:
<div>
<?php
if (!empty($row->orderpayments))
{
foreach ($row->orderpayments as $orderpayment)
{
echo JText::_( "Payment ID" ).": ".$orderpayment->orderpayment_id."<br/>";
}
}
?>
</div>
<br/>
</div>
<div>
<h3><?php echo JText::_("Shipping Information"); ?></h3>
<strong><?php echo JText::_("Shipping Method"); ?></strong>: <br/>
<strong><?php echo JText::_("Shipping Address"); ?></strong>:
<?php
echo $row->shipping_first_name." ".$row->shipping_last_name."<br/>";
echo $row->shipping_address_1.", ";
echo $row->shipping_address_2 ? $row->shipping_address_2.", " : "";
echo $row->shipping_city.", ";
echo $row->shipping_postal_code." ";
echo $row->shipping_country_name;
?>
<br/>
</div>
<div>
<h3><?php echo JText::_("Items in Order"); ?></h3>
<table style="clear: both;">
<thead>
<tr>
<th style="text-align: left;"><?php echo JText::_("Item"); ?></th>
<th style="width: 150px; text-align: center;"><?php echo JText::_("Quantity"); ?></th>
<th style="width: 150px; text-align: right;"><?php echo JText::_("Amount"); ?></th>
</tr>
</thead>
<tbody>
<b><?php echo JText::_( "SKU" ); ?>:</b>
<b><?php echo JText::_( "Price" ); ?>:</b>
</div>
</td>
<td style="text-align: center;">
</td>
<td style="text-align: right;">
<tr>
<td colspan="10" align="center">
</tbody>
<tfoot>
<tr>
<th colspan="2" style="text-align: right;">
<?php echo JText::_( "Subtotal" ); ?>
</th>
<th style="text-align: right;">
<tr>
<th colspan="2" style="text-align: right;">
</th>
<th style="text-align: right;">
<tr>
<th colspan="2" style="text-align: right;">
<?php
if (!empty($this->show_tax)) { echo JText::_("Product Tax Included"); }
else { echo JText::_("Product Tax"); }
?>
</th>
<th style="text-align: right;">
</th>
</tr>
}
?>
<tr>
<th colspan="2" style="text-align: right;">
<?php echo JText::_( "Shipping" ); ?>
</th>
<th style="text-align: right;">
<tr>
<th colspan="2" style="text-align: right;"><?php echo JText::_("Shipping Tax"); ?>
</th>
<th style="text-align: right;">
<tr>
<th colspan="2" style="font-size: 120%; text-align: right;">
<?php echo JText::_( "Total" ); ?>
</th>
<th style="font-size: 120%; text-align: right;">
<div>
<h3><?php echo JText::_("Note"); ?></h3>
<span><?php echo @$row->customer_note; ?></span>
</div>
<?php endif; ?>
<?php
// fire plugin event here to enable extending the form
JDispatcher::getInstance()->trigger('onAfterDisplayOrderPrint', array( $row ) );
?>
</div>
{/codecitation}
VAT Exempt Declaration Form
Finally, for the VAT Exempt Declaration Form that must be completed by all customers who wish to be VAT Exempt I use fabrik and created the required forum, also I created a fabrik login form to replace the default Joomla one that presents the form on registration.