VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: EvanGR on June 17, 2019, 09:38:14 AM

Title: Access specific custom fields?
Post by: EvanGR on June 17, 2019, 09:38:14 AM
Hello,

I want to access specific custom fields in the products template, to do custom styling on them.

Interested both for the categories page (multiple products), as well as a single product page.

So far, I do this:
<div class="custom-fields">
<?php echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product,'position'=>'my_positions')); ?>
</div>


But this displays all the custom fields in the specific position.

Thanks
Title: Re: Access specific custom fields?
Post by: StefanSTS on June 17, 2019, 12:51:35 PM
Just use different names for the position attribute and make a few calls for position1, position2.

Title: Re: Access specific custom fields?
Post by: PRO on June 18, 2019, 16:44:44 PM
http://forum.virtuemart.net/index.php?topic=128936.0