Hello there,
I use vm 2.6.x and joomla 2.5.x
I have found this topic: http://forum.virtuemart.net/index.php?topic=91807.0 that some stuff is discussed but inside cart.php i see that cart is loaded with product ids.
What i don't see, is what variables are loading in order to add or remove some (for example, description, quantity, image etc).
What i need to do is just add the image of the product at left or top of description.
Also, i need to move the related products a little bit down but i don't know where to add <br />
Any help appreciated!
In current VM versions the popup is templated. The file is components/com_virtuemart/views/cart/tmpl/padded.php so you ahould edit that file as you wish and use the edited file as a template override.
Thank you very much for your fast reply.
I am trying to add product image (not huge but like thumbnail) but i cannot.
At padded.php i add: echo $product->product_image;
But i cannot see image.
Is there a special variable for thumb image of product?
I tried this inside padded.php overrided file inside my template but still i cannot see product image. Any help?
if($this->products){
foreach($this->products as $pkey =>$prow){
echo '<h4>'.JText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$prow->product_name,$prow->quantity).'</h4>';
if ( $prow->virtuemart_media_id) { ?>
<div class="proopc-row">
<?php if(!empty($prow->image)) { ?>
<div class="cart-images">
<?php echo $prow->image->displayMediaThumb('',false); ?>
</div>
<? }
}
}
}
and is this true? if(!empty($prow->image))
For a reason my code doesn't work. Even if i remove this if you are saying, then if i click on add-to-cart button i see the loading graphic and nothing happens. Like coding is wrong. The current code that shows only quantity and title of product is this:
if($this->products){
foreach($this->products as $pkey =>$prow){
echo '<h4>'.JText::sprintf('COM_VIRTUEMART_CART_PRODUCT_ADDED',$prow->product_name,$prow->quantity).'</h4>';
}
}
Can you please help me how to make this show also the image of the product added?
Thank you in advance
you ever answered the question
is this true? if(!empty($prow->image))
echo out $prow->image
Sorry but i don't know if this is true. I just saw this piece of code and i added it to my code like my previous post.
My problem is that i see no image at all. I don't know if its syntax error or something else
I added inside padded.php file this line before h4 tag and it worked:
echo '<div style="text-align:center"><img src="'.JURI::base() . $prow->images[0]->file_url_thumb.'" alt="'.$prow->product_name.'" /></div>';