News:

Looking for documentation? Take a look on our wiki

Main Menu

product image in the mail order

Started by antonino78, July 04, 2013, 11:06:07 AM

Previous topic - Next topic

antonino78

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?

jenkinhill

Add some in-line css to size the image to what you require.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

antonino78

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

Maxim Pishnyak

'.$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
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

antonino78

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

Maxim Pishnyak

#5
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?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

svarmuza

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

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

svarmuza

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

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

eJuiceVaporz

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 ?
Why smoke & stink when you can vape in redolence.

Joomla - 2.5.14
VirtueMart - 2.0.24
PHP - 5.3.27

e-trader

Mmm it is not returning any pictures because  $product->images[0] is empty. How could one get it filled with the correct information?

hk

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.