Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012
    Posts
    1
    Plugin Contributions
    0

    Default How to display "soldout" icon in "new products" area?

    Originally I had our cart setup to disable and not show items when stock reached zero. Now I would like to have it setup to show the item as soldout, with no shopping cart add button. When I changed the settings to show a soldout icon it appears on the actual products page, and in the categories listing...but in the "new products" banner under the categories and at the bottom of the main page it does not show the soldout icon until the customer opens the specific product.

    I don't want to annoy my customers by clicking on items just to see they are sold out. However we do a lot of one-of-a-kind items and I like customers to see what sold recently so they can discuss getting a similar item.

    How can I get the soldout icon to appear in the "new products" area under the pic/description?

    Thank you for any help you can offer.
    (ps I searched and experimented for a few hours before posting this)

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How to display "soldout" icon in "new products" area?

    You could customize, using your templates and overrides, the file:
    /includes/modules/new_products.php

    and around line 71 add the code:
    Code:
        $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
        'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price . (zen_get_products_stock($new_products->fields['products_id']) <= 0 ? '<br>' . zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT) : ''));
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Replies: 4
    Last Post: 16 Oct 2011, 12:58 AM
  2. Display "Best Sellers" like "What's New" or "Specials" lists.
    By jsmooth in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Jun 2010, 12:06 AM
  3. How to remove ellipses ("...") after "All Products" and "New Products" on home page?
    By jthurman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 03:30 PM
  4. Inside the "Categories" box it says "New Products" and "All Products"...
    By john9 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Feb 2007, 07:55 AM
  5. how to display text link in "New Products"、"Featured Products"....?
    By boy123 in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 24 Dec 2006, 06:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR