Guest Posted March 2, 2004 Share Posted March 2, 2004 Basically i have several items in my shop which dosen't have a fixed price. So i would like to show price as "Call us for price" instead of 0.00 - is this possible? thanx Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2004 Share Posted March 2, 2004 anyone? <_< Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 2, 2004 Share Posted March 2, 2004 Check the contributions section for "Free call for price" to do this. Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2004 Share Posted March 5, 2004 i could be dump or blind but i can't find it :( Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 5, 2004 Share Posted March 5, 2004 The search function in there isn't terribly useful, is it? http://www.oscommerce.com/community/contri...ons,134/page,11 Hope this helps! Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2004 Share Posted March 9, 2004 lol thanks - and no that search function seem to find anything NOT related to what you search for? lol could be me, but i couldnt figure out what exactly it searches for. Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 9, 2004 Share Posted March 9, 2004 It seems to me that it's searcing on "or" instead of "and" - and returning results based on the last update. I've tried using the same syntax as the forums and searching for +word +otherword but that doesn't work...I usually just resort to searching through it manually. FYI - if all you want is to say "call for price" there's an easier way to do it in the documentation somewhere...that contribution gives you lots of options but I've found it to be too complicated for my needs. Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2004 Share Posted March 9, 2004 Well yeah i ws just looking over the details thinking...theres gotta be an easier way to do this? so if anyone could point me in the general direction of where i can find some info about this - i would be very greatful Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 9, 2004 Share Posted March 9, 2004 The general direction would be up and to the right - the link that says "collaborative documentation effot." I know it's in there, I've seen it. Basically what you want to do is edit your currencies class...find the function that returns the currency and change it to be: if($price<=0){ return "Call for price!" }else{ do the rest of the function } Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2004 Share Posted March 9, 2004 yeah i found how to disable prices and that mentioned the currencies.php so i was just about to have a look in that :) but ty for confirming my thought :) Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2004 Share Posted March 9, 2004 ////// Class to handle currencies // TABLES: currencies class currencies { var $currencies; // class constructor function currencies() { $this->currencies = array(); $currencies_query = tep_db_query("select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES); while ($currencies = tep_db_fetch_array($currencies_query)) { $this->currencies[$currencies['code']] = array('title' => $currencies['title'], 'symbol_left' => $currencies['symbol_left'], 'symbol_right' => $currencies['symbol_right'], 'decimal_point' => $currencies['decimal_point'], 'thousands_point' => $currencies['thousands_point'], 'decimal_places' => $currencies['decimal_places'], 'value' => $currencies['value']); } } // class methods function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') { global $currency; if (empty($currency_type)) $currency_type = $currency; if ($calculate_currency_value == true) { $rate = (tep_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value']; $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right']; // if the selected currency is in the european euro-conversion and the default currency is euro, // the currency will displayed in the national currency and euro currency if ( (DEFAULT_CURRENCY == 'EUR') && ($currency_type == 'DEM' || $currency_type == 'BEF' || $currency_type == 'LUF' || $currency_type == 'ESP' || $currency_type == 'FRF' || $currency_type == 'IEP' || $currency_type == 'ITL' || $currency_type == 'NLG' || $currency_type == 'ATS' || $currency_type == 'PTE' || $currency_type == 'FIM' || $currency_type == 'GRD') ) { $format_string .= ' <small>[' . $this->format($number, true, 'EUR') . ']</small>'; } } else { $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right']; } return $format_string; } function is_set($code) { if (isset($this->currencies[$code]) && tep_not_null($this->currencies[$code])) { return true; } else { return false; } } function get_value($code) { return $this->currencies[$code]['value']; } function get_decimal_places($code) { return $this->currencies[$code]['decimal_places']; } function display_price($products_price, $products_tax, $quantity = 1) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } ?> Hm... theres no if($price<=0{ or do i have to add it somewhere? if thats the case where lol? Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 9, 2004 Share Posted March 9, 2004 Yes, you have to add it in. function display_price($products_price, $products_tax, $quantity = 1) { ? ? ?return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); ? ?} This is the function that displays the price. function display_price($products_price, $products_tax, $quantity = 1) { ? ? ?if ($products_price > 0){ ? ? ? ?return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); ? ? ?} ? ?} This function only returns the price if the price is greater than 0 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!"; ? ? ?} ? ?} This returns the price if it's greater than 0, or "Call for price!" if it's not. And actually it appears I was wrong about it being in the documentation - there is a section on disabling prices for guests, but not for 0 prices. Perhaps this should be added? Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2004 Share Posted March 10, 2004 Well i think it should be added - however did you try out this code..because i cant get it to work? Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2004 Share Posted March 10, 2004 Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /usr/www/xxx/public_html/clients/novitex/shop/includes/classes/currencies.php on line 78 Fatal error: Cannot instantiate non-existent class: currencies in /usr/www/xxx/public_html/clients/novitex/shop/includes/application_top.php on line 258 Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2004 Share Posted March 10, 2004 Add another closing curly bracket } at the end :P Matti Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2004 Share Posted March 10, 2004 did i mention i love you guys :D thank you that did the trick! This should get added to the documentation - i'm sure others could use this fucntion. Link to comment Share on other sites More sharing options...
killthecat Posted March 12, 2004 Share Posted March 12, 2004 I have installed de module (http://www.oscommerce.com/community/contributions,134/page,11) but now I get a error message: "http://www.oscommerce.com/community/contributions,134/page,11" Can you help me? Killthecat Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 12, 2004 Share Posted March 12, 2004 That's not much information, man. What error message? When loading which file? Under which circumstances? Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
killthecat Posted March 13, 2004 Share Posted March 13, 2004 Sorry, I didn?t put the error message in my last post. That happen when I go at the URL. (www.mydomain.com) Simply I get the following error message. Fatal error: Call to undefined function: clean_html_comments() in /export/web17/alpha/deofi001/www/catalog/includes/functions/html_output.php on line 124 I?ve installed this module (I have installed de module (http://www.oscommerce.com/community/contributions,134/page,11) -Free Call For Price- Can you help me? killthecat Link to comment Share on other sites More sharing options...
killthecat Posted March 13, 2004 Share Posted March 13, 2004 By the way, Also I?ve tried with patch 3.1 and then with the patch 3.2 and the mistake doen?t disappear. I?ve edited the file /functions/html_output.php to see the line 124, but... THIS LINE IS EMPTY! Link to comment Share on other sites More sharing options...
Chris Dunning Posted March 13, 2004 Share Posted March 13, 2004 "Call to undefined function" means exactly that - your code is trying to use a function that's not define anywhere. This means you either forgot to add that part of the code in, or you did not "include" or "require" the proper files. Go through the install directions for that mod again and make sure you did everything. If it's telling you line 124 is bad but there's nothing on line 124, look at line 123 also. Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
cburd Posted March 15, 2004 Share Posted March 15, 2004 try using an earlier version. I believe that there are some serious errors in the 3.1 version go back to 1.0 and it should work like a champ also make sure you are using the right one for your download ie ms2.2 or cvs its imporant. hope this helps you. Link to comment Share on other sites More sharing options...
killthecat Posted March 15, 2004 Share Posted March 15, 2004 I?ve tried everything that you told me and nothing happen... Finally, I reinstalled the original osCommers codes and I made the changes by my self. Thanks a lot, Killthecat Link to comment Share on other sites More sharing options...
Steel Posted April 17, 2004 Share Posted April 17, 2004 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 just wanted to leave a note about the code above put up by BlueNoteMKVI. This works like a charm THANK YOU very much! I tried free-call for prices contrib version 1, 2, and 3 with and without the patches and it either didn't work right or just had an excess of what I needed. I never did get it to work at all, but who knows it might have worked if I spent hours and hours finding the problems and fixing them. Anyway, after seeing this code posted I decided not to bother with the free-call for prices contrib because, in this little snip of coding I had done pretty much all I had set out to do. The free-call for prices contrib is a good idea and I NEVER bash anybodys work that has been put out there for FREE because of just that, it was done for free and its put out there so everyone can benifit, although this contrib in my opinion needs alot of bugs worked out in it. So I would like to say Thank You! to all of the people who spend time helping out! Thank You BlueNoteMKVI Thank You Johnson and even though it didn't work, Thank You to the author of free-call for prices Also Thank You to all those who help out! Steel :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.