Hi all,
just trying a small modification. Actually the plugin is working great, i would like to modify it so that if an article is out of stock (quantity = 0) an image is displayed instead of the price. In the old version of my site i have modified the file \includes\templates\YOUR_TEMPLATES\templates\tpl_product_info_display.php adding around lines 83 (after the // base price start) the following:
PHP Code:
//BOF No price if out of stock, show image instead
//echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
if ($products_quantity > 0) {
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
} else {
echo "<img src=images/esaurito.gif>";
}
//EOF No price if Out of stock, show images instead
I've done the same with the new version of my site (which have installed last version of DPU) but after displying the OUT OF STOCK image for a few second, DPU replace it with the price...
Before messing with DPU code I prefere to ask if someone have a good hint on how to have it work.
Thanks
Zencart 1.55e
DPU last version
Bookmarks