Hikashop not in stock background color

  • Posts: 54
  • Thank you received: 7
2 years 9 months ago #340126

Hi,

Is it possible to change the product div background color in product listing page whenever the product is not in stock?

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
2 years 9 months ago #340131

Hi,

There is no option for that.
There are three things I can propose:
- You could just turn off the "out of stock" product display setting in your menu items.
- You could use the "badges" feature: www.hikashop.com/support/documentation/1...p-badge-listing.html
Badges have a stock quantity setting that you can set to "0" so that the badge will only display if the stock of the product is 0.
- You could edit the file product / listing_img_title via the menu Display>Views. There, you can find this line of code:

<div class="hikashop_listing_img_title" id="div_<?php echo $mainDivName.'_'.$this->row->product_id;  ?>">
You could try changing it to :
<div class="hikashop_listing_img_title<?php if($this->row->product_quantity == 0){ echo ' no_stock_class';} ?>" id="div_<?php echo $mainDivName.'_'.$this->row->product_id;  ?>">
So that you could use the no_stock_class class in your CSS to change the background color.

The following user(s) said Thank You: ismael

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

Time to create page: 0.053 seconds
Powered by Kunena Forum