Hi Guys,
First of all, a very happy new year.
Secondly, I am thinking of some how to be able to generate multiple thumbnails each with different size.
So right now I am using oxpic1 and oxpic2 images to display them on product list page. I need both of the pics because at first I show the oxpic1 and onmouseover I show the oxpic2.
Now the problem is that the size of the oxpics in the admin area is 375500 which is correct as I need this size on the detail page. But I need somehow to be able to generate smaller images from oxpic1 and oxpic2 with size like 180240 which is basically my size on the listing page. (right now images are loaded with size of 375500 on listing page and then with css they are displayed smaller to 180240)
I need this done because size of my listing page is too large it takes to much time to load so many large images. I need to load the page directly with 180*240 resolution images.
I tried overloading the following function
public function getPictureUrl( $iIndex = 1, $iSize=array())
{
if ( $iIndex ) {
$sImgName = false;
if ( !$this->_isFieldEmpty( “oxarticles__oxpic”.$iIndex ) ) {
$sImgName = basename( $this->{“oxarticles__oxpic$iIndex”}->value );
}
if(count($iSize) > 0)$sSize = $iSize; else $sSize = $this->getConfig()->getConfigParam( 'aDetailImageSizes' );
return oxPictureHandler::getInstance()->getProductPicUrl( "product/{$iIndex}/", $sImgName, $sSize, 'oxpic'.$iIndex );
}
}
I added the second parameter of $iSize. now it generates the correct URL with the new size and so but the image is never generated with the new size and it says image not found.
http://localhost.bb/out/pictures/generated/product/1/184_245_75/TK_401WX_DBR_ANGLE.jpg
so any idea guys…
Looking forward to a quick response