Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Change sold out image to button

Change sold out image to button

Views: 884

Results 1 to 3 of 3
26 Feb 2012, 12:37 PM
#1
akira avatar

akira

New Zenner

Join Date:
May 2004
Posts:
10
Plugin Contributions:
0

Change sold out image to button

Hello,

There is an option to show a "sold out" image if a product is out of stock. I would like to change that image and make it clickable with a link to my contact page. I've been searching the templates for the line of code where that images is generated, but I can't find it.
I hope anyone can help me out.

Thanks

26 Feb 2012, 1:43 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: Change sold out image to button

You can use your admin's Tools->Developers Tool Kit to determine what PHP file is generating the "sold out" button/text and make your modifications. Just search for BUTTON_IMAGE_SOLD_OUT in all catalog files.

26 Feb 2012, 1:55 PM
#3
akira avatar

akira

New Zenner

Join Date:
May 2004
Posts:
10
Plugin Contributions:
0

Re: Change sold out image to button

Thanks, that did the job.
For other people, I changed this code:

/includes/functions/functions_general.php
Line #1138 : $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
Line #1140 : $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);

To:

    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 = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' .zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT). '</a>';
      } else {
        $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' .zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT). '</a>';
      }