Add field NIF in the invoice

  • Posts: 39
  • Thank you received: 1
6 years 10 months ago #285743

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.6.33


Hello,
I have been following the steps of this link www.hikashop.com/forum/4-how-to/7412-dis...billing-address.html and I have deleted the field that had created "address_nif" and now I am aware that all the nifs of the users in the backend have been deleted.
I wanted to add the nif in the shipping invoice.
I need your help to recover the nif and add it to the invoice as well.
Thank you very much

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 10 months ago #285745

Hi,

When you delete custom fields, it deletes the corresponding column in the database and thus all the data is lost, even if you recreate the custom field with the same name.
The only solution it to bring back the data from a backup.

Regarding adding the custom field in the invoice, you just want to add its tag in the different address_template view files via the menu Display>Views.

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

  • Posts: 39
  • Thank you received: 1
6 years 9 months ago #286579

Hello, thanks for the answer.
what code and where do I place it, so that it appears on the shipping invoice.
Thank you very much

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286581

Hi,

In the HikaShop configuration, under the "checkout" tab, you have an option "address format" where you can add the tag. Just do the same as the other tags already there.

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

  • Posts: 39
  • Thank you received: 1
6 years 9 months ago #287081

Hello,
I have added the tag exactly as you said but it does not appear in the NIF in the invoice. Attached screenshots of the last purchase, of the tag that I added.
I hope you help me because it is urgent.
Thank you very much

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #287082

Hi,

That's the "mini address format" parameter. I was talking about the "address format" parameter. I had forgotten that you had a really old version of HikaShop. This option was added since HikaShop 3.0.0.
Before that, you need to edit the different files named "address_template" via the menu Display>Views in order to add the tag to them in the same way.

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

  • Posts: 39
  • Thank you received: 1
6 years 9 months ago #287153

Hi, I added the label in the address_template of the front_end i the back_end, I created a new order after emptying cache but the NIF does not appear in the invoice, is the code that I have put in the correct location correct?
Thank you very much

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #287156

Hi,

You need to respect the format of the tags.
As you can see with the other tags, you need to put the column name of your custom field with brackets around it.
But the column of your custom field is not address_nifcif it's only nifcif.
So the tag should be {nifcif} and not {address_nifcif}

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

Time to create page: 0.091 seconds
Powered by Kunena Forum