Ms Holly Posted April 28, 2012 Share Posted April 28, 2012 Is there away that I can change the items that appear in the sales box? I currently have 3 items that appear in my sales box and they are all the from the same category with a very small amount taken off the rrp. Is there anyway to change what is displayed? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 28, 2012 Share Posted April 28, 2012 How many items do you have on sale right now? Do you have an adequate number set in Admin to show? Quote Link to comment Share on other sites More sharing options...
Ms Holly Posted April 30, 2012 Author Share Posted April 30, 2012 I have 100s of items on sale and I have it set at 3 to display and the same three products are displayed all the time, which are basically 3 of the same item. Quote Link to comment Share on other sites More sharing options...
Toucan Web Design Posted April 30, 2012 Share Posted April 30, 2012 Assuming that you don't have product pricing groups (which would need further modifications), all you need to do is open up. /classes/gui.class.php Find: if (isset($sale_sql_standard_select) && ($standard_pricing = $GLOBALS['db']->query('SELECT `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 '.$GLOBALS['config']->get('config', 'catalogue_sale_items'))) !== false && is_array($standard_pricing)) { And change to: if (isset($sale_sql_standard_select) && ($standard_pricing = $GLOBALS['db']->query('SELECT `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.' ORDER BY RAND() ASC LIMIT '.$GLOBALS['config']->get('config', 'catalogue_sale_items'))) !== false && is_array($standard_pricing)) { Should just switch it so that the products are drawn out randomly out of all your sale items. You could change the order to something else if need be, you may be able to order by the saving DESC if you wanted the biggest to always show and so forth. Hope that helps Quote Link to comment Share on other sites More sharing options...
Ms Holly Posted May 8, 2012 Author Share Posted May 8, 2012 Thanks heaps! Quote Link to comment Share on other sites More sharing options...
Ms Holly Posted May 13, 2012 Author Share Posted May 13, 2012 Have made the code changes but it doesn't appear to have changed the order I still get he same products appear in the sale box. Who knows what Ive done wrong. Thanks anyway I appreciate it. Quote Link to comment Share on other sites More sharing options...
Ms Holly Posted September 15, 2012 Author Share Posted September 15, 2012 Fantastic this works now that I have upgraded that so much! 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.