I have made an addition to the cart module to display the images of the products.
Go to components/com_virtuemart/helpers/cart.php
Line 1769
Add:
$data->products[$i]['image'] = $product->images[0];
So that the final Result is:
$data->products[$i]['image'] = $product->images[0];
$data->products[$i]['product_sku'] = $product->product_sku;
Then go to modules/mod_virtuemart_cart/tmpl/default.php
Line 31
Add:
<span class="image"><img src="<?php echo $product['image']->getFileUrlThumb(); ?>" alt="" /></span></br>
So that the final Result is:
<span class="image"><img src="<?php echo $product['image']->getFileUrlThumb(); ?>" alt="" /></span></br>
<span class="quantity"><?php echo $product['quantity'] ?></span> x <span class="product_name"><?php echo $product['product_name'] ?></span>
Could I suggest that you update the helper file in virtuemart core to always include that line, so that we don't have to re-insert the code on each virtuemart update?
I think it not work on add to cart a new product.
It was tested on a clean virtuemart install.
Make sure that in the "Virtuemart Shopping Cart" module both of the following options are set to yes:
Show Product Price?
Show Product list in cart?
Please use this version
http://dev.virtuemart.net/attachments/download/1037/com_virtuemart.3.0.18.6_extract_first.zip
it loads now the products. It needs your layout changes.
Thank you VERY MUCH!
I will continue posting some changes that I include in my core overrides on every website in case you want to also import them in the main version!
I think you know, you have to thank Spyros for it, he committed the "mounting point" in vm core
I do know!
I have already thanked him ;)
Is this still correct? Do I need to switch the function prepareAjaxData($withProductImages=false) to function prepareAjaxData($withProductImages=true)?
Or can I use prodct images in my cart module without altering the core?