Is it possible to show custom fields on specific layout positions?
I want to show one custom field directly under the product name, and another custom field just above the add-to-cart button.
I just loop thru and if there is a match display it where I want
e.g.
foreach ($product->customfields as $field) {
if(($field->virtuemart_custom_id == '33')){
echo $field->custom_value;
}
}
or if lots assign them to a var with a switch statement
foreach ($product->customfields as $field) {
switch ($field->virtuemart_custom_id) {
case "33":
$custom1 = $field->custom_value;
break;
case "36":
$custom2 = $field->custom_value;
break;
}
}
echo $custom1;
echo $custom2;
code not checked but u get the idea
i think that by default there are som positions like ontop, onbottom which you can use in the position field of custom field.
You can also add your own in the product details layout