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

#   How to show text in checkout based on country and brand

##

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

Less More

- Posts: 646
- Thank you received: 26
-
-
-

9 years 4 weeks ago -  9 years 3 weeks ago [\#281756](#281756) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  *[How to show text in checkout based on country and brand](/forum/27-checkout/892622-how-to-show-text-in-checkout-based-on-country-and-brand#281756 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 7  Hi Hikashop team,  I like to show text into the checkout step 2 (Address) but I don't know what's wrong with my code. I want to add this code into checkout / show&#95;block&#95;address.php  The statement is: When shipping address is country Germany AND one of the products in the cart have (brand) product&#95;manufacturer&#95;id=='28', then show text or else do nothing. (= text do nothing).  I tried this code but it only show the &quot;text do nothing&quot;. Can you please tell me what's wrong with this code.  I hope you will help me with this :)  Kind regards, Lumiga")* was created by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")*

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.1
-- PHP version -- : 7

Hi Hikashop team,

I like to show text into the checkout step 2 (Address) but I don't know what's wrong with my code.
I want to add this code into checkout / show_block_address.php

The statement is:
When shipping address is country Germany AND one of the products in the cart have (brand) product_manufacturer_id=='28',
then show text or else do nothing. (= text do nothing).

I tried this code but it only show the "text do nothing". Can you please tell me what's wrong with this code. Code:

&lt;?php if($data-&gt;cart-&gt;address_country=='country_Germany_81' AND $data-&gt;cart-&gt;product_manufacturer_id=='28') { echo "products form the brand x could not be shipped to Germany please remove all brand x products from your cart to order the rest of your prodcuts"; } else { echo "text do nothing"; } ?&gt;

I hope you will help me with this ![:)](/media/kunena/emoticons/3.png ":)")

Kind regards,
Lumiga

---

Kind regards,
Lumiga

Last edit: 9 years 3 weeks ago by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile").

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

9 years 4 weeks ago [\#281757](#281757) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[How to show text in checkout based on country and brand](/forum/27-checkout/892622-how-to-show-text-in-checkout-based-on-country-and-brand#281757 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 7  Hi Hikashop team,  I like to show text into the checkout step 2 (Address) but I don't know what's wrong with my code. I want to add this code into checkout / show&#95;block&#95;address.php  The statement is: When shipping address is country Germany AND one of the products in the cart have (brand) product&#95;manufacturer&#95;id=='28', then show text or else do nothing. (= text do nothing).  I tried this code but it only show the &quot;text do nothing&quot;. Can you please tell me what's wrong with this code.  I hope you will help me with this :)  Kind regards, Lumiga")*

Hello Lumiga,

The best solution probably be to directly check what you have in the "$data-&gt;cart" object using the "var_dump" function which will enable you to properly check and adapt your PHP condition (if)

Best regards,
Mohamed Thelji.

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

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

Less More

- Posts: 646
- Thank you received: 26
-
-
-

9 years 3 weeks ago -  9 years 3 weeks ago [\#282183](#282183) by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")  Replied by *[Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")* on topic *[How to show text in checkout based on country and brand](/forum/27-checkout/892622-how-to-show-text-in-checkout-based-on-country-and-brand#282183 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 7  Hi Hikashop team,  I like to show text into the checkout step 2 (Address) but I don't know what's wrong with my code. I want to add this code into checkout / show&#95;block&#95;address.php  The statement is: When shipping address is country Germany AND one of the products in the cart have (brand) product&#95;manufacturer&#95;id=='28', then show text or else do nothing. (= text do nothing).  I tried this code but it only show the &quot;text do nothing&quot;. Can you please tell me what's wrong with this code.  I hope you will help me with this :)  Kind regards, Lumiga")*

Hi Mohamed,

When I use the "var_dump" function I get NULL in my sreen.

See screenshot:
[ ![screenshot-8.png](/forum/attachment/41286) ](/forum/attachment/41286 "screenshot-8.png")

I use this code: Code:

&lt;?php var_dump($data-&gt;cart); ?&gt;

Do you have an other hint to fix this issue.

Hope you can help me.

Kind regards,
Lumiga

---

Kind regards,
Lumiga

- [ ![screenshot-8.png](/forum/attachment/41286) ](/forum/attachment/41286 "screenshot-8.png") [ ](/forum/attachment/41286?download=1 "screenshot-8.png")

Last edit: 9 years 3 weeks ago by [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile").

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

9 years 3 weeks ago [\#282192](#282192) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[How to show text in checkout based on country and brand](/forum/27-checkout/892622-how-to-show-text-in-checkout-based-on-country-and-brand#282192 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 7  Hi Hikashop team,  I like to show text into the checkout step 2 (Address) but I don't know what's wrong with my code. I want to add this code into checkout / show&#95;block&#95;address.php  The statement is: When shipping address is country Germany AND one of the products in the cart have (brand) product&#95;manufacturer&#95;id=='28', then show text or else do nothing. (= text do nothing).  I tried this code but it only show the &quot;text do nothing&quot;. Can you please tell me what's wrong with this code.  I hope you will help me with this :)  Kind regards, Lumiga")*

Hello Lumiga,

You should actually use the "$this-&gt;checkoutHelper-&gt;cart-&gt;products" variable to have access to the products of your order.

The following user(s) said Thank You: [Lumiga](/forum/user/31479-lumiga "View Lumiga's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5MjYyMi1ob3ctdG8tc2hvdy10ZXh0LWluLWNoZWNrb3V0LWJhc2VkLW9uLWNvdW50cnktYW5kLWJyYW5kP3RtcGw9bWFya2Rvd24=) 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.064 seconds

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