Forums / General Questions / Call For Price Image

Call For Price Image

Results 1 to 6 of 6
13 Jul 2011, 15:19
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Call For Price Image

I'm writing a template file and I wanted to know if there is a way to make the "Call For Price" image NOT show up as an image but as plain text without editing the functions_prices.php file. (Especially since I plan on releasing this template to everyone. If it was just for me, I wouldn't mind.)

Does anyone have a suggestion?
13 Jul 2011, 15:37
#2
ajeh avatar

ajeh

Oba-san

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

Re: Call For Price Image

There is a setting 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
13 Jul 2011, 15:45
#3
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Call For Price Image

Ajeh:

There is a setting in the Configuration ... Product Info ...


Hmm... is there a way that I can "low-jack this so that it doesn't show the image? I trying not to make too many/any images at all with it. It's also causing an unsightly <br /> to be used.
13 Jul 2011, 15:48
#4
ajeh avatar

ajeh

Oba-san

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

Re: Call For Price Image

That <br /> is added to both the image and the text in the functions file:
/includes/functions/functions_prices.php

    // 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 would need to alter the code to change that ...

NOTE: function files do NOT use override files ...
13 Jul 2011, 15:52
#5
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Call For Price Image

Ajeh:


NOTE: function files do NOT use override files ...


Okay this leads to the next idea I had to get around it, that would be create a copy of the functions_prices.php code block, renaming the function that calls the price, using that to call the price instead. It's a bit much, but that's all I got. I'm trying really hard to make this a "drag and drop" kind of installation and don't feel its fair to ask anyone using this edit their core files solely to use this template.

Also thanks Ajeh for your help in this.
13 Jul 2011, 16:04
#6
ajeh avatar

ajeh

Oba-san

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

Re: Call For Price Image

I am not keen on renaming functions ... especially functions that are used everywhere ...

The change you need is pretty simple ... I'd go for just changing the original file and mark the code that you have changed it ... or, to add the change to your install read me ...