Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest

Previous posting regarding price = "$0.00"

Recommended Posts

Guest

I have looked for nearly an hour trying to find a very helpful old posting that helped me to insert a phrase into the site when the price="$0.00." I need help again on how to do this. I am trying to have the phrase "Call for pricing." appear when the price=0 instead of the pages displaying "$0.00." How do I do this and still have everything else work?

Share this post


Link to post
Share on other sites

Change ?0 to POA

 

Found a topic in the forum that worked so well with a minor chance to currencies.php

 

Change this in catalog/includes/classes/currencies.php

 

 

QUOTE

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}

 

 

 

to this:

 

 

QUOTE

function display_price($products_price, $products_tax, $quantity = 1) {

if ($products_price > 0){

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}else{

return "Call for price!";

}

}

 

 

 

I changed the "call for price" to "POA" and it works like a dream.

 

If you get errors with this add another } at the end of the script.

Share this post


Link to post
Share on other sites

can some one tell me whats wrong here i get this error

 

Parse error: syntax error, unexpected T_STRING in /home/hwc/public_html/shop/includes/classes/currencies.php on line 76

 

line : CALL_FOR_PRICE_VALUE to -1.

 

thanks

Share this post


Link to post
Share on other sites

Might be able to if you post lines 70 to 80.

 

G


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Ok I installed this and all my prices went to 0.00........... something is missing

Share this post


Link to post
Share on other sites

Good thing its not on a live store since I took out the code and they are still 0 even in some places in the admin.

Share this post


Link to post
Share on other sites

Good thing its not on a live store since I took out the code and they are still 0 even in some places in the admin.

Buller

Share this post


Link to post
Share on other sites

can some one tell me whats wrong here i get this error

 

Parse error: syntax error, unexpected T_STRING in /home/hwc/public_html/shop/includes/classes/currencies.php on line 76

 

line : CALL_FOR_PRICE_VALUE to -1.

 

thanks

 

I too had the same problem. However, under close scrutiny you will notice that this line is in fact part of the comment line above it. So you can either comment it out with // at the beginning of the line or simply pres DEL a few times until it becomes part of the previous line.

Share this post


Link to post
Share on other sites

Have a look at this post especially if you are using 2.3


My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Share this post


Link to post
Share on other sites
Guest

Hello,

 

I installed the Easy Call for Price on osCommerce 2.3.1 http://addons.oscommerce.com/info/7787.

 

The contribution functions. However, products which have a special price have call for price (struck through) and the sale price displayed.

 

See screenshot:

 

Capture.JPG

Share this post


Link to post
Share on other sites

i try to install the Easy Call for Price 2.3.1-Ver1.1 and i have 3 problems

 

1. In catalog/product_info.php

 

i can find

 

<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>

 

but i have

<div class="fl_right" align="right"><div class="bg_button22" onMouseOut="this.className='bg_button22';" onMouseOver="this.className='bg_button22-act';"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></div></div>

 

</div>

 

 

 

 

2. In catalog/includes/modules/product_listing.php

 

i cant find

 

case 'PRODUCT_LIST_BUY_NOW':

$prod_list_contents .= ' <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';

break;

but i have

 

case 'PRODUCT_LIST_BUY_NOW':

$p_button = $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now1.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';

break;

 

and

 

3.In catalog/products_new.php

 

 

i can find

 

<td align="right" valign="middle" class="smallText"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id'])); ?></td>

 

but i have

 

$products_price = '<span class="productSpecialPrice">'.$currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']).'').'</span>';

 

}

 

 

 

$p_price = $products_price;

 

 

 

$p_details = '<a class="bg_button2" onMouseOut="this.className=\'bg_button2\';" onMouseOver="this.className=\'bg_button2-act\';" href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a>';

 

$p_details_text = '<div class="bg_button2" onMouseOut="this.className=\'bg_button2\';" onMouseOver="this.className=\'bg_button2-act\';">' .tep_draw_button_top() . '<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '" id="tdb1" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-e"></span><span class="ui-button-text">'. IMAGE_BUTTON_DETAILS .'</span></a>' . tep_draw_button_bottom().'</div>';

 

 

 

$p_buy_now = '<a class="bg_button22" onMouseOut="this.className=\'bg_button22\';" onMouseOver="this.className=\'bg_button22-act\';" href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_in_cart.gif').'</a>';

 

$p_buy_now_text = '<div class="bg_button22" onMouseOut="this.className=\'bg_button22\';" onMouseOver="this.className=\'bg_button22-act\';">' .tep_draw_button_top() . '<a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'" id="tdb1" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-cart"></span><span class="ui-button-text">'. IMAGE_BUTTON_IN_CART .'</span></a>' . tep_draw_button_bottom().'</div>';

 

 

 

$button_posipion = $p_buy_now_text. ' ' .$p_details_text;

 

 

any idea??

Share this post


Link to post
Share on other sites

Hi everyone,

 

