Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Can I show the Call to Order and Out of Stock buttons together?

Can I show the Call to Order and Out of Stock buttons together?

Locked

Started by nsanford on 9 Aug 2010, 12:19 AM · Views: 581

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
9 Aug 2010, 12:19 AM
#1
nsanford avatar

nsanford

New Zenner

Join Date:
Dec 2007
Posts:
69
Plugin Contributions:
1

Post #1 by nsanford

Hi,
Is there any way to show the "Call for Price" and "Sold Out" (if out of stock) buttons together? The store is set to show out of stock items.

I tried adding the following to the function zen_get_buy_now_button in functions_general.php but nothing changed. Any help would be appreciated :)

    case ($button_check->fields['product_is_call'] == '1' && ($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) .'<br /><a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      } else {
        $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT).'<br /><a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      }
      break;
9 Aug 2010, 3:33 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

If you have the show sold out turned on in the Stock Settings, you can change that function to read:

    case ($button_check->fields['product_is_call'] == '1'):
      $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
      if ($button_check->fields['products_quantity'] <= 0) {
        $return_button .= '<br />' . zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
      }
      break;

And you would see the:
Call for Price
Sold Out

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!]
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!

9 Aug 2010, 4:04 AM
#3
nsanford avatar

nsanford

New Zenner

Join Date:
Dec 2007
Posts:
69
Plugin Contributions:
1

Post #3 by nsanford

Brilliant! Thanks Ajeh, that did the trick :)

9 Aug 2010, 4:12 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

You are most welcome ...

My example used the small sold out images rather than the large ... you can always use a custom image for that or the large image ...

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!]
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!