randomProduct - a little change

marcinkk

Avatar: marcinkk

2010-02-10 20:04

A little change for randomProduct plugin ... works better for me. When some product are deleted then the indexes of images and indexes of products are different. Chandes in core/products.php

- original:


    
foreach( $oFile->aImagesDefault[2] as $iProduct ){
      if( isset( 
$this->aProducts[$iProduct] ) )
        
$aRandom[] = $iProduct;
    }



- modified


    
foreach( $oFile->aImagesDefault[2] as $iProduct ){
      
$iProductIndex $oFile->aFilesImages[2][$iProduct]["iProduct"];
      if( isset( 
$this->aProducts[$iProductIndex] ) )
        
$aRandom[] = $iProductIndex;
    }



Regards, MK

» Quick.Cart v3.x

Back to top
about us | contact