Latest Forum Posts
Home arrow Forum
Design Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:display product thumbnail in minicart (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: Re:display product thumbnail in minicart

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1468
adroussel (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
display product thumbnail in minicart 3 Years, 11 Months ago  
First Bravo!
I love this module, I think it should replace the virtuemart default one.

My request is I'd like to have a little thumbnail of the product picture added to the minicart. How do you suggest me to do that mod?
This option could be added to a next release maybe.
Thanks a lot!
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1489
adroussel (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:display product thumbnail in minicart 3 Years, 11 Months ago  
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_image04) != "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_existsIMAGEPATH."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
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1531
adroussel (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:display product thumbnail in minicart 3 Years, 11 Months ago  
Hey guys, me again, I swear I'm trying!

Can you please tell me why this:
Code: :

 if( $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_thumb_image")

is true on basket.php
and is not true on shop_basket.short.php

this is the reason why my thumbnail doesn't display on the minicart.
heeeeeeelp
thanks a lot and sorry to be a pain...
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1534
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:display product thumbnail in minicart 3 Years, 11 Months ago  
Your code is in the wrong place!!

It has to be after the loop of cart items
i.e. line 43

for ($i=0;$i<$cart["idx"];$i++) {

and before line 88 where the loop ends.

otherwise it does not index the cart and pick the correct product.

$i is the clue.
 
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1535
adroussel (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:display product thumbnail in minicart 3 Years, 11 Months ago  
Perfect!
THANK YOU very much Mark!
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1813
medrastic (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:display product thumbnail in minicart 3 Years, 8 Months ago  
hello freshboarder ,can u upload the files you used to show the thumbnail on minicart. I want to implement that too. Or Can you pls post on the forum, where u added the new code.
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop