VirtueMart Forum

VirtueMart 2 + 3 => Templating & Layouts => Topic started by: legal on October 11, 2011, 18:45:21 pm

Title: How to get product image or thumb URL? [Solved]
Post by: legal on October 11, 2011, 18:45:21 pm
What I want is to get URL of product image or product thumb so I can put this URL in this code:

<meta property="og:image" content="I want to put URL of product image here" />

Why I want to do this?

Because I want Facebook to display image of product when someone like some product in my shop.
Title: Re: How to get product image or thumb URL?
Post by: PRO on October 11, 2011, 19:43:16 pm
MAYBE, this

$product->images->file_url_thumb   

or for large
file_url
Title: Re: How to get product image or thumb URL?
Post by: legal on October 11, 2011, 21:17:35 pm
Thanks for help.

This is the code which give you URL of product thumb:
<?php echo $this->product->images[0]->file_url_thumb; ?>
Title: Re: How to get product image or thumb URL? [Solved]
Post by: ncde on November 12, 2015, 09:23:08 am
Since VM 3.0.12 I think only "$this->product->images[0]->getFileUrlThumb()" does work.