Jump to content

Selling Zero Rated & Normal Rated VAT Items in Prestashop - UK VAT


Eddyb

Recommended Posts

Hi There,

 

We sell two different categories of products. The first are adult items which attract VAT at 20%. The second are Childrens items which are zero rated for VAT purposes.

 

I have these set up using the price rules on each individual item.

 

The problem comes when we then take into account the shipping.

 

When there is any standard rated item in the cart I need the shipping prices applied to include VAT. I.e. If there is a zero rated and standard rated item in the cart, or when there is only standard rated items in the cart it must show/apply shipping with taxes included.

 

However when there is only zero rated goods in the cart i need it to show/apply shipping with taxes excluded?

 

Is there any way that people can think of to solve this problem?

 

Thanks,

Eddy

Link to comment
Share on other sites

I have figured out how to do this using weights.

 

All the childrens products i have set at weights of 0.001kg and i have a set of postage options that range from 0 - 0.1kg without tax included. I have these set to disabled when out of range.

 

All the adult taxable products have weights of above 0.11kg so when one is added to the cart it tips over into a second set of postage options that have tax included that go from 0.11kg upwards. These are also set to disabled when out of range.

 

Hopefully the above helps someone.

Link to comment
Share on other sites

  • 7 years later...

I am going to bump this even though it is 7 years old as I too have this problem.

The original workaround is ok however I already calculate my shipping based on weight and also I have a store with 3 tax bands, 0%, 5% and 20%.

Does anyone have any ideas of how to allocate the correct VAT on a carrier.

I have been toying with the idea of not allowing a product with 20% VAT use the 0% VAT carrier however this leaves a basket full of 0% products with a long list of carriers and the ability to choose the 20% VAT carrier in error as if I stop 0% Vat items using the 20% carrier if there is a mix of products no carrier will be available. I hope that makes sense.

Thanks

Shaun

Link to comment
Share on other sites

  • 3 years later...

Another bump 🙂

I have been merrily charging VAT on all shipping until a customer pointed out that the VAT regulations to me!

The majority of my goods are zero rated, so I looked into a solution for this. I couldn't find any of-the-shelf solution.

My solution was to duplicate my existing shipping modules and set the tax rates to Standard/Zero in the backoffice.

I have built my shipping modules myself based on the provided templates from PrestaShop. The module includes a section where the order's weight and value is calculated. I simply added a variable to record the highest tax rate in the order.

At the end of the calculation, the module can be enabled or disabled depending on the requirements.

It gets a little confusing since the descriptions in the backoffice are the same as the customer sees, so i don't want to call one "Royal Mail tracked 48 - no vat" and one "Royal Mail tracked 48 - with VAT"!!

Here's the shipping calculation part of my module:

	public function getOrderShippingCost($params, $shipping_cost)
	{
		$address = new Address($params->id_address_delivery);
		$postcode = $address->postcode;
		$country = Db::getInstance()->getRow('SELECT `iso_code` FROM `'._DB_PREFIX_.'country` WHERE `id_country` = '.(int)($address->id_country));
		$countryISO = $country['iso_code'];
		if ($countryISO == NULL)
			{
				$countryISO = 'GB'; //if country code is blank, assume UK mainland shipping.
				$postcode = 'insert local postcode here';
			}
		if (($postcode == '') or ($postcode==NULL))
			{
				$postcode = 'insert local postcode here';
			}
			
		// before we do any calculations, we need to check the country and postcode
		if ($countryISO <> 'GB') return false;
		$postcode=str_replace(' ','',$postcode);
		$postcode=strtoupper($postcode);
		$postcode=substr($postcode,0,strlen($postcode)-3);
		if (preg_match(Configuration::get('rm48_novat_excluded_postcodes'),$postcode)) return false;
		
		// if we're here then we are good to go!
		$ordervalue = 0;
		$orderweight = 0;
		$tax=0;
		$products = $params->getProducts();
		foreach($products as $product_info)
			{
                if ($product_info['rate']>$tax)
                	{
						$tax=$product_info['rate']; // set $tax to highest rate
                    }
				$orderweight=($product_info['weight']*$product_info['cart_quantity'])+$orderweight;
				$ordervalue=$ordervalue+($product_info['price']*$product_info['cart_quantity']);
			}
		//for the zero rated module use this line
	    if ($tax>0) return false;

		//for the standard rated module use this line
	    //if ($tax==0) return false;

		//my requirements do not include a low rate of tax, so zero and standard are fine for me!

		if ($orderweight>Configuration::get('rm48_novat_MAX_WEIGHT')) return false;
		$shipping_cost=Configuration::get('rm48_novat_rate');
		$shipping_cost=$shipping_cost*(1+(Configuration::get('rm48_novat_FUEL_SURCHARGE'))/100);
		return $shipping_cost;
	}

You'll see that the module uses

return false;

in order to disable itself.

 

Hope this helps someone 🙂

 

dan

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...