Zen Cart Logo
Forums / General Questions / Change Call for prices image to text...

Change Call for prices image to text...

Locked

Views: 1,835

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
30 May 2009, 7:49 PM
#1
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Change Call for prices image to text...

Hi,
I'd like to change the call for prices button on my site, into text only.
Is there a bit of short code that would work easily?
I know the name of the image so can find it's location ok...
Thanks!

31 May 2009, 5:43 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Change Call for prices image to text...

You could use the handy dandy switch for that in the Configuration ... Product Info ...

Product Info - Price is Call for Price Image or Text Status
Product Info - Show the Price is Call for Price Image or Text on Displayed Price
0= Text
1= Image

31 May 2009, 6:36 AM
#3
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Re: Change Call for prices image to text...

Superb! Thanks.
I new I'd done it a couple of years ago, but was searching the wrong way to go about it this time round (obviously!)
Appreciated.

31 May 2009, 7:53 AM
#4
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Re: Change Call for prices image to text...

...on a similar question...
If I wanted that text to show up when "call for prices" is set to off, how could I do that.

I'd like to enable adding to cart, but show "hire price" below the cost...exactly where "call for prices" shows up if switched on.
Any ideas that might help?

( I could just type it in description of product, but it has a gap which makes it separated from price and I'd have to type it for 1000s of products...)

31 May 2009, 2:55 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Change Call for prices image to text...

The price display is managed in the functions_prices ...

The Call for Price is handled in:

    // If Call for Price, Show it
    if ($product_check->fields['product_is_call']) {
      if (PRODUCTS_PRICE_IS_CALL_IMAGE_ON=='0') {
        $call_tag = '<br />' . PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT;
      } else {
        $call_tag = '<br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_CALL_FOR_PRICE, PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT);
      }
    }

You could add an ELSE to that IF to display something when it is not Call for Price ...

31 May 2009, 6:33 PM
#6
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Re: Change Call for prices image to text...

Thanks Ajeh,
I'm not sure exactly how to do that sorry.
(I've got the file open of course no problem)

I've done a search around for examples but not sure if it's a quick edit or what to do.
Is it easy to type how it should look for me?

Many thanks

1 Jun 2009, 6:01 AM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Change Call for prices image to text...

I have not tested this but try:

    // If Call for Price, Show it
    if ($product_check->fields['product_is_call']) {
      if (PRODUCTS_PRICE_IS_CALL_IMAGE_ON=='0') {
        $call_tag = '<br />' . PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT;
      } else {
        $call_tag = '<br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_CALL_FOR_PRICE, PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT);
      }
    } else {
      $call_tag = '<br />' . 'Hello World';
    }

And on all products that are not Call for Price you should see: Hello World

1 Jun 2009, 6:49 AM
#8
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Re: Change Call for prices image to text...

That worked a treat thank you!!!!!!
Thanks for sharing your knowledge :)

1 Jun 2009, 2:35 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Change Call for prices image to text...

You are most welcome ... thanks for the update that this was able to work for you to post text on all products that are not set to Call for Price ... :smile: