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

#   show "Product available" when quantity is unlimited

##

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

Less More

- Posts: 281
- Thank you received: 3
-
-

9 years 11 months ago [\#255767](#255767) by [francota](/forum/user/37953-francota "View francota's Profile")  *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#255767 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")* was created by *[francota](/forum/user/37953-francota "View francota's Profile")*

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4

Hello
In the product quantity I setted unlimited, but in this case in the product page it doesn't show "Product available"
I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1.
But There is the possibility to show " "Product available"" also when the product quntity is unlimited??

Thanks
FRank

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODc1NzMtc2hvdy1wcm9kdWN0LWF2YWlsYWJsZS13aGVuLXF1YW50aXR5LWlzLXVubGltaXRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14274
-
-

9 years 11 months ago [\#255770](#255770) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#255770 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi,

There is no option for that.
You can edit the file "quantity" via the menu Display&gt;Views and add such code:
echo "product available";
after the line:
if($this-&gt;row-&gt;product_quantity == -1) {

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

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

Less More

- Posts: 281
- Thank you received: 3
-
-

9 years 11 months ago [\#255897](#255897) by [francota](/forum/user/37953-francota "View francota's Profile")  Replied by *[francota](/forum/user/37953-francota "View francota's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#255897 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Yes it works

Thanks
Frank

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 8 months ago [\#262650](#262650) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#262650 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hello,

i would like to do the same here but i can't make it work, could you please write me a little more detailed code for quantity view?

Thank you

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

9 years 8 months ago -  9 years 8 months ago [\#262657](#262657) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#262657 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hello,

You have to create an override on **quantity** view :
For this :
- Go to **Components** =&gt; **HikaShop** =&gt; **Configuration**
- Then on **Display** tab select **Views**
- Use the three drop-down filter with **Product**/**Your Template**/**frontend**

"Custom" your view by clicking on **Quantity**, maybe you can copy the code, to past it on a code editor like notepad.
Then look for this line code : Code:

if($this-&gt;row-&gt;product_quantity == -1) {

You will see that :
Code:

if($this-&gt;row-&gt;product_quantity == -1) { ?&gt; &lt;div class="hikashop_product_stock"&gt;&lt;?php if(!empty($this-&gt;row-&gt;has_options)) { etc etc...

Add ' **echo "product available";** ' to have this : Code:

if($this-&gt;row-&gt;product_quantity == -1) { echo "product available"; ?&gt; &lt;div class="hikashop_product_stock"&gt;&lt;?php if(!empty($this-&gt;row-&gt;has_options)) { etc etc...

Hope this will help you.

Regards

Last edit: 9 years 8 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 8 months ago [\#262757](#262757) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#262757 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi Philip,

i tried to edit quantity view but the code i see it's alittle different from the example of yours!
That's why i m a bit confused.

Here is the code i see
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 3.0.0 * @author hikashop.com * @copyright (C) 2010-2017 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if($this-&gt;config-&gt;get('add_to_cart_legacy', true)) { $this-&gt;setLayout('quantity_legacy'); echo $this-&gt;loadTemplate(); return; } $catalogue_mode = $this-&gt;config-&gt;get('catalogue', false); $enable_wishlist = (hikashop_level(1) &amp;&amp; $this-&gt;config-&gt;get('enable_wishlist', 1) &amp;&amp; $this-&gt;params-&gt;get('add_to_wishlist', 0) &amp;&amp; (!$this-&gt;config-&gt;get('hide_wishlist_guest', 1) &#124;&#124; hikashop_loadUser() != null)); if($catalogue_mode &amp;&amp; !$enable_wishlist) return; $in_stock = ((int)$this-&gt;row-&gt;product_quantity == -1 &#124;&#124; (int)$this-&gt;row-&gt;product_quantity &gt; 0); $is_free = empty($this-&gt;row-&gt;prices); $display_free_cart = (int)$this-&gt;config-&gt;get('display_add_to_cart_for_free_products', 0); $display_free_wishlist = (int)$this-&gt;config-&gt;get('display_add_to_wishlist_for_free_products', 1); $display_quantity_field = ((int)$this-&gt;config-&gt;get('show_quantity_field', -1) != 0); $global_on_listing = $this-&gt;config-&gt;get('show_quantity_field') == 2; $waitlist = (int)$this-&gt;config-&gt;get('product_waitlist', 0); $waitlist_btn = !$in_stock &amp;&amp; (hikashop_level(1) &amp;&amp; ($waitlist == 2 &#124;&#124; ($waitlist == 1 &amp;&amp; (!empty($this-&gt;row-&gt;main-&gt;product_waitlist) &#124;&#124; !empty($this-&gt;row-&gt;product_waitlist))))); $now = time(); $start_date = (@$this-&gt;row-&gt;product_sale_start &#124;&#124; empty($this-&gt;element-&gt;main)) ? @$this-&gt;row-&gt;product_sale_start : $this-&gt;element-&gt;main-&gt;product_sale_start; $end_date = (@$this-&gt;row-&gt;product_sale_end &#124;&#124; empty($this-&gt;element-&gt;main)) ? @$this-&gt;row-&gt;product_sale_end : $this-&gt;element-&gt;main-&gt;product_sale_end; $product_available = ($end_date &lt;= 0 &#124;&#124; $end_date &gt;= $now) &amp;&amp; ($start_date &lt;= 0 &#124;&#124; $start_date &lt; $now); $add_to_cart = !$catalogue_mode &amp;&amp; $in_stock &amp;&amp; (!$is_free &#124;&#124; $display_free_cart) &amp;&amp; $product_available; $add_to_wishlist = $enable_wishlist &amp;&amp; (!$is_free &#124;&#124; $display_free_wishlist); $css_button = $this-&gt;config-&gt;get('css_button', 'hikabtn'); $css_button_cart = $this-&gt;config-&gt;get('css_button_cart', 'hikacart'); $css_button_wishlist = $this-&gt;config-&gt;get('css_button_wishlist', 'hikawishlist'); if($global_on_listing &amp;&amp; !empty($this-&gt;row-&gt;formName)) { if($add_to_cart) { ?&gt; &lt;a class="&lt;?php echo $css_button . ' ' . $css_button_cart; ?&gt;" href="#" onclick="if(window.hikashop.addToCart) { return window.hikashop.addToCart(this); }" data-addTo-div="&lt;?php echo $this-&gt;row-&gt;formName; ?&gt;" data-addTo-class="add_in_progress"&gt;&lt;span&gt;&lt;?php echo JText::_('ADD_TO_CART'); ?&gt;&lt;/span&gt;&lt;/a&gt; &lt;?php } if($add_to_wishlist) { ?&gt; &lt;a class="&lt;?php echo $css_button . ' ' . $css_button_wishlist; ?&gt;" href="#" onclick="if(window.hikashop.addToWishlist) { document.getElementById('hikashop_cart_type_0').value = 'wishlist'; return window.hikashop.addToWishlist(this); }" data-addTo-div="&lt;?php echo $this-&gt;row-&gt;formName; ?&gt;" data-addTo-class="add_in_progress"&gt;&lt;span&gt;&lt;?php echo JText::_('ADD_TO_WISHLIST'); ?&gt;&lt;/span&gt;&lt;/a&gt; &lt;?php } return; } $classical_url = 'product&amp;task=updatecart&amp;add=1&amp;product_id='.$this-&gt;row-&gt;product_id; if(!empty($this-&gt;return_url)) $classical_url .= '&amp;return_url=' . urlencode(base64_encode(urldecode($this-&gt;redirect_url))); if($end_date &gt; 0 &amp;&amp; $end_date &lt; $now) { ?&gt; &lt;span class="hikashop_product_sale_end"&gt;&lt;?php echo JText::_('ITEM_NOT_SOLD_ANYMORE'); ?&gt;&lt;/span&gt; &lt;?php return; } if($start_date &gt; 0 &amp;&amp; $start_date &gt; $now) { ?&gt; &lt;span class="hikashop_product_sale_start"&gt;&lt;?php echo JText::sprintf('ITEM_SOLD_ON_DATE', hikashop_getDate($start_date, $this-&gt;params-&gt;get('date_format', '%d %B %Y'))); ?&gt;&lt;/span&gt; &lt;?php return; } ?&gt; &lt;span class="hikashop_product_stock_count"&gt; &lt;?php if($this-&gt;row-&gt;product_quantity &gt; 0) echo (($this-&gt;row-&gt;product_quantity == 1 &amp;&amp; JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') ? JText::sprintf('X_ITEM_IN_STOCK', $this-&gt;row-&gt;product_quantity) : JText::sprintf('X_ITEMS_IN_STOCK', $this-&gt;row-&gt;product_quantity)); elseif(!$in_stock) echo JText::_('NO_STOCK'); ?&gt; &lt;/span&gt; &lt;?php if($waitlist_btn) { ?&gt; &lt;a class="&lt;?php echo $css_button; ?&gt;" href="&lt;?php echo hikashop_completeLink('product&amp;task=waitlist&amp;cid='.$this-&gt;row-&gt;product_id); ?&gt;"&gt;&lt;span&gt;&lt;?php echo JText::_('ADD_ME_WAITLIST'); ?&gt;&lt;/span&gt;&lt;/a&gt; &lt;?php } if(($add_to_cart &#124;&#124; $add_to_wishlist) &amp;&amp; $display_quantity_field) { $this-&gt;setLayout('show_quantity'); echo $this-&gt;loadTemplate(); } if($add_to_cart) { ?&gt; &lt;a class="&lt;?php echo $css_button . ' ' . $css_button_cart; ?&gt;" href="&lt;?php echo hikashop_completeLink($classical_url); ?&gt;" onclick="if(window.hikashop.addToCart) { return window.hikashop.addToCart(this); }" data-addToCart="&lt;?php echo $this-&gt;row-&gt;product_id; ?&gt;" data-addTo-div="hikashop_product_form" data-addTo-class="add_in_progress"&gt;&lt;span&gt;&lt;?php echo JText::_('ADD_TO_CART'); ?&gt;&lt;/span&gt;&lt;/a&gt; &lt;?php } if($add_to_wishlist) { ?&gt; &lt;a class="&lt;?php echo $css_button . ' ' . $css_button_wishlist; ?&gt;" href="&lt;?php echo hikashop_completeLink($classical_url); ?&gt;" onclick="if(window.hikashop.addToWishlist) { return window.hikashop.addToWishlist(this); }" data-addToWishlist="&lt;?php echo $this-&gt;row-&gt;product_id; ?&gt;" data-addTo-div="hikashop_product_form" data-addTo-class="add_in_progress"&gt;&lt;span&gt;&lt;?php echo JText::_('ADD_TO_WISHLIST'); ?&gt;&lt;/span&gt;&lt;/a&gt; &lt;?php }

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODc1NzMtc2hvdy1wcm9kdWN0LWF2YWlsYWJsZS13aGVuLXF1YW50aXR5LWlzLXVubGltaXRlZD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14274
-
-

9 years 8 months ago [\#262777](#262777) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#262777 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi,

You can add the code:
elseif(($this-&gt;row-&gt;product_quantity == -1) echo "my text";

before the code:
elseif(!$in_stock)

in your view file.

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 8 months ago [\#262884](#262884) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#262884 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi,

i added the code but nothing changed!

Thank you

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

9 years 8 months ago -  9 years 8 months ago [\#262912](#262912) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#262912 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hello,

I process some test from your **code view**, and do like Nicolas told you, but in Nicolas' code there was a little mistake.
There were **2** "**(**" to start the **elseif** condition.
That error leads to an **error page**, then you told nothing happen, so there is only **one** solution : **you don't edit the right view**.

Check please your **three dropdown filters**, like this :

[ ![3drop.png](/forum/attachment/36465) ](/forum/attachment/36465 "3drop.png")

Edit the **Quantity** view like I told you in [ **my previous message**](https://www.hikashop.com/forum/product-category-display/887573-show-product-available-when-quantity-is-unlimited.html#262657)
But use this code around line **88** (on your code view) or look for this Code:

elseif(!$in_stock) echo JText::_('NO_STOCK');

: Code:

... product_quantity) : JText::sprintf('X_ITEMS_IN_STOCK', $this-&gt;row-&gt;product_quantity)); elseif(!$in_stock) echo JText::_('NO_STOCK'); ?&gt; &lt;/span&gt; ...

**add**Code:

elseif($this-&gt;row-&gt;product_quantity == -1) echo "my text"

; to have this :
Code:

... product_quantity) : JText::sprintf('X_ITEMS_IN_STOCK', $this-&gt;row-&gt;product_quantity)); elseif($this-&gt;row-&gt;product_quantity == -1) echo "my text"; elseif(!$in_stock) echo JText::_('NO_STOCK'); ?&gt; &lt;/span&gt; ...

And that will work, I test it myself :

[ ![unlimitCust.png](/forum/attachment/36466) ](/forum/attachment/36466 "unlimitCust.png")

Regards

- [ ![3drop.png](/forum/attachment/36465) ](/forum/attachment/36465 "3drop.png") [ ](/forum/attachment/36465?download=1 "3drop.png")
- [ ![unlimitCust.png](/forum/attachment/36466) ](/forum/attachment/36466 "unlimitCust.png") [ ](/forum/attachment/36466?download=1 "unlimitCust.png")

Last edit: 9 years 8 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 8 months ago [\#263019](#263019) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#263019 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi Philip,

> Edit the Quantity view like I told you in my previous message

As youcan see in my answer, i tried to edit quantity view but the code i see it's a little different from the example of yours!

> hat error leads to an error page, then you told nothing happen, so there is only one solution : you don't edit the right view.

I don't understand, my default template is yootheme  [ ![yoo.jpg](/forum/attachment/36490) ](/forum/attachment/36490 "yoo.jpg")

However, i tried your latest solution in both protostar AND yootheme template but still no result. Could you please send me the whole view code in case i have made any mistakes? I will send you joomla account details if you want to check.

Thank you

- [ ![yoo.jpg](/forum/attachment/36490) ](/forum/attachment/36490 "yoo.jpg") [ ](/forum/attachment/36490?download=1 "yoo.jpg")

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

9 years 8 months ago -  9 years 8 months ago [\#263030](#263030) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#263030 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hello,

I just have a look on your website, and that's didn't work because your quantity view **isn't display** because you don't display **price**.
And so you can process your custom code in your **product general view**, in your case **show\_tabular**.
I make a custom test and comment it (in order to hide it on the frontend) around line **83**.

of course, you can place it where you want, hope this will fit your needs, see this [ **tutorial**](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout).

Regards

Last edit: 9 years 8 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 8 months ago [\#263141](#263141) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#263141 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi,

i display prices but only for logged users. However i saw your code in show_tabular view and uncomment it and it works now!

Thank you Philip!

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 7 months ago [\#263749](#263749) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#263749 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi again!

I have another issue here, as we discused before i added this code in show_default view file Code:

&lt;?php if($this-&gt;row-&gt;product_quantity == -1) echo "&lt;span class='product_message'&gt;Διαθέσιμο προϊόν&lt;/span&gt;"; } ?&gt;

it shows product available but i also have a badge for -1 quantity to write product unavailable, so if the product quantity is -1 the product shows available BUT if quantity is -2 it shows both the available and unavailable text. I don't understand!!

[ ![1&#95;2017-03-01-2.jpg](/forum/attachment/36700) ](/forum/attachment/36700 "...17-03-01-2.jpg")

Thank you

- [ ![1&#95;2017-03-01-2.jpg](/forum/attachment/36700) ](/forum/attachment/36700 "...17-03-01-2.jpg") [ ](/forum/attachment/36700?download=1 "...17-03-01-2.jpg")

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

9 years 7 months ago -  9 years 7 months ago [\#263758](#263758) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#263758 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hello,

The point I don't understand is **why** you have a **-2** value ?...
You have to know that to **customize** HikaShop, you must understand **how HikaShop code is build**.
Here, quantity value in **classical** process have **3** value "group".
- 0 =&gt; **No quantity**
- **1** to **9999** (and more...) =&gt; Product available in this **specific quantity number**
- **-1** =&gt; Is a quantity to notice HikaShop that this product **isn't stock limited**, and so is infinite, like for download software, wallpaper etc...

And so now, why do you have a **-2** ?... I don't understand if it's your will (via custom) or else...
Plus, please note, that this forum's aim is to help people to configure and solve issue.
We can adviced people for their customization needs but that's all.

Awaiting more details from you.

Regards

Last edit: 9 years 7 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile")
- [ Away](/forum/user/8351-verzevoul)

Less More

- Posts: 1191
- Thank you received: 13
-
-

9 years 7 months ago [\#263876](#263876) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#263876 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi Philip,

i used -2 value as a test. I tried now 0 for not available and it works you are right.
Sorry to bother you so much!

Thank you

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

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

Less More

- Posts: 36
- Thank you received: 0
-
-

7 years 1 week ago [\#312149](#312149) by [marek393](/forum/user/31274-marek393 "View marek393's Profile")  Replied by *[marek393](/forum/user/31274-marek393 "View marek393's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#312149 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hi,
I just want to ask if somthing like this
elseif(($this-&gt;row-&gt;product_quantity == -1) echo "my text";
is possible to do on product listing page?

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

7 years 1 week ago -  7 years 1 week ago [\#312165](#312165) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[show "Product available" when quantity is unlimited](/forum/26-product-category-display/887573-show-product-available-when-quantity-is-unlimited#312165 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.4  Hello In the product quantity I setted unlimited, but in this case in the product page it doesn't show &quot;Product available&quot; I know there is the possibility to set a quantity of the produt and than ovverride the language setting what I want it shows when the produc quantity is more than 1. But There is the possibility to show &quot; &quot;Product available&quot;&quot; also when the product quntity is unlimited??  Thanks FRank")*

Hello,
Yes, it's possible !
First, I advice you to have a look on this [ **tutorial**](https://www.hikashop.com/support/documentation/153-customize-the-display.html).
second, I'm drawing your attention to this "**Display view files**" option from **Main HikaShop** option in **Advanced tab** &amp; **Advanced settings**.
This option will help you to get the good required view to customize.

[ ![&#91;img](https://i.imgur.com/4ANBnFF.png) ](https://i.imgur.com/4ANBnFF.png "&#91;img")

Then, **html &amp; php** knowledge to create an override to customize your product listing page.
In **Display** dropdown =&gt; **Views**, use the **3** filter dropdown with **Product**/ ***Your Template***/ **Frontend**, and find your required view to edit it.

Hope this will help you.
Regards

Last edit: 7 years 1 week ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

[](#top)
