how to freeze the product with the 0 quantity

  • Posts: 170
  • Thank you received: 7
4 years 4 months ago #313707

hi,
i want add custom CSS class to product with finished quantity. i want freeze (for example black/withe color or blur or other css effect) that product.
1-how to do that?
2-is it possible to add custom badge?

if these need where or what file maybe need to develop by me?

Last edit: 4 years 4 months ago by sadaf3d.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
4 years 4 months ago #313719

Hi,

1. I guess the best would be to modify the code in the file "show" of the view "product" via the menu Display>Views to add a check on the quantity to add a class to the main div of the product page.
The quantity of the product is stored in $this->element->product_quantity

2. You can go in the menu Products>Badges to configure a badge with a maximum quantity of 0 for that.

The following user(s) said Thank You: sadaf3d

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

  • Posts: 170
  • Thank you received: 7
4 years 4 months ago #313742

first of all thank you nicolas

nicolas wrote: Hi,

1. I guess the best would be to modify the code in the file "show" of the view "product" via the menu Display>Views to add a check on the quantity to add a class to the main div of the product page.
The quantity of the product is stored in $this->element->product_quantity.


i find my goal in line 133 in listing_div in view "product" but i get null when call $this->element->product_quantity. quantity in which variable?

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
4 years 4 months ago #313743

Hi,

listing_div is used on listings, while the product / show.php view file I was talking about is for the product details page.
In listing_div, the stock is stored in the variable $trow->product_quantity after the line:
foreach($this->rows as $row) {

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

Time to create page: 0.064 seconds
Powered by Kunena Forum