I was just wondering if someone could help me I'm trying to install this contribution, Call_for_Price_2.3.1_Ver1.1.1

 

The only problem I'm having is my currencies page when trying to make the change from

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

 

To

 

function display_price($products_price, $products_tax, $quantity = 1) {

// BOF: MOD - EASY CALL FOR PRICE 2.3.1v1.0

// return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

 

define ('CALL_FOR_PRICE_VALUE', 0);

// If you sell products for $0.00 and want to display "Call for Price!" for other products, set their price and the

CALL_FOR_PRICE_VALUE to -1.

if ($products_price > CALL_FOR_PRICE_VALUE){

return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

} else {

define ('TEXT_CALL_FOR_PRICE', 'TEXT_CALL_FOR_PRICE');

// You can set CALL_FOR_PRICE_TEXT to anything you want. Its style is determined by the page it is displayed on. Changes made here will be visible throughout your site.

return TEXT_CALL_FOR_PRICE;

// BOF: MOD - EASY CALL FOR PRICE 2.3.1v1.0

}

}

 

I get a blank white page, any idea why? Thanks to all in advance for any help or direction with this

 

Kelly

Share this post


Link to post
Share on other sites

I got it !!!!!

 

If anyone is having this problem I found a fix on the forum which worked for me, instead of making the top change use this to replace the change

 

function display_price($products_price, $products_tax, $quantity = 1) {

if ($products_price > 0){

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}else{

return "Call for price";

}

}

instead of all this;

 

function display_price($products_price, $products_tax, $quantity = 1) {

// BOF: MOD - EASY CALL FOR PRICE 2.3.1v1.0

// return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

 

define ('CALL_FOR_PRICE_VALUE', 0);

// If you sell products for $0.00 and want to display "Call for Price!" for other products, set their price and the

CALL_FOR_PRICE_VALUE to -1.

if ($products_price > CALL_FOR_PRICE_VALUE){

return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

} else {

define ('TEXT_CALL_FOR_PRICE', 'TEXT_CALL_FOR_PRICE');

// You can set CALL_FOR_PRICE_TEXT to anything you want. Its style is determined by the page it is displayed on. Changes made here will be visible throughout your site.

return TEXT_CALL_FOR_PRICE;

// BOF: MOD - EASY CALL FOR PRICE 2.3.1v1.0

}

}

 

It's working great for me all credit goes to this post and the great people on it,

 

http://forums.oscommerce.com/topic/368582-call-for-price-in-new-productsphp-module/

Share this post


Link to post
Share on other sites

i try to install the Easy Call for Price 2.3.1-Ver1.1 and i have 3 problems

 

1. In catalog/product_info.php

 

i can find

 

<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>

 

but i have

 

<div class="fl_right" align="right"><div class="bg_button22" onMouseOut="this.className='bg_button22';" onMouseOver="this.className='bg_button22-act';"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></div></div>

 

</div>

 

 

 

 

2. In catalog/includes/modules/product_listing.php

 

i cant find

 

case 'PRODUCT_LIST_BUY_NOW':

$prod_list_contents .= ' <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';

break;

 

but i have

 

case 'PRODUCT_LIST_BUY_NOW':

$p_button = $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now1.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';

break;

 

 

and

 

3.In catalog/products_new.php

 

 

i can find

 

<td align="right" valign="middle" class="smallText"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id'])); ?></td>

 

 

but i have

 

$products_price = '<span class="productSpecialPrice">'.$currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']).'').'</span>';

 

}

 

 

 

$p_price = $products_price;

 

 

 

$p_details = '<a class="bg_button2" onMouseOut="this.className=\'bg_button2\';" onMouseOver="this.className=\'bg_button2-act\';" href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a>';

 

$p_details_text = '<div class="bg_button2" onMouseOut="this.className=\'bg_button2\';" onMouseOver="this.className=\'bg_button2-act\';">' .tep_draw_button_top() . '<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '" id="tdb1" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-e"></span><span class="ui-button-text">'. IMAGE_BUTTON_DETAILS .'</span></a>' . tep_draw_button_bottom().'</div>';

 

 

 

$p_buy_now = '<a class="bg_button22" onMouseOut="this.className=\'bg_button22\';" onMouseOver="this.className=\'bg_button22-act\';" href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_in_cart.gif').'</a>';

 

$p_buy_now_text = '<div class="bg_button22" onMouseOut="this.className=\'bg_button22\';" onMouseOver="this.className=\'bg_button22-act\';">' .tep_draw_button_top() . '<a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'" id="tdb1" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-cart"></span><span class="ui-button-text">'. IMAGE_BUTTON_IN_CART .'</span></a>' . tep_draw_button_bottom().'</div>';

 

 

 

$button_posipion = $p_buy_now_text. ' ' .$p_details_text;

 

 

 

any idea??

 

I,m having the same problems. How did everyone else get it to work?

Share this post


Link to post
Share on other sites

×