Add Vat number to invoices

  • Posts: 1074
  • Thank you received: 11
  • Hikashop Business
1 week 3 days ago #365644

-- HikaShop version -- : 5.1.3
-- Joomla version -- : 5.1.2

Hi!

I want the Vat number custom field, which is a required field, to be added in the invoices.
How do i do that?

Thank you

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

  • Posts: 83304
  • Thank you received: 13468
  • MODERATOR
1 week 3 days ago #365645

Hi,

Go in the HikaShop configuration, and under the "Checkout" tab, add the corresponding tag in the "Address format" setting:
www.hikashop.com/support/documentation/5...ml#checkout_shipping
For the default VAT number field of HikaShop, it's the tag {address_vat} that you want to add there.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1074
  • Thank you received: 11
  • Hikashop Business
1 week 2 days ago #365666

Hi,

I added the tag {address_vat} in the Address format, now i see it at the checkout but still not in the invoice.

Thank you

Attachments:

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

  • Posts: 83304
  • Thank you received: 13468
  • MODERATOR
1 week 2 days ago #365667

Hi,

Note that it will only be added to the invoice if the address in the order has the VAT number.
Also, the address format is saved as a view override of address / address_template on the frontend and order / address_template in the backend. So, if you don't see the change in the backend, it could be that the override could not be added for your template in the backend. You can always manually copy the file templates/YOUR_TEMPLATE/html/address/address_template.php to administrator/YOUR_BACKEND_TEMPLATE/html/order/address_template.php via FTP and it will be taken into account.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1074
  • Thank you received: 11
  • Hikashop Business
1 week 2 days ago #365673

Hi nicolas,

The VAT number is a required field so it is always filed at every order.
I checked the overrides and the views as you said and the address_template.php has the same content both in administrator folder and my template frontend folder. So i am kinda confused here. Isn't there an easier way to do this?
May i send you credentials to see it yourself?

Thank you again!

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

  • Posts: 83304
  • Thank you received: 13468
  • MODERATOR
1 week 2 days ago #365675

Hi,

I suppose it works then.
It must be your browser which cached the old version of the invoice popup and is redisplaying it to you without contacting the server again.
Try with another browser and you should not have the issue, confirming that the change has been taken into account. You can then clear your browser's cache.

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

  • Posts: 1074
  • Thank you received: 11
  • Hikashop Business
1 week 1 day ago #365682

Hi!

I tried from Firefox still nothing. I cleaned cache etc.

This is the order backend override code (administrator/templates/atum/html/com_hikashop/order/address_template.php)

<?php
 defined('_JEXEC') or die('Restricted access');
?>
{address_company}
{address_title} {address_firstname} {address_lastname}
{address_street}
{address_post_code} {address_city} {address_state}
{address_country}
{address_vat}
<?php if(!empty($this->address->address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?>

and this is the address frontend override code (templates/yootheme/html/com_hikashop/address/address_template.php)
<?php
 defined('_JEXEC') or die('Restricted access');
?>
{address_company}
{address_title} {address_firstname} {address_lastname}
{address_street}
{address_post_code} {address_city} {address_state}
{address_country}
{address_vat}
<?php if(!empty($this->address->address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?>

Is it correct?

Thank you!

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

  • Posts: 83304
  • Thank you received: 13468
  • MODERATOR
1 week 1 day ago #365685

Hi,

If you're using the template atum in the backend, then yes.
Otherwise, you need to look at the override file for the corresponding template.

If that doesn't help, please provide a backend access via our contact form so that we can check the situation.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1074
  • Thank you received: 11
  • Hikashop Business
1 week 1 day ago #365688

It is the atum template yes.
I sent you access and FTP.

Thank you!

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

  • Posts: 83304
  • Thank you received: 13468
  • MODERATOR
1 week 1 day ago #365689

Hi,

Thanks. The issue is that you had only activated the frontend and the backend listing display settings of the custom field but not the backend form display setting. And the system bases itself on this display setting to load the data of the field for each address in the invoice. That's why you didn't see it in the backend invoice area.
I've activated the display setting of the custom field for you and now it displays in the invoice.

The following user(s) said Thank You: verzevoul

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

Time to create page: 0.072 seconds
Powered by Kunena Forum