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

#   display product stock count in category listing as custom filed

##

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

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 3 months ago [\#362433](#362433) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362433 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")* was created by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.1.2
-- PHP version -- : 8.1.13
-- Browser(s) name and version -- : firefox

Hi,
How can display the "Quantity" of a product as a custom field in categories listing each product in a specific category?
I use product stock count phrases from the mentioned code. Code:

&lt;!-- STOCK MESSAGE --&gt; &lt;?php $stock_class = ($stock != 0) ? "" : " hikashop_product_no_stock"; ?&gt; &lt;span class="hikashop_product_stock_count&lt;?php echo $stock_class; ?&gt;"&gt; &lt;?php if(!empty($this-&gt;row-&gt;product_stock_message)) echo JText::sprintf($this-&gt;row-&gt;product_stock_message, $stock); elseif($stock &gt; 0) echo (($stock == 1 &amp;&amp; JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') ? JText::sprintf('X_ITEM_IN_STOCK', $stock) : JText::sprintf('X_ITEMS_IN_STOCK', $stock)); elseif(!$in_stock) echo JText::_('NO_STOCK'); ?&gt; &lt;/span&gt; &lt;!-- EO STOCK MESSAGE --&gt;

Thanks in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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
-
-

2 years 3 months ago [\#362437](#362437) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362437 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hello,

We are very sorry for this answer but we aren't sure to understand your needs, and what you want to achieved really sorry for this!
Can you elaborate more through concrete case, annotated screenshot or any elements that can help us to better understand your needs and precisely the context.

Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 3 months ago [\#362450](#362450) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  Replied by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362450 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hi,
I apologize if I can't tell you what I need, sorry for that.
[ ![quantity.png](/forum/attachment/59567) ](/forum/attachment/59567 "quantity.png")

I need to display the "Quantity" amount in the product on the category product listing page. when you enter a number in the Quantity field it displays on the product page on the cart box,
[ ![q2.png](/forum/attachment/59568) ](/forum/attachment/59568 "q2.png")

I need to display it on the product category page too.
The thing that I ask is, Is it possible to load the quantity amount from Hikashop "Custom filed" items? cause if it could be loaded from a custom field we have the access to display it in any product or category that we need.

Best regards

- [ ![quantity.png](/forum/attachment/59567) ](/forum/attachment/59567 "quantity.png") [ ](/forum/attachment/59567?download=1 "quantity.png")
- [ ![q2.png](/forum/attachment/59568) ](/forum/attachment/59568 "q2.png") [ ](/forum/attachment/59568?download=1 "q2.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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
-
-

2 years 3 months ago -  2 years 3 months ago [\#362451](#362451) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362451 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hello,

Can you add an **Url link** in order to see the context?
**Note :** You can use, if required our **[ Contact us](https://www.hikashop.com/support/contact-us.html)** form, just don't forget to **add an Url link to this topic** in your message.
Regards

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 3 months ago [\#362462](#362462) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  Replied by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362462 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hi,
Links have been sent by Contact Us form.
Thanks in advance
Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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
-
-

2 years 3 months ago -  2 years 3 months ago [\#362464](#362464) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362464 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hello,

Have you tried the quantity field option directly in your Item Menu options?
more precisely in **Menus** =&gt; **Menu principal**, then click on the relative **Item Menu** (your product listing)
And in **Products options** tab
[ ![alt](https://i.ibb.co/z6vYQSW/image.png) ](https://i.ibb.co/z6vYQSW/image.png "alt")

Regards

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 3 months ago [\#362470](#362470) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  Replied by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362470 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hi,
Nothing is displayed on the product category listing page.
Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86323
- Thank you received: 14285
-
-

2 years 3 months ago [\#362471](#362471) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[display product stock count in category listing as custom filed](/forum/31-development/908454-display-product-stock-count-in-category-listing-as-custom-filed#362471 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, How can display the &quot;Quantity&quot; of a product as a custom field in categories listing each product in a specific category? I use product stock count phrases from the mentioned code.  Thanks in advance")*

Hi,

So, if I understand correctly, what you want is to display the stock of the product on the products listing pages.

Based on how you configured HikaShop, and what I can see on your URLs, I think the best is to copy/paste the code from your first message here, to the product / listing_img_title view file, which you can edit via the menu Display&gt;Views of HikaShop.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50LzkwODQ1NC1kaXNwbGF5LXByb2R1Y3Qtc3RvY2stY291bnQtaW4tY2F0ZWdvcnktbGlzdGluZy1hcy1jdXN0b20tZmlsZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.121 seconds

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