Guest Posted March 31, 2003 Share Posted March 31, 2003 everythings are looking good except, i couldn't really find the exact line for this instructions:- catalog/includes/modules/product_listing.php catalog/includes/modules/product_listing.php Around line 97 After: if ($listing_numrows > 0) { $number_of_products = '0'; $listing = tep_db_query($listing_sql); while ($listing_values = tep_db_fetch_array($listing)) { Add: $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 = '" . $listing_values['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)) { $listing_values['products_price'] = $customer_group_price['customers_group_price']; } } Anyway, i appended the new instructions at line 93. There is no errors generated except 1) the display of the pricing under sub-categories are not showing the "logged in" price. it shows the normal price. Do we need some "hack" at the following line? case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } i am sure a lot of you have luck with this contri. thanks in advance Quote Link to comment Share on other sites More sharing options...
Guest Posted April 1, 2003 Share Posted April 1, 2003 no taker? i am sure someone is using this contri. Quote Link to comment Share on other sites More sharing options...
mouflon Posted April 7, 2003 Share Posted April 7, 2003 You've been snagged by a code change in oscommerce - listing_values[ has changed to listing[ As in: while ($listing_values = tep_db_fetch_array($listing)) { is now while ($listing = tep_db_fetch_array($listing)) { so therefore lines such as $listing_values['products_price'] = $customer_group_price become $listing['products_price'] = $customer_group_price hope this helps. Quote Unexpect the Expected Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2003 Share Posted April 7, 2003 thanks a lot. it seems to work now!! 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.