View Single Post
  #47  
Old 05-13-2012, 11:16 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: X-Cart popup messages

Yes these 2 settings. They are global and you have them set to show out of stock products. Since the mod doesn't modify any XC files and uses recommends.php directly you get what the file returns. This XC file can be modified of course

You can change

Code:
// 'Added to Cart' message - CFL Systems if (!empty($active_modules['Recommended_Products'])) include $xcart_dir . '/recommends.php'; // 'Added to Cart' message - CFL Systems

to

Code:
// 'Added to Cart' message - CFL Systems if (!empty($active_modules['Recommended_Products'])) { $only_instock = true; include $xcart_dir . '/recommends.php'; } // 'Added to Cart' message - CFL Systems

then in recommends.php this

Code:
if ( $config['General']['unlimited_products'] != 'Y' && $config['General']['show_outofstock_products'] != 'Y' ) {

change to
Code:
if ( ($config['General']['unlimited_products'] != 'Y' && $config['General']['show_outofstock_products'] != 'Y') || $only_instock ) {

Not tested though
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote