News:

Looking for documentation? Take a look on our wiki

Main Menu

[SOLVED] Load Custom Field Positions on Category Page

Started by bettondesign, January 10, 2013, 11:54:49 AM

Previous topic - Next topic

bettondesign

Hi

I am trying to load certain custom field positions on each product on the category view page.

So far I have this on the category page:


<?php
if (!empty($product->customfieldsSorted['beds-list-storage'])) {
   
$this->position='beds-list-storage';
   echo 
$this->loadTemplate('customfields'); }
?>



An I have uploaded a new custom field template file containing:


<div class="product-fields">
    <?php
    
$custom_title null;
    foreach ($product->customfieldsSorted[$position] as $field) {
     if ( $field->is_hidden //OSP http://forum.virtuemart.net/index.php?topic=99320.0
     continue;
if ($field->display) {
    ?>
<div class="product-field product-field-type-<?php echo $field->field_type ?>">
    <?php if ($field->custom_title != $custom_title) { ?>
    <h3 class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></h3>
    <?php
    if ($field->custom_tip)
echo JHTML::tooltip($field->custom_tipJText::_($field->custom_title), 'tooltip.png');
}
?>

        <div class="product-field-display"><?php echo $field->display ?></div>
        <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc?></span>
    </div>
    <?php
    $custom_title $field->custom_title;
}
    }
    ?>

        </div>
[code]

The end result is that it is simply not working. Does anyone have any ideas?

Thanks

bettondesign