News:

Support the VirtueMart project and become a member

Main Menu

Virtuemart interfering with simple custom module

Started by newsomjk, August 05, 2013, 23:12:06 PM

Previous topic - Next topic

newsomjk

Hi, I recently created a custom search module for our site that goes through all the joomla articles and the virtuemart products etc. The search results included images.

I discovered that if you go as deep as a product details page, the image results don't work. Even though my code returns 'images/stories/virtuemart/product/product-filename.png' as the file_url from the database, for some reason using that as the src in the image tag makes this the new src url: 'localhost/j25/index.php/component/virtuemart/images/stories/virtuemart/product/product-filename.png'.

I'm not sure what would cause that issue so I'm not sure if posting on virtuemart forums is the best, but I need help.

Also, I've tried using this as the src attribute:
<? echo $_SERVER['DOCUMENT_ROOT'].'/'.$p['file_url']; ?> but that's still not working, and JURI::root() adds extra info in the url that breaks it as well.

PRO

just use the folder path.

you need to use relative images anyway.