VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: EvanGR on April 28, 2020, 21:01:21 PM

Title: [SOLVED] Product page: get custom field values.
Post by: EvanGR on April 28, 2020, 21:01:21 PM
Hello,

I am in the single product template. I need to get specific custom field values, from the product, for custom code I am working on.

Ideally, I want the following:

1) Get the value of a custom field, by the custom field's name.

2) If the above is not possible, then get the custom fields by position. I will then iterate and grab the values... but this is less than ideal.

Any ideas? Thanks
Title: Re: Product page: get custom field values.
Post by: Studio 42 on April 28, 2020, 21:20:55 PM
print_r($this->product); or use vmdebug
Title: Re: Product page: get custom field values.
Post by: EvanGR on April 29, 2020, 13:16:02 PM
Thanks... found it, it was $this->product->customfieldsSorted