Forums / Templates, Stylesheets, Page Layout / small sold out image on ... product listing page?

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

Locked

Views: 1,196

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
14 Jul 2010, 1:32 PM
#1
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

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.php?main_page=index&cPath=3

Hope this question makes sense, appreciate your time.

Cheers!

15 Jul 2010, 2:32 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

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

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

    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 {
[B]        $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);[/B]
      }
      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

23 Jul 2010, 12:37 AM
#3
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

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/index.php?main_page=index&cPath=7&zenid=1924a6a4a1b5838e7add466392ffc4b3

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. ;)

23 Jul 2010, 6:54 PM
#4
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

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

23 Jul 2010, 7:21 PM
#5
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

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!

23 Jul 2010, 8:19 PM
#6
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

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

23 Jul 2010, 8:31 PM
#7
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

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. :)