News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

small help

Started by yureka, December 22, 2012, 15:32:56 PM

Previous topic - Next topic

yureka

Hello all,
     I am new to virtuemart. From code I observed that this code shows the image. 
echo $product->images[0]->displayMediaThumb()

But I want image url.
echo $product->images[0]->link doesn't work... help me pls.. Thanks

jenkinhill

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

bytelord

Assuming this is for category view,

So try

$product->images[0]->file_url
or
$product->images[0]->file_name

for thumb:
$product->images[0]->file_url_thumb

use JURI::root() if you want full url path ...

like $xxx = JURI::root() . $product->images[0]->file_url

You did not specify the exactly link :)

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!