wheeloftime Posted March 1, 2006 Share Posted March 1, 2006 I have installed contrib_TotalB2B_1.2d.It doesn't work. I got this message: Fatal error: Call to undefined function: tep_admin_check_login() in /admin/includes/application_top.php on line 223 Can anybody help me? fosil AT freemail DOT hu thanks, Zsolt Zsolt, First; you shouldn't leave your email address like you did on the board (better not at all this way). Second; this problem doesn't sound TotalB2B related and I checked the source for that undefined function tep_admin_check_login(). It isn't there with TotalB2B as far as I can tell so you must have been working on another contribution which does have this function with it and which you did not add to, my guess, /admin/includes/functions/general.php. HTH Quote Link to comment Share on other sites More sharing options...
gombszorp Posted March 1, 2006 Share Posted March 1, 2006 I understand You, but the problem came up after I installed the B2B. This modul would be very usefull to me.. Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 1, 2006 Share Posted March 1, 2006 I understand You, but the problem came up after I installed the B2B. This modul would be very usefull to me.. Can it be you just copied the provided general.php from the TotalB2B contribution over your admin general.php ? Somehow you have undone changes needed for another contribution while installing TotalB2B. Quote Link to comment Share on other sites More sharing options...
gombszorp Posted March 1, 2006 Share Posted March 1, 2006 Can it be you just copied the provided general.php from the TotalB2B contribution over your admin general.php ? Somehow you have undone changes needed for another contribution while installing TotalB2B. I modified sql tables, than copied the new files and the patched files to the require directories. I did everything what the readme.txt said. Can't do it _:( Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 1, 2006 Share Posted March 1, 2006 I modified sql tables, than copied the new files and the patched files to the require directories.I did everything what the readme.txt said. Can't do it _:( If you just copied the patched files like the new ones you are asking for troubles ! Once you have changed a file for one contribution you will have to do any other changes for other contributions by hand. You should be able to solve this fairly easily if you can backtrack which contribution might have included the function you are now missing. It is probably something from an admin protecting/user level entry contribution and you should find that one function within the installation files for that contribution and copy it inside the admin/includes/functions/general.php as you have now (maybe there are more functions to copy but you should be able to tell according to the changes described for that other contribution). Quote Link to comment Share on other sites More sharing options...
gombszorp Posted March 1, 2006 Share Posted March 1, 2006 If you just copied the patched files like the new ones you are asking for troubles ! Once you have changed a file for one contribution you will have to do any other changes for other contributions by hand.You should be able to solve this fairly easily if you can backtrack which contribution might have included the function you are now missing. It is probably something from an admin protecting/user level entry contribution and you should find that one function within the installation files for that contribution and copy it inside the admin/includes/functions/general.php as you have now (maybe there are more functions to copy but you should be able to tell according to the changes described for that other contribution). Thanks! But I think its more that I can do. Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 Hi I have a phpnuke and osc2nuk mod installed together, i have installed totalb2b and have finally got it working. Only thing is i cannot view prices it says i need to be logged in, the feature does not come up in configuration / my store but they are listed in the database and i changed it manually but did not work, How can i disable this feature permenantly or take out the checks it does to verify if you are logged in or not? please help going bald from pulling my hair out http://www.metaphysicalworld.com.au Joedy Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 9, 2006 Share Posted March 9, 2006 Hi I have a phpnuke and osc2nuk mod installed together, i have installed totalb2b and have finally got it working. Only thing is i cannot view prices it says i need to be logged in, the feature does not come up in configuration / my store but they are listed in the database and i changed it manually but did not work, How can i disable this feature permenantly or take out the checks it does to verify if you are logged in or not? please help going bald from pulling my hair out http://www.metaphysicalworld.com.au Joedy Strange ?! With the admin setting admin->configuration->totalb2b->Allow Guest To See Prices set to true everyone must be able to see prices. Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 Strange ?! With the admin setting admin->configuration->totalb2b->Allow Guest To See Prices set to true everyone must be able to see prices. I only have number of prices per customer in there Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 9, 2006 Share Posted March 9, 2006 I only have number of prices per customer in there Yep, it should have been something like that. There are 4 settings for TotalB2B, at least with my 1.2b version. Depending appearantly on the phpMyAdmin version and/or PHP version I encountered myself also problems when importing/running multiple SQL commands. If you change DELETE from configuration_group WHERE configuration_group_title="TotalB2B"; INSERT INTO configuration_group VALUES ('', 'TotalB2B', 'TotalB2B - configuration options', 1, 1); UPDATE configuration_group SET sort_order=last_insert_id() WHERE configuration_group_id=last_insert_id(); INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (600, 'Number Of Prices Per Products', 'XPRICES_NUM', '1', 'Number of prices per products<br><br><b>WARNING: Changing this value will delete prices entry in products table!</b><br><br><b>Every groups that use a deleted price will use product default price.</b>', last_insert_id(), 30, '2003-11-11 18:33:04', '0000-00-00 00:00:00', 'tep_update_prices', 'tep_cfg_pull_down_prices(') , ('', 'Allow Guest To See Prices', 'ALLOW_GUEST_TO_SEE_PRICES', 'false', 'Allow guests to view default prices', last_insert_id(), '31', '', '2004-03-15 14:59:05', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),') , ('', 'Guest Discount', 'GUEST_DISCOUNT', '0', 'Guest discount', last_insert_id(), '32', '', '2004-03-15 14:59:05', NULL, '') , ('', 'Special price (products price hiding)', 'SPECIAL_PRICES_HIDE', 'false', 'Special price (products price hiding)', last_insert_id(), '33', '', '2004-03-15 14:59:05', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); to DELETE from configuration_group WHERE configuration_group_title="TotalB2B"; INSERT INTO configuration_group VALUES ('', 'TotalB2B', 'TotalB2B - configuration options', 1, 1); UPDATE configuration_group SET sort_order=last_insert_id() WHERE configuration_group_id=last_insert_id(); SET @id_config = last_insert_id(); INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (600, 'Number Of Prices Per Products', 'XPRICES_NUM', '1', 'Number of prices per products<br><br><b>WARNING: Changing this value will delete prices entry in products table!</b><br><br><b>Every groups that use a deleted price will use product default price.</b>', @id_config, 30, '2003-11-11 18:33:04', '0000-00-00 00:00:00', 'tep_update_prices', 'tep_cfg_pull_down_prices(') , ('', 'Allow Guest To See Prices', 'ALLOW_GUEST_TO_SEE_PRICES', 'false', 'Allow guests to view default prices', @id_config, '31', '', '2004-03-15 14:59:05', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),') , ('', 'Guest Discount', 'GUEST_DISCOUNT', '0', 'Guest discount', last_insert_id(), '32', '', '2004-03-15 14:59:05', NULL, '') , ('', 'Special price (products price hiding)', 'SPECIAL_PRICES_HIDE', 'false', 'Special price (products price hiding)', @id_config, '33', '', '2004-03-15 14:59:05', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); and run it again you should find all the entries in your admin->configuration->totalb2b section Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 Thanks heaps mate it worked like a charm Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 ok well that worked but it still does not show the price, I must be missing something logins are handled by the your account module in phpnuke, is there a way i can just remove this check directly from the code? or do people need to be in a group otherwise there is no price? Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 9, 2006 Share Posted March 9, 2006 ok well that worked but it still does not show the price, I must be missing something logins are handled by the your account module in phpnuke, is there a way i can just remove this check directly from the code? or do people need to be in a group otherwise there is no price? Can't help you with that as I don't know those modules nor their interaction with TotalB2B. Best thing to do is to compare the B2B changes for the orignial osC files with the equivalent ones from your other mods. Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 Can't help you with that as I don't know those modules nor their interaction with TotalB2B. Best thing to do is to compare the B2B changes for the orignial osC files with the equivalent ones from your other mods. yeah did that thats how i installed it just need to remove the check it does to see if the user is logged in than it will work Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 9, 2006 Share Posted March 9, 2006 yeah did that thats how i installed it just need to remove the check it does to see if the user is logged in than it will work doesn'tTotalB2B checks for showing prices yes or no within the currency class and nowhere else as far as I now. This would mean that the phpNuke login is not registered correctly with osC (and vice versa maybe). Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 Thanks for this i appreciate it. Ok i have fixed it now as it shows a $ figure, phpnuke organises customers as user_id so wetn through the code and changed all that, now it displays $0.00 for everything any suggestions? Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 Thanks for this i appreciate it. Ok i have fixed it now as it shows a $ figure, phpnuke organises customers as user_id so wetn through the code and changed all that, now it displays $0.00 for everything any suggestions? it shows prices in the cart but not the block Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 9, 2006 Share Posted March 9, 2006 it shows prices in the cart but not the block What do you mean with block ?! Carefully check all changes you did for totalb2b. They seem more or less the same for the different files but especially the array names are different so just copying and pasting the same block around to different files does not work. Quote Link to comment Share on other sites More sharing options...
Joedy Posted March 9, 2006 Share Posted March 9, 2006 What do you mean with block ?! Carefully check all changes you did for totalb2b. They seem more or less the same for the different files but especially the array names are different so just copying and pasting the same block around to different files does not work. What i mean is it does not show on the site or in the cart. Unless i go view cart and it shows http://www.metaphysicalworld.com.au I have double tripple and quadruple checked the files Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted March 9, 2006 Share Posted March 9, 2006 What i mean is it does not show on the site or in the cart. Unless i go view cart and it shows http://www.metaphysicalworld.com.au I have double tripple and quadruple checked the files I only see 'Pricing Update' displayed whether with the product or inside the shopping cart. With this alone I can't say more as to still investigate your (catalog)/includes/classes/currencies.php for the new/rewritten functions display_price() and display_price_nodiscount() in combination with the registered users condition and/or any other changes you might have done. if (($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) { Quote Link to comment Share on other sites More sharing options...
mseiler Posted March 21, 2006 Share Posted March 21, 2006 is the contrib gone now because the link leads to a page that says its not there Quote Thank you, ? ? ? ? Marc Seiler ? ? ? ? Link to comment Share on other sites More sharing options...
hozone Posted March 21, 2006 Author Share Posted March 21, 2006 is the contrib gone now because the link leads to a page that says its not there http://www.oscommerce.com/community/contri...search,Totalb2b ;) Quote osCommerce Italia support: http://www.oscommerceitalia.com Link to comment Share on other sites More sharing options...
mseiler Posted March 21, 2006 Share Posted March 21, 2006 Thank you :) Quote Thank you, ? ? ? ? Marc Seiler ? ? ? ? Link to comment Share on other sites More sharing options...
enmi Posted April 4, 2006 Share Posted April 4, 2006 Hi! I get this error message when i click on a link refering to products_info.php Warning: Missing argument 3 for display_price() in /var/www/localhost/htdocs/wbshp/includes/classes/currencies.php on line 72 I have read the other replies in this topic, but when i look at the code it seems that the corrections that are suggested already have been done... i installed a default oscommerce shop and then copied over the files from this contrib. And it worked.. But after i added some more contribs this error displayes.. the modules/contribs i have installed is B2B 1.2d STS PLUS 4.07 Fancier_Invoice_&_Packingslip_v6.1 Secure Admin Login-Logout The shop is default swedish, but the error displays in other languages also. Any ideas will be much appreciated.. Best regards Mikael CODE FOR currencies.php and products_info.php <?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 (c) 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_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 } ?> <?php /* $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); //TotalB2B start $product_info['products_price'] = tep_xppp_getproductprice($product_info['products_id']); //TotalB2B end if ($new_price = tep_get_products_special_price($product_info['products_id'])) { //TotalB2B start $query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'"); $query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide); if ($query_special_prices_hide_result['configuration_value'] == 'true') { $products_price = '<span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = '<s>' . $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } //TotalB2B end } else { $products_price = $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($product_info['products_id'], $products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
hozone Posted April 4, 2006 Author Share Posted April 4, 2006 @enmi please check products_info.php all the calls to display_price should have as first parameters the products_id. Quote osCommerce Italia support: http://www.oscommerceitalia.com 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.