News:

Looking for documentation? Take a look on our wiki

Main Menu

[SOLVED] Product page: get custom field values.

Started by EvanGR, April 28, 2020, 21:01:21 PM

Previous topic - Next topic

EvanGR

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

Studio 42

print_r($this->product); or use vmdebug

EvanGR

Thanks... found it, it was $this->product->customfieldsSorted