kalimbra Posted April 16, 2008 Posted April 16, 2008 Bonjour, Hello, I just finish to install some contribs on a new OScommerce (MS2.2 VF). All goes well, but the last one, XSELL, cause an error on the product_info.php Warning: Missing argument 3 for display_price() in c:\program files\easyphp1-8\www\acasline2\includes\classes\currencies.php on line 72 Warning: Missing argument 3 for display_price() in c:\program files\easyphp1-8\www\acasline2\includes\classes\currencies.php on line 72 Warning: Missing argument 3 for display_price() in c:\program files\easyphp1-8\www\acasline2\includes\classes\currencies.php on line 72 (three times.. apparently for each product, the main and the two linked). The error show beetween my main product (who show with the right price) and the others linked products (who have a 0.00 price) I think it is a problem with the multiples prices for B2B (but if i put only one price in B2B, i have still the error). But why is the error in currencies.php ?? Here is the part of code in question .... //TotalB2B start 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 voila la partie de code en question Quote
kalimbra Posted April 16, 2008 Author Posted April 16, 2008 to note : i have got the same problem with the contrib : whats_new_scroll_25items Quote
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.
Note: Your post will require moderator approval before it will be visible.