I'm trying to display a certain custom field within the template sublayouts/products.php.
I've tried the following:
<?php
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'wpayments'));
?>
But it doesn't work and breaks the page.
Can anyone help?
Products sub-layout does not have any property called "$this->product". You need to call the custom fields sub-layout within "foreach ($products as $product)" loop as below:
<?php echo shopFunctionsF::renderVmSubLayout('customfields', array('product' => $product, 'position' => 'wpayments')); ?>