SOLVED: Show & hide product stock per product

  • Posts: 198
  • Thank you received: 7
7 years 2 months ago #277766

-- HikaShop version -- : 3.2.0

As far as i know it is not possible to hide product stock.

So i hide them with css. But for one product i want to show the stock level. I can't do this by CSS because there is no unique class or # thought?

By the way it would be an improvement is the stock level can be disabled for the front end. And even better default i the settings (show or hide) and a overwrite oer product.

Warm regards, René

Last edit: 7 years 2 months ago by renem.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #277767

Hello,

We can see to add an option to display the stock level but I prefer to be honest ; the feature to have that setting per product will be "too much".
It would be better to use a view override and put some code ; base on the product id or a product custom field that you'd create.

Customizing HikaShop :
www.hikashop.com/support/documentation/1...-display.html#layout

Setting "display view files" to see the view names that you can edit, directly in the HikaShop pages :
www.hikashop.com/support/documentation/5...g.html#advanced_main

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 198
  • Thank you received: 7
7 years 2 months ago #277830

I understand Jerome, but there is no way to make an exception via CSS for one product?

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #277841

Hi,

It must be possible on the product page with CSS yes.
However, I can't give a precise solution without a link to the page where you want to force the display for that product.
Please provide a link to the page you're talking about if you can't find the CSS you should be using.

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

  • Posts: 198
  • Thank you received: 7
7 years 2 months ago #277917

Hi Jerome,

This is a product where the stock level must been shown: Also on the detail page:

Product:

This message contains confidential information

Product detail page:
This message contains confidential information

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #277925

Hi,

You can add that CSS to force the display on the product page:
#hikashop_product_Seminars_37_page .hikashop_product_stock_count{ display: inline; }
And for the listing:
#div_hikashop_category_information_module__5 .hikashop_product_stock_count{ display: inline; }

If you look at the HTML of these areas with your web browser inspector, you can find these classes so that you can easily do that yourself for other products if necessary.
blog.thewcc.com/a-web-inspector-tutorial...ront-end-developers/

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

  • Posts: 198
  • Thank you received: 7
7 years 2 months ago #277977

Hi Nicolas,

I use inspector a lot, but i don't noticed that every product page has is own unique classes, perfect thank you.

Warm regards René

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

Time to create page: 0.057 seconds
Powered by Kunena Forum