News:

Support the VirtueMart project and become a member

Main Menu

unformatted path to Custom Field Image

Started by b-seite, June 22, 2016, 12:08:53 PM

Previous topic - Next topic

b-seite

Hi hello,

i am searching for a way to get the plain unformatted full path of a custom field image.
I want to set individual backgrounds for products depending on what is stored in an custom image field.
When i use $this->product->customfieldsSorted['position']->display   i get a preformattet HTML output but i just need the plain full path to the image to put it in an HTML Style

Thank you for any help

b-seite

VM: 3.0.16 Joomla:3.5.1 PHP:5.6

Studio 42

This field is only here to display the image directly.
I think the best is to do a new plugin, or add a CSS by product ID(YOu can do it in your template overide).
And why not using the category id ?
If you really want to use this, then you have to search in your customfields array for field_type = "M" and get the image link manually by SQL.
But the problem is that you can then never use it for another case or you have to add another trick.