/**
  * @param BaseElementModel $element
  * @param string $attribute
  * @return mixed|string
  */
 public function getTableAttributeHtml(BaseElementModel $element, $attribute)
 {
     if ($attribute == 'totalPrice') {
         $currency = craft()->market_settings->getOption('defaultCurrency');
         return craft()->numberFormatter->formatCurrency($element->totalPrice, strtoupper($currency));
     }
     if ($attribute == 'orderStatus') {
         if ($element->orderStatus) {
             return $element->orderStatus->printName();
         } else {
             return sprintf('<span class="market status %s"></span> %s', '', '');
         }
     }
     return parent::getTableAttributeHtml($element, $attribute);
 }
 public function getEditorHtml(BaseElementModel $element)
 {
     $variant = $element;
     $html = craft()->templates->render('market/_includes/variant/fields', compact('variant'));
     $html .= parent::getEditorHtml($element);
     return $html;
 }
 public function getTableAttributeHtml(BaseElementModel $element, $attribute)
 {
     return parent::getTableAttributeHtml($element, $attribute);
 }