Re: zen cart Display the discount percentage on the sale badge
You can create a function ( if there is not one already in zencart)
PHP Code:
function tpl_display_discount_percentage($pID) {
return 100 - zen_round(zen_get_products_special_price($pID, true) / zen_get_products_base_price($pID) * 100, 0) . '%';
}
echo tpl_display_discount_percentage($_GET['products_id']);
The badge... not sure what you referring to
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
Bookmarks