Show product inventory

  • Posts: 2
  • Thank you received: 0
  • Hikashop Business
1 year 3 months ago #348522

-- url of the page with the problem -- : www.mason-lakeconservation.org/index.php...ry/24-50-tree-bundle
-- HikaShop version -- : 4.7.0
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4.33
-- Browser(s) name and version -- : Microsoft Edge

Is there a setting to show available inventory on product listings?

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 year 3 months ago #348525

Hi,

If you activate the display of the add to cart button on the listing (under the "products options" tab of the menu item), it will also display the stock there (if it's not unlimited).
Otherwise, if you want to add the stock, without adding the add to cart button there, you would have to edit the product / listing_img_title view file via the menu Display>Views and add such code where you want to display the stock:

<?php echo $this->row->product_quantity; ?> items in stock

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
  • Hikashop Business
1 year 3 months ago #348543

Thank you, Nicholas. If in the future I would like the Add to Cart button, but not the inventory to be visible, is that possible?

Is it possible to move the inventory count to a different location on the product listing?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 year 3 months ago #348550

Hi,

The code I gave can be moved easily anywhere in the view file to display it in a different location.

If you want the add to cart button and not the inventory, that's easier. Just activate the add to cart display setting of the menu item, and if you want to hide the stock, you can use a bit of CSS to hide it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum