Skip to main content

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

More
13 years 7 months ago #90372 by ian.plumb
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.

More
13 years 7 months ago #90564 by Xavier
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:
Code:
$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.203 seconds
Powered by Kunena Forum