VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: antonino78 on July 04, 2013, 11:06:07 AM

Title: product image in the mail order
Post by: antonino78 on July 04, 2013, 11:06:07 AM
Hello to all,
I am using this code to show the image of the product in the email order.
<tr valign="top">
<td><?php if (!empty($product->images[0])) echo '<a href="'.$product_link.'">'.$product->images[0]->displayMediaThumb (''false,"class='modal' rel='group'",true,false,true).'</a>';?></td>

I would like to resize the image size.
Can someone please tell me how to modify the code that I posted?
Title: Re: product image in the mail order
Post by: jenkinhill on July 04, 2013, 11:26:47 AM
Add some in-line css to size the image to what you require.
Title: Re: product image in the mail order
Post by: antonino78 on July 04, 2013, 11:32:07 AM
Thanks for the reply,
you can see an example?
I really do not know how to do .... unfortunately not an expert.
I have done many tests but the page I goes into error
Title: Re: product image in the mail order
Post by: Maxim Pishnyak on July 04, 2013, 19:09:38 PM
'.$product->images[0]->displayMediaThumb ('', false,"class='modal' rel='group'",true,false,true).'
around this your could add div tag
and for this tag you could write good height, width
google "div height width"
also read html and css books a bit pls
Title: Re: product image in the mail order
Post by: antonino78 on July 04, 2013, 19:17:43 PM
Quote from: Maxim Pishnyak on July 04, 2013, 19:09:38 PM
'.$product->images[0]->displayMediaThumb ('', false,"class='modal' rel='group'",true,false,true).'
around this your could add div tag
and for this tag you could write good height, width
google "div height width"
also read html and css books a bit pls

I solved the problem!
Instead of saying you search on google or read books given the answer to the correction "is much faster"!
Maybe he could serve also to other people
Title: Re: product image in the mail order
Post by: Maxim Pishnyak on July 04, 2013, 21:08:23 PM
That's right, books are evil.
Google is evil corp too!

Why do you think that I didn't help you? After you created this thread you start to think about your problem more actively. No?
Title: Re: product image in the mail order
Post by: svarmuza on October 02, 2013, 18:52:24 PM
Greetings,
i included this code you mentioned
<?php if (!empty($product->images[0])) echo '<a href="'.$product_link.'">'.$product->images[0]->displayMediaThumb (''false,"class='modal' rel='group'",true,false,true).'</a>';?>

in components/com_virtuemart/views/invoice/tmpl/invoice_items.php  ... but i get no product image showed in my confirmation email.

If someone could help me with this, it would be perfect....
Thanks,
Sasa
Title: Re: product image in the mail order
Post by: Maxim Pishnyak on October 05, 2013, 13:18:47 PM
Do you use template overrides?
Title: Re: product image in the mail order
Post by: svarmuza on October 05, 2013, 20:56:48 PM
Hello Maxim,
I don't use template override for this...
In the same file, i inserted the text label...and it shows OK in confirmation email I receive, but the code mentioned above is not generating any product photo...

It generates broken image placeholder with "img src..." pointing to my homepage url...

Thanks for helping me on this and pointing me to the right direction...
Sasa
Title: Re: product image in the mail order
Post by: Maxim Pishnyak on October 08, 2013, 13:49:25 PM
Pm me access I'll take a look.
Title: Re: product image in the mail order
Post by: eJuiceVaporz on October 26, 2013, 23:36:44 PM
Quote from: svarmuza on October 02, 2013, 18:52:24 PM
Greetings,
i included this code you mentioned
<?php if (!empty($product->images[0])) echo '<a href="'.$product_link.'">'.$product->images[0]->displayMediaThumb (''false,"class='modal' rel='group'",true,false,true).'</a>';?>

in components/com_virtuemart/views/invoice/tmpl/invoice_items.php  ... but i get no product image showed in my confirmation email.

If someone could help me with this, it would be perfect....
Thanks,
Sasa

Hi,

Can you please tell me where you put that code as in what line after what code in that file cause i dont know anything about css nor php coding ?
Title: Re: product image in the mail order
Post by: e-trader on November 22, 2013, 17:01:24 PM
Mmm it is not returning any pictures because  $product->images[0] is empty. How could one get it filled with the correct information?
Title: Re: product image in the mail order
Post by: hk on June 26, 2014, 17:24:25 PM
Quote from: antonino78 on July 04, 2013, 11:06:07 AM
Hello to all,
I am using this code to show the image of the product in the email order.
<tr valign="top">
<td><?php if (!empty($product->images[0])) echo '<a href="'.$product_link.'">'.$product->images[0]->displayMediaThumb (''false,"class='modal' rel='group'",true,false,true).'</a>';?></td>

I would like to resize the image size.
Can someone please tell me how to modify the code that I posted?
I tried adding this code in the override file, but the image did not appear. Can you please assist.