bubbaboss Posted January 21, 2016 Share Posted January 21, 2016 In Settings-Features0 No Longer works for Number of Sale Items to Display ? 0 now shows 10 sale items?How come? and how do i fix it so 0 works..I DO NOT WANT TO SHOW ANY SALE ITEMS AS BEFORE.Thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 21, 2016 Share Posted January 21, 2016 I'll look at this, but for the moment, switch the store's "Sale Mode" to Disabled.But I think you actually may want to have some store sales, so that is not a solution.Maybe remove {include file='templates/box.sale_items.php'} from the main.php template? Quote Link to comment Share on other sites More sharing options...
bubbaboss Posted January 21, 2016 Author Share Posted January 21, 2016 OK.. i will try your temp code fix..I upgraded 4 sites and they all did the same... 0 is not recognized? as it was before.I USE GLOBAL SALE .... but i don't like to show that list since everything is on sale.IT WAS WORKING FINE IN VERSION v6.09 upgrade from prior...Thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 22, 2016 Share Posted January 22, 2016 Yes, a fix was implemented when the admin entry was left blank.Unfortunately, the fix went a bit too far. It fixed the entry if that entry was false-like, including zero, instead of checking for just a blank.There is a hook in the code that develops the contents for the Sale Items box, so we cannot simply abort the whole thing if the number of sale items to show suggests zero.In CC6010, /classes/gui.class.php:Line 1193: $no_sale_items = ($GLOBALS['config']->get('config', 'catalogue_sale_items') > 0) ? $GLOBALS['config']->get('config', 'catalogue_sale_items') : 10; Change to: $no_sale_items = (is_numeric($GLOBALS['config']->get('config', 'catalogue_sale_items'))) ? (int)$GLOBALS['config']->get('config', 'catalogue_sale_items') : 10; Line 1195: if (isset($sale_sql_standard_select) && ($standard_pricing = $GLOBALS['db']->query('SELECT `price`, `sale_price`, `product_id`,`description`,`name`, '.$sale_sql_standard_select.' AS `saving` FROM `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_inventory` WHERE '.$sale_sql_standard_where.' AND `status` = \'1\' '.$not_on_sale.' LIMIT '.$no_sale_items)) !== false && is_array($standard_pricing)) { Change to: if ($no_sale_items && isset($sale_sql_standard_select) && ($standard_pricing = $GLOBALS['db']->query('SELECT `price`, `sale_price`, `product_id`,`description`,`name`, '.$sale_sql_standard_select.' AS `saving` FROM `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_inventory` WHERE '.$sale_sql_standard_where.' AND `status` = \'1\' '.$not_on_sale.' LIMIT '.$no_sale_items)) !== false && is_array($standard_pricing)) { Quote Link to comment Share on other sites More sharing options...
bubbaboss Posted January 22, 2016 Author Share Posted January 22, 2016 I did a temp fix... by removing code.But i am Hopping there is a Real fix for what happened in this upgrade. I will try the fix you supplied above.I will also ADD it to v.6.10 before i upgrade the next website so i will not have to change it afterwords.Thank you Quote Link to comment Share on other sites More sharing options...
bubbaboss Posted January 22, 2016 Author Share Posted January 22, 2016 OK.. now it works with your code fix.0 shows no sale items.However leaving it Blank will show 10 sale items.This works for me...... thank you Quote Link to comment Share on other sites More sharing options...
bubbaboss Posted January 24, 2016 Author Share Posted January 24, 2016 Can you Confirm this Code Fix will be in the next Release of CubeCart? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2016 Share Posted January 24, 2016 This github issue suggests it has been reopened. I notice, however, the milestone target for it has not been updated, and that the milestone CC6.0.10 has been closed but not completed. (I don't know what that implies.)I am in no position to confirm or deny anything. I can, however, infer with great certainty that this will be implemented in CC6.0.11. Quote Link to comment Share on other sites More sharing options...
bubbaboss Posted January 24, 2016 Author Share Posted January 24, 2016 OK... i will hang on to this code update for now...I will notice right away in next upgrade if it was fixed etc.. Thanks for all the Help. 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.