toughmama 1 Posted March 11, 2014 Re. QPBPP with SPPC / Prices under $1 not working I found that products under $1 do not calculate properly. If an item is listed for $0.45, and distributor pricing is @ $0.25 – Pricing is listed as 45 cents in the Shopping cart, NOT 25 cents as it should be, (when logged in as a Distributor) The pricing is also the same when on the products listing page... (refer pic below) Examples tried and tested... I changed pricing to $2, and Dist price to $0.80 - it shows $2 I changed pricing to $2, and Dist price to $1.00 - it shows $1 I changed pricing to $2, and Dist price to $1.20 - it shows $1.20 I changed pricing to $2, and Dist price to $0.99 - it shows $2 Any idea where to fix the code ? Thanks, Todd Share this post Link to post Share on other sites
♥multimixer 325 Posted March 11, 2014 (edited) Yes, this is a bug. The issue is caused in file catalog/includes/classes/PriceFormatterStore.php. The file compare the "new price" that is retrieved for the customer group via a special query with the default price and replace it, if condition is met if ((int)$new_prices[$i]['products_price'] > 0 ) { $product_info[$x]['products_price'] = $new_prices[$i]['products_price']; } Problem is, that condition is typecasting the new price to (int), this is of course a problem for decimal prices, should not be used Code will work like this if ($new_prices[$i]['products_price'] > 0 ) { $product_info[$x]['products_price'] = $new_prices[$i]['products_price']; } Edited March 11, 2014 by multimixer 1 joli1811 reacted to this My community profile | Template system for osCommerce - New: Responsive | Feedback channel Share this post Link to post Share on other sites
toughmama 1 Posted March 11, 2014 Fix works great... all good now. Thanks George. FYI - Running 2.2 oscommerce for 6yrs..., Now using Mini Template System, and has been the best upgrade. Great support too. Share this post Link to post Share on other sites