/**
  * Assign the values of field
  * @param type $obj
  * @return type
  */
 public function getFieldsValue($obj)
 {
     $this->fields_value = parent::getFieldsValue($obj);
     $product_features = Product::getFeaturesStatic($obj->id);
     foreach ($product_features as $p_feature) {
         $this->fields_value[$p_feature['id_feature'] . '_' . $p_feature['id_feature_value']] = true;
     }
     $product_custom_features = QiMultiFeatureApi::getCustomValuesByProductId((int) $obj->id);
     foreach ($product_custom_features as $custom_feature) {
         $this->fields_value[$custom_feature['id_feature']][$custom_feature['id_lang']] = $custom_feature['value'];
     }
     return $this->fields_value;
 }
Esempio n. 2
0
 public function getFieldsValue($obj)
 {
     $out = parent::getFieldsValue($obj);
     $out['validado'] = $obj->validado;
     $product = new Product($obj->id_producto, true, $this->context->language->id);
     $out['nombre'] = $obj->nombre;
     $out['id_producto'] = $obj->id_producto;
     $out['email'] = $obj->email;
     $out['ciudad'] = $obj->ciudad;
     $out['q_date_add'] = $obj->date_add;
     $out['r_date_add'] = $obj->response->date_add;
     $out['respuesta'] = $obj->response->respuesta;
     $out['consulta'] = $obj->consulta;
     $this->tpl_form_vars = $out;
     return $out;
 }