Ok I applyed a little hack from the 'add picture to shopping cart' one from the virtuemart forum on basket.php
So I moded a little the shop.basket_short.php
It's now displaying for each product in the mini cart, a 'no image available' thumbnail linking to the corect product... Only the good thumbnail doesn't display.
here is the code I added to shop.basket_short.php, just after
$auth = $_SESSION['auth'];:
| Code: : |
//prepare thumb image
if( $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_thumb_image") ) {
$product_thumb_image = $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_thumb_image");
}
else {
$product_thumb_image = 0;
}
if( $product_thumb_image ) {
if( substr( $product_thumb_image, 0, 4) != "http" ) {
if(PSHOP_IMG_RESIZE_ENABLE == '1') {
$product_thumb_image = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($product_thumb_image)."&newxsize=".PSHOP_IMG_WIDTH."&newysize=".PSHOP_IMG_HEIGHT."&fileout=";
}
else {
if( file_exists( IMAGEPATH."product/".$product_thumb_image )) {
$product_thumb_image = IMAGEURL."product/".$product_thumb_image;
}
else {
$product_thumb_image = IMAGEURL.NO_IMAGE;
}
}
}
}
else {
$product_thumb_image = IMAGEURL.NO_IMAGE;
}
//end of prepare thumb image
|
and then just before the quantity, I added:
| Code: : |
$html .= $product_rows[$i]['product_thumb_image'] = "<a href=\"$url\">"
. "<img src= $product_thumb_image />"
. "</a><br />";
|
I really nead to have that thumbnail displayed (clothing shop)
Please help me I'm close...
Thanks