Badges: "Out of Stock" when product_quantity = 0?

  • Posts: 27
  • Thank you received: 2
11 years 8 months ago #90372

Hi,

I would like a badge to appear on the product image when the product_quantity = 0. This badge could read "Out of Stock" or "Backorder". At the moment badges are assigned to categories -- would a conditional badge like this be difficult to implement?


Regards,


Ian P.
Griffin Grove Gaming
www.griffingrove.com.au

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #90564

Hi,

I think that the easiest way is to edit the views "product / listing_img_title" and "product / show_block_img" and add a if condition on the product quantity, and if the quantity = 0 so display a custom badge with the line:

$this->classbadge->placeBadges($this->image, $this->row->badges, 0, 0);
Where $badge is the objet with all the badge parameters.

The following user(s) said Thank You: ian.plumb

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

Time to create page: 0.044 seconds
Powered by Kunena Forum