Quote Originally Posted by harmeetsandhu View Post
ChrisD24,

Read the whole code properly and then decided that the following part of the code is an overkill.

I simply removed this part below :

PHP Code:
// stock by attributes
        
if ( STOCK_CHECK == 'true' ) {

            
// Added to allow individual stock of different attributes
            
unset($attributes);
            if(
is_array($products[$i]['attributes'])){
                
$attributes $products[$i]['attributes'];
                
$stock_check zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes);
                
$flagStockCheck NULL
                if (
zen_not_null($stock_check))
                {
                    
$flagAnyOutOfStock true;
                    
$flagStockCheck $stock_check;
                    
$stockAvailable zen_get_products_stock($products[$i]['id'], $attributes);        
                }
            } else {
                
$attributes '';
                
$flagStockCheck zen_check_stock($products[$i]['id'], $products[$i]['quantity']);
                if (
$flagStockCheck == true) {
                    
$flagAnyOutOfStock true;
                    
$stockAvailable zen_get_products_stock($products[$i]['id']
                }            
            }
        } 

and replaced it with this code:

PHP Code:
if (STOCK_CHECK == 'true') {
    
$flagStockCheck zen_check_stock($products[$i]['id'], $products[$i]['quantity'], $attributes);
    if (
$flagStockCheck == true) {
      
$flagAnyOutOfStock true;      
      
$stockAvailable zen_get_products_stock($products[$i]['id'], $attributes);               
    }
  } 
This works perfect for me. Try it out and let me know.

Regards
Nope, this doesn't appear to be working for me - just on products without attributes.