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

#   Show stock available in a product list

##

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

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 10 months ago [\#84303](#84303) by [JIK](/forum/user/362-jik "View JIK's Profile")  *[Show stock available in a product list](/forum/2-general-talk-about-hikashop/77244-show-stock-available-in-a-product-list#84303 "Hi, I have a standard Joomla menu item which is a Hikashop &quot;product listing&quot; type showing all the product within a specific category. The Hikashop options for this menu are: Type of content = product Type of layout = list Display 'Add to cart' button = No Link to the product page = No  I have two questions in relation to display that I can't find answers to:  &#42; Is there a way to show the stock available in a product list?  &#42; Is it possible to display a link from the product in a list to the product page as a button rather than a hyperlink on the title?For number 2, I can't use the standard &quot;add to cart&quot; button as there are custom fields that need to be filled for each product and the &quot;add to cart&quot; button bypasses these fields. Can't seem to find anyway around this. The table view of the products is not what I want.  I have looked at the display &gt; views but can't find which one of the php files controls the product listing view.  Ideally I want to show a listing of the products in a given category as follows:  Product name, product price, quantity available, link to product page button  Thanks!")* was created by *[JIK](/forum/user/362-jik "View JIK's Profile")*

Hi, I have a standard Joomla menu item which is a Hikashop "product listing" type showing all the product within a specific category. The Hikashop options for this menu are:
Type of content = product
Type of layout = list
Display 'Add to cart' button = No
Link to the product page = No

I have two questions in relation to display that I can't find answers to:

1. Is there a way to show the stock available in a product list?
2. Is it possible to display a link from the product in a list to the product page as a button rather than a hyperlink on the title?For number 2, I can't use the standard "add to cart" button as there are custom fields that need to be filled for each product and the "add to cart" button bypasses these fields. Can't seem to find anyway around this. The table view of the products is not what I want.

I have looked at the display &gt; views but can't find which one of the php files controls the product listing view.

Ideally I want to show a listing of the products in a given category as follows:

Product name, product price, quantity available, link to product page button

Thanks!

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

13 years 10 months ago [\#84404](#84404) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Show stock available in a product list](/forum/2-general-talk-about-hikashop/77244-show-stock-available-in-a-product-list#84404 "Hi, I have a standard Joomla menu item which is a Hikashop &quot;product listing&quot; type showing all the product within a specific category. The Hikashop options for this menu are: Type of content = product Type of layout = list Display 'Add to cart' button = No Link to the product page = No  I have two questions in relation to display that I can't find answers to:  &#42; Is there a way to show the stock available in a product list?  &#42; Is it possible to display a link from the product in a list to the product page as a button rather than a hyperlink on the title?For number 2, I can't use the standard &quot;add to cart&quot; button as there are custom fields that need to be filled for each product and the &quot;add to cart&quot; button bypasses these fields. Can't seem to find anyway around this. The table view of the products is not what I want.  I have looked at the display &gt; views but can't find which one of the php files controls the product listing view.  Ideally I want to show a listing of the products in a given category as follows:  Product name, product price, quantity available, link to product page button  Thanks!")*

Hi,

You can edit the view "product / listing_list" and change the order of the displayed values to have your wanted order of elements.
You can change the link to the product page into a button, just some html is required.

To add the product quantity, you can add some code like: Code:

&lt;?php if($this-&gt;row-&gt;product_quantity != '-1') echo $this-&gt;row-&gt;product_quantity ?&gt;

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

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

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 10 months ago [\#84444](#84444) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Show stock available in a product list](/forum/2-general-talk-about-hikashop/77244-show-stock-available-in-a-product-list#84444 "Hi, I have a standard Joomla menu item which is a Hikashop &quot;product listing&quot; type showing all the product within a specific category. The Hikashop options for this menu are: Type of content = product Type of layout = list Display 'Add to cart' button = No Link to the product page = No  I have two questions in relation to display that I can't find answers to:  &#42; Is there a way to show the stock available in a product list?  &#42; Is it possible to display a link from the product in a list to the product page as a button rather than a hyperlink on the title?For number 2, I can't use the standard &quot;add to cart&quot; button as there are custom fields that need to be filled for each product and the &quot;add to cart&quot; button bypasses these fields. Can't seem to find anyway around this. The table view of the products is not what I want.  I have looked at the display &gt; views but can't find which one of the php files controls the product listing view.  Ideally I want to show a listing of the products in a given category as follows:  Product name, product price, quantity available, link to product page button  Thanks!")*

Thanks Xavier, I had looked at just about every display except that one!

I'm almost there with what I need now, but I need a little help with the button link. I have put this code into listing_list but it breaks the page:
Code:

&lt;?php if($this-&gt;row-&gt;product_quantity != '-1') echo JText::_('NO_STOCK'); ?&gt; &lt;?php if($this-&gt;row-&gt;product_quantity != '0') &lt;input type="button" onclick="window.location='&lt;?php echo $link; ?&gt;';" class="button" value=" Available "/&gt; ; ?&gt;

I just want the button to show ONLY if there is stock available.

Thanks heaps.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 10 months ago [\#84446](#84446) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Show stock available in a product list](/forum/2-general-talk-about-hikashop/77244-show-stock-available-in-a-product-list#84446 "Hi, I have a standard Joomla menu item which is a Hikashop &quot;product listing&quot; type showing all the product within a specific category. The Hikashop options for this menu are: Type of content = product Type of layout = list Display 'Add to cart' button = No Link to the product page = No  I have two questions in relation to display that I can't find answers to:  &#42; Is there a way to show the stock available in a product list?  &#42; Is it possible to display a link from the product in a list to the product page as a button rather than a hyperlink on the title?For number 2, I can't use the standard &quot;add to cart&quot; button as there are custom fields that need to be filled for each product and the &quot;add to cart&quot; button bypasses these fields. Can't seem to find anyway around this. The table view of the products is not what I want.  I have looked at the display &gt; views but can't find which one of the php files controls the product listing view.  Ideally I want to show a listing of the products in a given category as follows:  Product name, product price, quantity available, link to product page button  Thanks!")*

Hi,

Your code fixed (without PHP errors): Code:

&lt;?php if($this-&gt;row-&gt;product_quantity != '-1') echo JText::_('NO_STOCK'); ?&gt; &lt;?php if($this-&gt;row-&gt;product_quantity != '0') echo '&lt;input type="button" onclick="window.location=\''. $link .'\';" class="button" value=" Available "/&gt;'; ?&gt;

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 10 months ago [\#84450](#84450) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Show stock available in a product list](/forum/2-general-talk-about-hikashop/77244-show-stock-available-in-a-product-list#84450 "Hi, I have a standard Joomla menu item which is a Hikashop &quot;product listing&quot; type showing all the product within a specific category. The Hikashop options for this menu are: Type of content = product Type of layout = list Display 'Add to cart' button = No Link to the product page = No  I have two questions in relation to display that I can't find answers to:  &#42; Is there a way to show the stock available in a product list?  &#42; Is it possible to display a link from the product in a list to the product page as a button rather than a hyperlink on the title?For number 2, I can't use the standard &quot;add to cart&quot; button as there are custom fields that need to be filled for each product and the &quot;add to cart&quot; button bypasses these fields. Can't seem to find anyway around this. The table view of the products is not what I want.  I have looked at the display &gt; views but can't find which one of the php files controls the product listing view.  Ideally I want to show a listing of the products in a given category as follows:  Product name, product price, quantity available, link to product page button  Thanks!")*

Totally awesome as always! Thanks so much!

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

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