Display Zero VAT

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 2 months ago #171969

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3
-- PHP version -- : 5.328
-- Browser(s) name and version -- : FF 32.0.1

I have a shop up and running which was originally for UK only. However the client is now intending to supply the Chanell Islands & Eire. They do not pay VAT and this has been set up as 0%.

The issue I need to overcome is that with 0% the VAT/TAX line disappears from the cart. On the first attachement it shows a price with VAT the second has no VAT and I would like to show it as VAT: 0.00. Currently that line is missing if zero rate VAT is applied

Dave B)

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #171976

Hi,

You have to edit the view "checkout / cart" and add:

else{
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format(0,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
}
after:
			} else {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($taxes,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
			}
		}

Last edit: 10 years 1 month ago by Xavier. Reason: Missing php tags in the given code

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 2 months ago #172218

Xavier

thanks for the code and apologies for the late reply

Dave B)

Last edit: 10 years 2 months ago by davec.

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 2 months ago #172224

Sorry I cannot seem to get this to work. I add the code as suggested but nothing changes or I get a white checkout page with just the billing info on!

Dave B)

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #172233

Hi,

Thanks to set the error reporting level to "maximum" in the Joomla settings.
You potentially have a PHP error in the added code.

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 2 months ago #172339

I have tried this an no error report is displayed. This is the altered code below

<?php
				}
			} else {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($taxes,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
			}
		}
      else{
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format(0,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
  } 

		 if(!empty($this->payment) && $this->payment->payment_price != 0) {
?>
It might be an error on my part.


Dave

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #172344

Hi,

So please check your PHP error log.
If you have a full blank page, it is a PHP fatal error.
If your page is "empty" but not full blank, it could be an "return" or an "exit/die" problem.

Like that with your code, I can't tell you what's wrong ; I take a look and does not see like that, a mistake.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 2 months ago #172505

I have the following

92.4.83.211 - - [22/Sep/2014:10:44:18 +0000] "GET /books-magazines/checkout HTTP/1.1" 200 4959 " www.site.co.uk/ " "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
92.4.83.211 - - [22/Sep/2014:10:44:18 +0000] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
92.4.83.211 - - [22/Sep/2014:10:44:19 +0000] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
92.4.83.211 - - [22/Sep/2014:10:44:16 +0000] "GET /administrator/index.php?option=com_installer&view=update&task=update.ajax&eid=0&skip=700 HTTP/1.1" 200 2 "



Dave

Last edit: 10 years 2 months ago by davec.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #172507

Hi,

Please check your PHP error log.
The web server 404 codes are not related at all.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 1 month ago #172651

Hi

the following erros are thrown up

[22-Sep-2014 21:18:33 Europe/London] PHP Notice:  Undefined index: HTTP_HOST in /home/site/public_html/libraries/joomla/application/web.php on line 875
[22-Sep-2014 21:18:33 Europe/London] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/site/public_html/libraries/joomla/application/web.php:875) in /home/site/public_html/libraries/joomla/session/session.php on line 658
[22-Sep-2014 21:18:33 Europe/London] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/detainee/public_html/libraries/joomla/application/web.php:875) in /home/site/public_html/libraries/joomla/session/session.php on line 658

Dave

Last edit: 10 years 1 month ago by davec.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #172692

Hi,

Thanks to enable the "test_hikashop" account on your website in order to allow us to see what's happening directly.

There is nothing related on the error in the log file. We think that you just have wrongly past the given code.
You potentially forgot a php tag or something like that. Thanks to try to remove the code and add it again.

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 1 month ago #172774

Hi Xavier

I have tried more than once to enter the code supplied and get the same result.

I have activated the test account. I have also changed the address to Ireland as this is one of the countries where the 0% VAT rate applies.

You will need to login first to see the products. Add something from clothing and then view cart, these are subject to VAT in the UK, but not in Ireland or the Channel Islands

Dave B)

Last edit: 10 years 1 month ago by davec. Reason: ADDITIONAL TEXT

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #172834

Hi,

So no more blank page ?
Your issue seems to be just a wrong configuration of your taxes.

Thanks to check this part again. The given code only allow to display a VAT = 0 if no VAT are applied, but if there is VAT so the restrictions are not correct.

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 1 month ago #173009

Hi

The problem is still there. I had to remove the code as it affects what is a live site. I am quite happy to set the test account with admin access.

I have attached a couple of screenshots. One is for Tax rates and the other for Tax Rules. I am pretty sure these have been set up correctly!

The Channel Islands and Eire do not pay VAT on goods brought from the UK so the rate has been set as 0% as you will see from the attachments. As per my original post the Tax/VAT line is not shown on the cart/checkout page. I would like it to show as per the attachment tax display 2

Thanks

Dave

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #173026

Hi,

I just made the changes as explained, there was just two missing php tags in the given code.
So it seems to be working as expected. ;)

ps: I edited the previously given code with the correct php tags.

The following user(s) said Thank You: davec

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 1 month ago #173259

Xavier

thanks very much for your help, greatly appreciated.

Dave B)

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 1 month ago #174928

Hi

I have just realised that the carriage is not being calculated to add vat when it is a UK based business. The VAT is only being added to the product.

I have attached the customised file, would grealty appreciate it if you could take a look please and adjust the code if that is possible

Dave B)

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #174977

Hi,

The code should be working for everybody, it just display "0" if there is no vat already displayed.
Are you sure that your tax rules are correct ?

Please Log in or Create an account to join the conversation.

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
10 years 1 month ago #175095

Hi

the Channel Islands and Eire are set up to work with the UK product tax category. This is how Im understand it to work. I have attached 2 screenshots. More than happy to activate admin access so that you can conifirm these have been set up correctly?

Thanks

Dave

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #175127

Hi,

This seems to be set up correctly.
As the tax rate is 0% so we go in the else condition I gave you earlier and the 0 VAT should be displayed, I tried on my end and it seems to be working fine.

You can set our test account as administrator, if I have some time on monday I will try to look at that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum