Jump to content

Resolved - Change items that appear in sales box


Ms Holly

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...