+ Reply to Thread
Results 1 to 6 of 6

Thread: Out Of Stock Icon

  1. #1
    Client
    Join Date
    Mar 2006
    Location
    Ontario, Canada
    Posts
    294
    Squirrelcart version
    v3.4.0

    Out Of Stock Icon

    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

  2. #2
    Client
    Join Date
    Mar 2006
    Location
    Ontario, Canada
    Posts
    294
    Squirrelcart version
    v3.4.0

    Oops...


  3. #3
    Client
    Join Date
    Mar 2006
    Location
    Ontario, Canada
    Posts
    294
    Squirrelcart version
    v3.4.0

    Similar Code for Inventory Control

    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

  4. #4
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    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:

    PHP Code:
    <?php if ($Number_in_Stock == 0$Badge_Image sc_img('badge_zero_stock_thumbnail'); ?>
    You'll need corresponding image files matching that file name in your theme's images folder.

  5. #5
    Client
    Join Date
    Mar 2006
    Location
    Ontario, Canada
    Posts
    294
    Squirrelcart version
    v3.4.0
    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

  6. #6
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Quote Originally Posted by designwerks View Post
    As always, thank you for your quick and valuable feedback. It works!
    That's great!

    How are you at fixing a 1995 Dodge Ram that keeps wanting to stall at low RPM's
    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!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts