Forums / Templates, Stylesheets, Page Layout / Replace "Call for price" text links with image button, how?

Replace "Call for price" text links with image button, how?

Locked

Views: 4,507

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
17 Aug 2006, 9:45 AM
#1
torgil avatar

torgil

New Zenner

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

Replace "Call for price" text links with image button, how?

Hi all!

Working through the files....
I want to replace the "Call for price" text link that shows in product info pages and product list if a product is call for price.
However, this seems more complex than I first thought. Replacing the "More info" text link for product with price-affecting attributes was no problem, but the only place I can find any reference at all to call for price is in functions_prices.php which is not in the override system... I'm designing for template so I want all modifications to stay off of the core files. Anyone has any creative ideas?

7 Sep 2006, 6:37 PM
#2
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Replace "Call for price" text links with image button, how?

Just done this.

In product listing change the following lines round about 173:

$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

to:

$the_button = $lc_button; {
if ($listing->fields['product_is_call'] == 1 ){
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . YOUR_CALL_PRICE_IMG . '</a>';
} else {

      $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; }

Set up the new define for YOUR_CALL_PRICE_IMAGE in includes/languages/yourtemplate/english.php eg:

define('MORE_INFO_CART_IMG','<img src="includes/templates/yourtemplate/images/callprice.gif" alt="Call for price" />');

I also changed the define:

define('TEXT_CALL_FOR_PRICE','');

but you could use that for the image if you wanted. Not sure whether you wanted that as well. You posted a while ago but in case you or someone else has the same query, hope that helps.