[Skip to main content](#vessel-content)

#   Custom messages in invoice user type / country

##

- **[crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")**
- [![crealiagroup's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30083.png)](/forum/user/30083-crealiagroup "View crealiagroup's Profile") Topic Author
- [ Offline](/forum/user/30083-crealiagroup)

Less More

- Posts: 117
- Thank you received: 3
-
-
- [](http://www.crealia.it)
-

12 years 1 month ago -  12 years 1 month ago [\#176570](#176570) by [crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")  *[Custom messages in invoice user type / country](/forum/35-orders-management/872516-custom-messages-in-invoice-user-type-country#176570 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.33 -- Browser(s) name and version -- : any  Hi, I need to display in every invoice, at the bottom of the invoice, 3 different kind of custom messages according to combination of 2 conditions: user type (individual or company with and/or without VAT) and country.  I'll try to explain better with a simple table that shows you the combination of messages according to my needs, please watch attached image.  What could be the best way to do that?")* was created by *[crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")*

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.33
-- Browser(s) name and version -- : any

Hi, I need to display in every invoice, at the bottom of the invoice, 3 different kind of custom messages according to combination of 2 conditions: **user type** (individual or company with and/or without VAT) and **country**.

I'll try to explain better with a simple table that shows you the combination of messages according to my needs, please watch attached image.

What could be the best way to do that?

---

[ www.crealia.it/e-commerce/consulenza-ecommerce-hikashop](http://www.crealia.it/e-commerce/consulenza-ecommerce-hikashop)

- [ ![custom&#95;messages&#95;invoice.jpg](/forum/attachment/20285) ](/forum/attachment/20285 "...es&#95;invoice.jpg") [ ](/forum/attachment/20285?download=1 "...es&#95;invoice.jpg")

Last edit: 12 years 1 month ago by [crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3MjUxNi1jdXN0b20tbWVzc2FnZXMtaW4taW52b2ljZS11c2VyLXR5cGUtY291bnRyeT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 1 month ago [\#176582](#176582) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Custom messages in invoice user type / country](/forum/35-orders-management/872516-custom-messages-in-invoice-user-type-country#176582 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.33 -- Browser(s) name and version -- : any  Hi, I need to display in every invoice, at the bottom of the invoice, 3 different kind of custom messages according to combination of 2 conditions: user type (individual or company with and/or without VAT) and country.  I'll try to explain better with a simple table that shows you the combination of messages according to my needs, please watch attached image.  What could be the best way to do that?")*

Hi,

You have to edit the views "order / invoice" (backend) and "order / show" (frontend) and add a php if / switch condition on the custom fields values.
Something like: Code:

if(in_array($this-&gt;element-&gt;billing_address-&gt;address_country,array('France','Spain','...'))){ if(!empty($this-&gt;element-&gt;billing_address-&gt;address_vat)) echo "CUSTOM MESSAGE 1"; }elseif($this-&gt;element-&gt;billing_address-&gt;address_country != 'Italy'){ if(empty($this-&gt;element-&gt;billing_address-&gt;address_vat)) echo "CUSTOM MESSAGE 2"; else echo "CUSTOM MESSAGE 3"; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3MjUxNi1jdXN0b20tbWVzc2FnZXMtaW4taW52b2ljZS11c2VyLXR5cGUtY291bnRyeT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")**
- [![crealiagroup's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30083.png)](/forum/user/30083-crealiagroup "View crealiagroup's Profile") Topic Author
- [ Offline](/forum/user/30083-crealiagroup)

Less More

- Posts: 117
- Thank you received: 3
-
-
- [](http://www.crealia.it)
-

12 years 1 month ago [\#176801](#176801) by [crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")  Replied by *[crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")* on topic *[Custom messages in invoice user type / country](/forum/35-orders-management/872516-custom-messages-in-invoice-user-type-country#176801 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.33 -- Browser(s) name and version -- : any  Hi, I need to display in every invoice, at the bottom of the invoice, 3 different kind of custom messages according to combination of 2 conditions: user type (individual or company with and/or without VAT) and country.  I'll try to explain better with a simple table that shows you the combination of messages according to my needs, please watch attached image.  What could be the best way to do that?")*

Hi Xavier, thanks for your suggestion.

Is there a way to use the zone instead of the array with the names of all the countryes?

I just would obtain a solution that is valid even in future when some countryes will have to move in or out from the zone.

Thanks in advice.

---

[ www.crealia.it/e-commerce/consulenza-ecommerce-hikashop](http://www.crealia.it/e-commerce/consulenza-ecommerce-hikashop)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3MjUxNi1jdXN0b20tbWVzc2FnZXMtaW4taW52b2ljZS11c2VyLXR5cGUtY291bnRyeT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 1 month ago [\#176809](#176809) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom messages in invoice user type / country](/forum/35-orders-management/872516-custom-messages-in-invoice-user-type-country#176809 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.33 -- Browser(s) name and version -- : any  Hi, I need to display in every invoice, at the bottom of the invoice, 3 different kind of custom messages according to combination of 2 conditions: user type (individual or company with and/or without VAT) and country.  I'll try to explain better with a simple table that shows you the combination of messages according to my needs, please watch attached image.  What could be the best way to do that?")*

Hi,

With more complex code and a MySQL query yes.
I invite you to contact our partners for a quote on that customization in that case:
[ www.hikashop.com/home/our-partners.html](http://www.hikashop.com/home/our-partners.html)
or post a request on our commercial jobs forum.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3MjUxNi1jdXN0b20tbWVzc2FnZXMtaW4taW52b2ljZS11c2VyLXR5cGUtY291bnRyeT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.057 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
