Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2006
    Posts
    70
    Plugin Contributions
    0

    Default small sold out image on ... product listing page?

    Morning all!

    I'm wondering where the small sold out graphic is meant to be displayed (I'm referring to button_sold_out_sm.gif, not button_sold_out.gif) -- is it normally used on the product listing page? When I currently mark a product as sold out, the larger sold out graphic appears on the product page, but nothing happens to the listing on my product listing page. I'm not sure if sometime in the past we disabled that smaller sold out graphic or if I'm actually misunderstanding where it's normally meant to be used.

    Can someone please help clarify for me where it's used and whether there's perhaps a setting in the admin area that controls whether the smaller sold out graphic is used? I'd like it to appear on the product listing page when applicable and am not sure how to restore that functionality (if indeed that's its intended placement).

    Here's a link to our shop if it helps: http://www.preloved.ca/shop/index.ph...=index&cPath=3

    Hope this question makes sense, appreciate your time.

    Cheers!

  2. #2
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: small sold out image on ... product listing page?

    The file you reference is set to a define in includes\languages\english\button_names.php

    Code:
    define('BUTTON_IMAGE_SOLD_OUT_SMALL','button_sold_out_sm.gif');
    And you'll find that define used in the zen_get_buy_now_button() function in includes\functions\functions_general.php

    Code:
        case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
          if ($_GET['main_page'] == zen_get_info_page($product_id)) {
            $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
          } else {
            $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
          }
          break;
    These types of questions are easy to track down if you use a text editor that can search contents of a file. I highly recommend Notepad++ if you code in Windows.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  3. #3
    Join Date
    Feb 2006
    Posts
    70
    Plugin Contributions
    0

    Default Re: small sold out image on ... product listing page?

    Thanks Frank, I'd indeed found those two references, but am still not sure why the small sold out button doesn't appear alongside the product on my product listing page. I found an example of the small sold out image in use on someone else's site that seems to confirm that's the appropriate place for it.
    http://goodcans.com/HeadphoneStore/i...dd466392ffc4b3

    I think that changes were made at some point in the past to our store that prevented this from appearing, guess my only recourse is to get a fresh copy of Zen Cart and see what's supposed to be on my listing page that's gone missing somehow. Sigh. ;)

  4. #4
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: small sold out image on ... product listing page?

    The purpose of my post was to point out how the image was loaded and direct you to the files you need to edit.

    Create an override for includes/languages/english/button_names.php and then edit the define for BUTTON_IMAGE_SOLD_OUT_SMALL to match the image of your custom button.

    Place the image in your template's image directory, and you're done.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  5. #5
    Join Date
    Feb 2006
    Posts
    70
    Plugin Contributions
    0

    Default Re: small sold out image on ... product listing page?

    Thanks Frank, I follow what you're saying and appreciate the further clarification. The two files you indicate do contain the correct code & values on my end. The issue isn't that I'm using a custom button, even the regular small sold out button won't appear. The big one shows up on the item page but the small one doesn't appear alongside the corresponding item on the listing page.

    Sorry if I'm just being daft here, I did just drink a strong coffee so I'm actually as sharp as possible for a Friday afternoon, which isn't saying much. I'll keep digging and will be sure to post the resolution even if it makes me look bad. :)

    Cheers!

  6. #6
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: small sold out image on ... product listing page?

    Actually, maclean, *I'm* the one who's daft. I reread your posts and realized I completely misunderstood what you wanted. My bad.

    What value do you have set in Admin > Configuration > Stock > Show Sold Out Image in place of Add to Cart
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  7. #7
    Join Date
    Feb 2006
    Posts
    70
    Plugin Contributions
    0

    Default Re: small sold out image on ... product listing page?

    It's set to 1 = on.

    Misunderstanding totally understandable, no worries, this is tricky to describe especially since I suspect someone on our end broke (ahem, "customized") something and didn't use the override system nor comment their code -- at the end of the day I'd wager at best this thread can be a cautionary tale about sloppy work. :)

 

 

Similar Threads

  1. v151 Hide Normalprice for sold out products & in product listing page ONLY!
    By Green Books in forum General Questions
    Replies: 1
    Last Post: 4 Oct 2015, 06:06 PM
  2. Sold Out image on product listing
    By Theo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Oct 2011, 03:46 PM
  3. Hide Sold out product from Product Listing page
    By needsome in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 May 2011, 06:49 PM
  4. product listing remove sold out image
    By restless in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Mar 2009, 02:18 AM
  5. product listing 'sold out' image is missing!
    By notrub225 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Sep 2006, 02:04 AM

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