Guest Posted May 13, 2003 Share Posted May 13, 2003 Hi, I am a newcomer :oops: to php and oscommerce so please excuse my ignorance if this is a stupid mistake ive made. I have installed seperate pricing per customer and it all seems to be working ok except on the catalog/product_info page the price shows a $0.00 unless the user is logged in. Is there something i have done to the code. I think this is the code concerned <?php } else { 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 = '" . $languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $products_price = $currencies->display_price($customer_group_price['customers_group_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } else { $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } } else { $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])); } } ?> Thanks fo any help :) Quote Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2003 Share Posted May 13, 2003 Meant to say, if you are logged in as a trade customer it shows the price fine but if you are logged in as retail or not logged in it doesnt work:( Quote Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2003 Share Posted May 13, 2003 Thanks to Micheal who developed the contribution :) Fix was a typo in the code http://www.oscommerce.com/community/contributions,716 Just if anyone else get the problem.[/url] Quote Link to comment Share on other sites More sharing options...
mattcald Posted May 22, 2003 Share Posted May 22, 2003 dang, how many stinkin' downloads do have to do to get the whole contribution??!?!?!?! Quote ** God Bless ** --------------------- Link to comment Share on other sites More sharing options...
solutions_online Posted June 17, 2003 Share Posted June 17, 2003 Hi all, It's hard to implement, but it's a GREAT contribution. Needs an update though to get working with OSC 2.2 MS1. The author himself says it was written for a late 2002 snapshot of OSC. I've got it working almost flawlessly, only the broken products_new.php. As soon as I get that fixed I'm gonna commit myself to making an update install for MS1. Regards 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.
Note: Your post will require moderator approval before it will be visible.