예제 #1
0
 /**
  * Adds eav details if the user has entered them 
  * in the order view
  *
  * @param unknown_type $i
  * @param unknown_type $item
  */
 function onDisplayOrderItem($i, $item)
 {
     $vars = new JObject();
     // Get extra fields for products
     $fields = $this->getCustomFields('products', $item->product_id, true, 2);
     // If there are any extra fields, show them as an extra tab
     if (count($fields)) {
         $field_show = array();
         Tienda::load('TiendaHelperEav', 'helpers.eav');
         foreach ($fields as $f) {
             $k = $f['attribute']->eavattribute_alias;
             $f['value'] = $item->{$k};
             if (empty($f['value'])) {
                 $f['value'] = TiendaHelperEav::getAttributeValue($f['attribute'], 'orderitems', $item->orderitem_id);
             }
             $f['value'] = TiendaHelperEav::showValue($f['attribute'], $f['value']);
             $field_show[] = $f;
         }
         if (count($field_show)) {
             $vars->fields = $field_show;
             $html = $this->_getLayout('product_order', $vars);
             echo $html;
         }
     }
 }
예제 #2
0
<?php

defined('_JEXEC') or die('Restricted access');
Tienda::load('TiendaHelperEav', 'helpers.eav');
foreach (@$vars->fields as $field) {
    echo JText::_($field['attribute']->eavattribute_label);
    ?>
:&nbsp;
		<?php 
    echo TiendaHelperEav::showValue($field['attribute'], $field['value']);
    ?>
		<br/>
	<?php 
}
?>
<br/>