surfalot Posted November 21, 2006 Author Share Posted November 21, 2006 Warning: Missing argument 3 for display_price() in /home/quick05/public_html/includes/classes/currencies.php on line 73 I have this function in the default osC shop. file: includes/classes/currencies.php on line 73 could you post what your's looks like? function display_price($products_price, $products_tax, $quantity = 1) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } Quote Link to comment Share on other sites More sharing options...
quickspot Posted November 21, 2006 Share Posted November 21, 2006 I have this function in the default osC shop. file: includes/classes/currencies.php on line 73 could you post what your's looks like? function display_price($products_price, $products_tax, $quantity = 1) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } Hi, We have a monule called totalB2B and it seems that on line 73 there is many b2b stuff I dont know what to to with it. I could send u the complete php file iff u would like ? Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 21, 2006 Author Share Posted November 21, 2006 Hi,We have a monule called totalB2B and it seems that on line 73 there is many b2b stuff I dont know what to to with it. I could send u the complete php file iff u would like ? so your code in that file on line 73 is not a function display_price() ?? All I need to see it what you have for the display_price() function. Quote Link to comment Share on other sites More sharing options...
quickspot Posted November 21, 2006 Share Posted November 21, 2006 so your code in that file on line 73 is not a function display_price() ?? All I need to see it what you have for the display_price() function. I have in Currencies.php this on line 73 function display_price($products_id, $products_price, $products_tax, $quantity = 1) { Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 21, 2006 Author Share Posted November 21, 2006 I have in Currencies.php this on line 73 function display_price($products_id, $products_price, $products_tax, $quantity = 1) { Can you give me the rest of that function please. everything to the closing brace -> } Quote Link to comment Share on other sites More sharing options...
quickspot Posted November 21, 2006 Share Posted November 21, 2006 Can you give me the rest of that function please. everything to the closing brace -> } I have send u a mail Please check. I send u the php file to your mail adres Quote Link to comment Share on other sites More sharing options...
quickspot Posted November 21, 2006 Share Posted November 21, 2006 Can you give me the rest of that function please. everything to the closing brace -> } I have send u a mail Please check. I send u the php file to your mail adres Quote Link to comment Share on other sites More sharing options...
quickspot Posted November 23, 2006 Share Posted November 23, 2006 (edited) I have send u a mail Please check. I send u the php file to your mail adres Hi Surfalot, I understand that u would not repley on my mail that i send to u, so here is the complete php file the line is have past in red is line 73 ---------------------------------------------------------------------------------------------------------------- <?php /* $Id: currencies.php,v 1.16 2003/06/05 23:16:46 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License */ //// // 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']; } //TotalB2B start // function display_price($products_price, $products_tax, $quantity = 1) { function display_price($products_id, $products_price, $products_tax, $quantity = 1) { global $customer_id; $query_price_to_guest = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'ALLOW_GUEST_TO_SEE_PRICES'"); $query_price_to_guest_result = tep_db_fetch_array($query_price_to_guest); if (($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) { $query_guest_discount = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'GUEST_DISCOUNT'"); $query_guest_discount_result = tep_db_fetch_array($query_guest_discount); $customer_discount = $query_guest_discount_result['configuration_value']; if ($customer_discount >= 0) { $products_price = $products_price + $products_price * abs($customer_discount) / 100; } else { $products_price = $products_price - $products_price * abs($customer_discount) / 100; } return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } elseif (tep_session_is_registered('customer_id')) { $query_A = tep_db_query("select m.manudiscount_discount from " . TABLE_MANUDISCOUNT . " m, " . TABLE_PRODUCTS . " p where m.manudiscount_groups_id = 0 and m.manudiscount_customers_id = '" . $customer_id . "' and p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manudiscount_manufacturers_id"); $query_B = tep_db_query("select m.manudiscount_discount from " . TABLE_CUSTOMERS . " c, " . TABLE_MANUDISCOUNT . " m, " . TABLE_PRODUCTS . " p where m.manudiscount_groups_id = c.customers_groups_id and m.manudiscount_customers_id = 0 and c.customers_id = '" . $customer_id . "' and p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manudiscount_manufacturers_id"); $query_C = tep_db_query("select m.manudiscount_discount from " . TABLE_MANUDISCOUNT . " m, " . TABLE_PRODUCTS . " p where m.manudiscount_groups_id = 0 and m.manudiscount_customers_id = 0 and p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manudiscount_manufacturers_id"); if ($query_result = tep_db_fetch_array($query_A)) { $customer_discount = $query_result['manudiscount_discount']; } else if ($query_result = tep_db_fetch_array($query_B)) { $customer_discount = $query_result['manudiscount_discount']; } else if ($query_result = tep_db_fetch_array($query_C)) { $customer_discount = $query_result['manudiscount_discount']; } else { $query = tep_db_query("select g.customers_groups_discount from " . TABLE_CUSTOMERS_GROUPS . " g inner join " . TABLE_CUSTOMERS . " c on g.customers_groups_id = c.customers_groups_id and c.customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $customers_groups_discount = $query_result['customers_groups_discount']; $query = tep_db_query("select customers_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $customer_discount = $query_result['customers_discount']; $customer_discount = $customer_discount + $customers_groups_discount; } if ($customer_discount >= 0) { $products_price = $products_price + $products_price * abs($customer_discount) / 100; } else { $products_price = $products_price - $products_price * abs($customer_discount) / 100; } return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } else { return PRICES_LOGGED_IN_TEXT; } } function display_price_nodiscount($products_price, $products_tax, $quantity = 1) { global $customer_id; $query_price_to_guest = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'ALLOW_GUEST_TO_SEE_PRICES'"); $query_price_to_guest_result = tep_db_fetch_array($query_price_to_guest); if ((($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) || ((tep_session_is_registered('customer_id')))) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } else { return PRICES_LOGGED_IN_TEXT; } } //TotalB2B end } ?> Edited November 23, 2006 by quickspot Quote Link to comment Share on other sites More sharing options...
surfalot Posted November 25, 2006 Author Share Posted November 25, 2006 so to compensate for TotalB2B changing your display_price() function, you need to open the specials module: /catalog/includes/modules/product_specials.php and replace this: $currencies->display_price( in 2 places with this: $currencies->display_price($product_specials['products_id'], Quote Link to comment Share on other sites More sharing options...
quickspot Posted November 26, 2006 Share Posted November 26, 2006 so to compensate for TotalB2B changing your display_price() function, you need to open the specials module: /catalog/includes/modules/product_specials.php and replace this: $currencies->display_price( in 2 places with this: $currencies->display_price($product_specials['products_id'], Hi Surfalot, Many thanks word , it is working now. Quote Link to comment Share on other sites More sharing options...
newtech Posted December 1, 2006 Share Posted December 1, 2006 This contrib looks like exactly what I want. However, is there a way to limit how many special products are listed on the main page? Maybe my answer is obvious when I install the contrib, but I don't want to take the time to install it if I cannot limit how many products that show up on the main page. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 1, 2006 Author Share Posted December 1, 2006 yes, that is an admin option. Quote Link to comment Share on other sites More sharing options...
bgrcmodels Posted December 1, 2006 Share Posted December 1, 2006 I have been looking for this for ages. Many Thanks Ben Quote Link to comment Share on other sites More sharing options...
bgrcmodels Posted December 1, 2006 Share Posted December 1, 2006 Hello, Managed to install all ok, Just cant seem to get the Header Text Colour to change. Can someone advise how to do this ? Please see my site here: htp://www.bgrcmodels.com Thanks in advance Ben Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 1, 2006 Author Share Posted December 1, 2006 the install directions have you add to the TD.infoBoxHeading definition in your stylesheet.css. you need to modify that definition with the style you prefer for your shop. Quote Link to comment Share on other sites More sharing options...
bgrcmodels Posted December 1, 2006 Share Posted December 1, 2006 the install directions have you add to the TD.infoBoxHeading definition in your stylesheet.css.you need to modify that definition with the style you prefer for your shop. Yeh I installed it as stated in the manual. Dont understand it really, there must be something not quite right Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 1, 2006 Author Share Posted December 1, 2006 Yeh I installed it as stated in the manual. Dont understand it really, there must be something not quite right it should look like this TD.infoBoxHeading, /* BOF: Added for Links in Infobox Headings */ TD.infoBoxHeading A, TD.infoBoxHeading A:hover { /* EOF: Added for Links in Infobox Headings */ font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #bbc3d3; color: #ffffff; } are you not understanding how css works or are you changes not affecting the look of the specials infobox title? Quote Link to comment Share on other sites More sharing options...
bgrcmodels Posted December 2, 2006 Share Posted December 2, 2006 it should look like this TD.infoBoxHeading, /* BOF: Added for Links in Infobox Headings */ TD.infoBoxHeading A, TD.infoBoxHeading A:hover { /* EOF: Added for Links in Infobox Headings */ font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #bbc3d3; color: #ffffff; } are you not understanding how css works or are you changes not affecting the look of the specials infobox title? No I understand, I have that exact code, it just does not seem to change the text displayed. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 2, 2006 Author Share Posted December 2, 2006 No I understand, I have that exact code, it just does not seem to change the text displayed. then the standard osCommerce infobox css class is not being used. you need to find out what class is being used and change that in your style sheet. contrib directions are merly suggested changes, if your shop is modifed, you have to adjust for it when adding more contributions. if you view the code from your browser around your specials infobox you will find a class="something" inside the TD of the table structure. That is the class you need to modify in your style sheet. Quote Link to comment Share on other sites More sharing options...
bgrcmodels Posted December 2, 2006 Share Posted December 2, 2006 Thank You, It is working correcly now :) Quote Link to comment Share on other sites More sharing options...
newtech Posted December 4, 2006 Share Posted December 4, 2006 I am having a problem with the CSS for my new Special Box on the main page. I am using Design Pack. The css for right column specials box is: TD.SpecialsBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #FF0000; color: #ffffff; So, I have inserted this class in <td class="SpecialsBoxHeading"><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_SPECIALS); ?></td> the three areas where the new Product_Specials code appears. However the table box heading color and text does not show the css colors. I should mention the default infobox header background color is gold and this is what the Product Specials header shows as the background, but the text is black, not the default white. So the Product Specials table is not picking up the SpecialsBoxHeading or all of the default infobox css. What am I doing wrong to the specials box to have the customized colors. P.S. The specials box in the right column displays properly. Quote Link to comment Share on other sites More sharing options...
newtech Posted December 5, 2006 Share Posted December 5, 2006 <td class="SpecialsBoxHeading"><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_SPECIALS); ?></td> Any reason why this should not work if I have that class defined in my stylesheet? I use the same class on the right column specials box and it works fine, but does not work for the specials box in the main section. Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 5, 2006 Author Share Posted December 5, 2006 Any reason why this should not work if I have that class defined in my stylesheet? I use the same class on the right column specials box and it works fine, but does not work for the specials box in the main section. that's because the TD you are putting that class="" statement in is not the TD that contains the text. that TD contains another table. You need to view your source from the browser. Then you can see what css class name is being used by the infoBox php class. Quote Link to comment Share on other sites More sharing options...
newtech Posted December 5, 2006 Share Posted December 5, 2006 that's because the TD you are putting that class="" statement in is not the TD that contains the text. that TD contains another table. You need to view your source from the browser. Then you can see what css class name is being used by the infoBox php class. I have different classes for my infoboxes based upon the infobox. For example the Reviews box on the right column is green header and border. The specials box on the right is red border and header. All other boxes are gold border and header with white lettering. I want the specials box in the main section to be red border and red heading with white lettering. Currently it is gold border and header with black lettering. So, it needs it's own CSS. How can I do this? Quote Link to comment Share on other sites More sharing options...
surfalot Posted December 5, 2006 Author Share Posted December 5, 2006 I keep trying to tell you what to look for, but it's just not happening. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.