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

#   Show Text regarding if Taxes are applied or not

##

- **[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")**
- [![joki1994's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/70183-joki1994 "View joki1994's Profile") Topic Author
- [ Offline](/forum/user/70183-joki1994)

Less More

- Posts: 13
- Thank you received: 2
-
-

4 years 1 week ago [\#346762](#346762) by [joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")  *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346762 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")* was created by *[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")*

-- HikaShop version -- : 4.6.2
-- Joomla version -- : 4.2.3
-- PHP version -- : 8.0.25
-- Browser(s) name and version -- : Firefox

Hi again,

I would like to display a text after the price. The text should not be fixed, but dynamic.

So if the price is displayed with tax, the text should be "inkl. Tax", else the Text should be "exkl. Tax".

I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.

I tried the following code in product / listing price.php but that can't work because my product_tax_id is the same, only the category changes.
Code:

if($this-&gt;row-&gt;product_tax_id!=88) echo '&lt;span class="MwSt_neu"&gt;inkl. Tax'; else echo '&lt;span class="MwSt_neu2"&gt;exkl. Tax';

How can I filter by tax category?

Thanks in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzkwNTM4OS1zaG93LXRleHQtcmVnYXJkaW5nLWlmLXRheGVzLWFyZS1hcHBsaWVkLW9yLW5vdD90bXBsPW1hcmtkb3du) 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: 14327
-
-

4 years 1 week ago [\#346763](#346763) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346763 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")*

Hi,

The id of the tax category of the current product is indeed in $this-&gt;row-&gt;product_tax_id
I would recommend you first do a var_dump($this-&gt;row-&gt;product_tax_id) to check the value of that variable for the different products of the listing.

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

- **[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")**
- [![joki1994's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/70183-joki1994 "View joki1994's Profile") Topic Author
- [ Offline](/forum/user/70183-joki1994)

Less More

- Posts: 13
- Thank you received: 2
-
-

4 years 1 week ago [\#346778](#346778) by [joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")  Replied by *[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")* on topic *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346778 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")*

Hi,

sorry I was wrong. I mean that I need the id from the taxes list. System -&gt; Taxes.

How is the name of this id or how can I filter with this id. Attached a screenshot.

Kind Regards

[ ![Screenshot&#95;20221122&#95;204326.png](/forum/attachment/55944) ](/forum/attachment/55944 "...122&#95;204326.png")

- [ ![Screenshot&#95;20221122&#95;204326.png](/forum/attachment/55944) ](/forum/attachment/55944 "...122&#95;204326.png") [ ](/forum/attachment/55944?download=1 "...122&#95;204326.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzkwNTM4OS1zaG93LXRleHQtcmVnYXJkaW5nLWlmLXRheGVzLWFyZS1hcHBsaWVkLW9yLW5vdD90bXBsPW1hcmtkb3du) 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: 14327
-
-

4 years 1 week ago [\#346780](#346780) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346780 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")*

Hi,

You should have that like this: Code:

$mainPrice = reset($this-&gt;row-&gt;prices); $mainTax = reset($mainPrice-&gt;taxes); echo $mainTax-&gt;taxation_id;

The following user(s) said Thank You: [joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")

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

- **[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")**
- [![joki1994's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/70183-joki1994 "View joki1994's Profile") Topic Author
- [ Offline](/forum/user/70183-joki1994)

Less More

- Posts: 13
- Thank you received: 2
-
-

4 years 1 week ago [\#346801](#346801) by [joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")  Replied by *[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")* on topic *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346801 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")*

Hi, thanks that worked nice.

I tried to use the same code in checkout -&gt; show block cart.php but I got the following error:

Attempt to modify property "prices" on null.

this is my code I added in UNIT Price Section:
Code:

&lt;!-- UNIT PRICE --&gt; &lt;?php $mainPrice = reset($this-&gt;row-&gt;prices); $mainTax = reset($mainPrice-&gt;taxes); if(!empty($this-&gt;options['show_price'])) { ?&gt; &lt;td data-title="&lt;?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?&gt;" class="hikashop_cart_product_price_value"&gt;&lt;?php echo $this-&gt;getDisplayProductPrice($product, true); if(HIKASHOP_RESPONSIVE) { ?&gt;&lt;span class="visible-phone"&gt; &lt;?php if($mainTax-&gt;taxation_id==88){ echo '&lt;span class="hikashop_product_price_per_unit MwSt_neu"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;'; } else echo '&lt;span class="hikashop_product_price_per_unit MwSt_neu_exkl"&gt;'.JText::_('PER_UNIT_MWST_EXCL').'&lt;/span&gt;'; ?&gt;&lt;/span&gt;&lt;?php } ?&gt;&lt;/td&gt; &lt;?php } ?&gt; &lt;!-- EO UNIT PRICE --&gt;

How can I get in this file the taxation_id?

Kind Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzkwNTM4OS1zaG93LXRleHQtcmVnYXJkaW5nLWlmLXRheGVzLWFyZS1hcHBsaWVkLW9yLW5vdD90bXBsPW1hcmtkb3du) 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: 14327
-
-

4 years 1 week ago [\#346804](#346804) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346804 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")*

Hi,

If you look at the code in there, you can see that the data of the product is in $product not in $this-&gt;row in this view. That's because this view is for the whole cart while listing_price if for an individual product. So just change that in your code and it should work.

The following user(s) said Thank You: [joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")

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

- **[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")**
- [![joki1994's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/70183-joki1994 "View joki1994's Profile") Topic Author
- [ Offline](/forum/user/70183-joki1994)

Less More

- Posts: 13
- Thank you received: 2
-
-

4 years 1 week ago [\#346834](#346834) by [joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")  Replied by *[joki1994](/forum/user/70183-joki1994 "View joki1994's Profile")* on topic *[Show Text regarding if Taxes are applied or not](/forum/40-taxes/905389-show-text-regarding-if-taxes-are-applied-or-not#346834 "-- HikaShop version -- : 4.6.2 -- Joomla version -- : 4.2.3 -- PHP version -- : 8.0.25 -- Browser(s) name and version -- : Firefox  Hi again,  I would like to display a text after the price. The text should not be fixed, but dynamic.  So if the price is displayed with tax, the text should be &quot;inkl. Tax&quot;, else the Text should be &quot;exkl. Tax&quot;.  I used 2 different tax categories, where I defined country zones. Now I would like to know which variable is associated to the category tax id.  I tried the following code in product / listing price.php but that can't work because my product&#95;tax&#95;id is the same, only the category changes.  How can I filter by tax category?  Thanks in advance")*

Thank you, works perfect now

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

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