Guest Posted June 14, 2004 Share Posted June 14, 2004 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? Link to comment Share on other sites More sharing options...
GNA Posted June 15, 2004 Share Posted June 15, 2004 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. GNA Easy Populate Assistant Link to comment Share on other sites More sharing options...
mafiouso Posted February 20, 2011 Share Posted February 20, 2011 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 Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted February 20, 2011 Share Posted February 20, 2011 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 ======>>>>>. Link to comment Share on other sites More sharing options...
maxemus Posted March 1, 2011 Share Posted March 1, 2011 Ok I installed this and all my prices went to 0.00........... something is missing Link to comment Share on other sites More sharing options...
maxemus Posted March 1, 2011 Share Posted March 1, 2011 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. Link to comment Share on other sites More sharing options...
maxemus Posted March 3, 2011 Share Posted March 3, 2011 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 Link to comment Share on other sites More sharing options...
jeffgrant Posted March 13, 2011 Share Posted March 13, 2011 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. Link to comment Share on other sites More sharing options...
Xpajun Posted March 13, 2011 Share Posted March 13, 2011 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 Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2011 Share Posted June 10, 2011 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: Link to comment Share on other sites More sharing options...
vaviv Posted August 7, 2011 Share Posted August 7, 2011 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?? Link to comment Share on other sites More sharing options...
maxemus Posted September 28, 2011 Share Posted September 28, 2011 Don't you think the cart buttons should be removed? How would someone make this transaction. Link to comment Share on other sites More sharing options...
kelly236 Posted February 29, 2012 Share Posted February 29, 2012 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 Link to comment Share on other sites More sharing options...
kelly236 Posted February 29, 2012 Share Posted February 29, 2012 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://www.oscommerce.com/forums/topic/368582-call-for-price-in-new-productsphp-module/ Link to comment Share on other sites More sharing options...
midiman2525 Posted March 6, 2012 Share Posted March 6, 2012 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? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.