Badges: "Out of Stock" when product_quantity = 0?
13 years 7 months ago #90372
by ian.plumb
Regards,
Ian P.
Griffin Grove Gaming
www.griffingrove.com.au
Badges: "Out of Stock" when product_quantity = 0? was created 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?
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.
13 years 7 months ago #90564
by Xavier
Replied by Xavier on topic Badges: "Out of Stock" when product_quantity = 0?
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:
Where $badge is the objet with all the badge parameters.
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);
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.170 seconds