Jamie,
I created an "Out of Stock" icon similar to the one's that come with SC. (New) (Sale) etc.
I know I had it working before, but cannot remember how to get that icon badge to appear when the inventory item is set to 0? Any ideas?
John
Jamie,
I created an "Out of Stock" icon similar to the one's that come with SC. (New) (Sale) etc.
I know I had it working before, but cannot remember how to get that icon badge to appear when the inventory item is set to 0? Any ideas?
John
Answered my own question...
http://www.ldev.com/forums/showthrea...+of+stock+icon
Jamie,
Is there a way to edit the code to display a custom badge when inventory of a stock item is set to 0?
You've shown me successfully how to implement when 'Hide Base Price' is selected, now would like to do when inventories reach zero (automatically of course)...
John
Hi John,
I didn't test this, but it should work. The product_thumbnail.tpl.php and product_detail.tpl.ph templates will display a badge if it is available in the $Badge_Image variable. If you add this to the top of those template files, it should work:
You'll need corresponding image files matching that file name in your theme's images folder.PHP Code:<?php if ($Number_in_Stock == 0) $Badge_Image = sc_img('badge_zero_stock_thumbnail'); ?>
Thanks,
Jamie
PHP shopping cart software - Squirrelcart
Please rate or review us!![]()
Hotscripts ● PHP Resource Index
As always, thank you for your quick and valuable feedback. It works!
How are you at fixing a 1995 Dodge Ram that keeps wanting to stall at low RPM's?
John
That's great!
Not very good I'm afraid. I can do some basic things - brakes, oil, change things like alternators, starters, plugs, etc... I don't know what I'm doing beyond easy stuff. Good luck with it!How are you at fixing a 1995 Dodge Ram that keeps wanting to stall at low RPM's
Thanks,
Jamie
PHP shopping cart software - Squirrelcart
Please rate or review us!![]()
Hotscripts ● PHP Resource Index
There are currently 1 users browsing this thread. (0 members and 1 guests)