예제 #1
0
 /**
  * @see ObjectModel::getFieldsShop()
  * @return array
  */
 public function getFieldsShop()
 {
     $fields = parent::getFieldsShop();
     if (is_null($this->update_fields) || !empty($this->update_fields['price']) && !empty($this->update_fields['unit_price'])) {
         $fields['unit_price_ratio'] = (double) $this->unit_price > 0 ? $this->price / $this->unit_price : 0;
     }
     return $fields;
 }