Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

Modifying Call For Price

Locked

Started by sublime19 on 25 Jun 2009, 4:53 PM · Views: 1,293

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
25 Jun 2009, 4:53 PM
#1
sublime19 avatar

sublime19

New Zenner

Join Date:
Aug 2008
Posts:
32
Plugin Contributions:
0

Post #1 by sublime19

We want to offer special discount coupons for people that call us for better pricing per MAP policies. It says the customer has to initiate a phone call to us before we can sell the product online for a cheaper price than MSRP. We want to use the Call for Price to achieve this, but still have it available for sale at the MSRP.

I have gone into
/includes/functions/functions_general.php
and commented out the case for call for price replaceing the add to cart.

on
includes/templates/template_default/templates/tpl_product_info_display.php
I added the code below right above the <!-- add to cart -->

<!--bof call for price -->
<?php
     
        $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
  
	if ($button_check->fields['product_is_call'] == '1'){
	$return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
	return $return_button;
	}
?>

<!--eof call for price -->

What version of Zen Cart are you using?1.38
Has your site been upgraded? When? From what version(s)? no
What addons have you installed? When? too many to list

link with call for price activated: link

Right now, there is no link to contact us showing up even with call for price enabled. I am pretty sure i am missing something, just not sure what.

25 Jun 2009, 8:56 PM
#2
sublime19 avatar

sublime19

New Zenner

Join Date:
Aug 2008
Posts:
32
Plugin Contributions:
0

Post #2 by sublime19

Update:

Thanks to TheOracle I have made progress.

This shows up under the price on product info

if (isset($button_check) && $button_check->fields['product_is_call'] == '1') { 
echo "<img src=\"https://www.acmelectronics.com/store/includes/templates/template_default/images/call_for_prices.jpg\"";
echo "<br><br>For a better price call<br>";
echo "<h4>1-877-233-0173</h4>";

Viewed on any Listen Products

I would like this to work where ever price shows up. Such as New Products, Linked products, etc.

Is there one location where I can add my code to show up if Call for price is enabled? We want this to show up under the price each time it is displayed if call for price is enabled.