public static function getHandlerInformation()
 {
     DbIoHandler::loadHandlerMessageFile('OrdersProductsAttribs');
     $handler_info = parent::getHandlerInformation();
     $handler_info['description'] = DBIO_ORDERSPRODUCTSATTRIBS_DESCRIPTION;
     return $handler_info;
 }
Esempio n. 2
0
 public function exportPrepareFields(array $fields)
 {
     $fields = parent::exportPrepareFields($fields);
     $orders_status_id = $fields['orders_status'];
     unset($fields['orders_status']);
     $fields['orders_status_name'] = $this->getOrdersStatusName($orders_status_id);
     return $fields;
 }
Esempio n. 3
0
 protected function importAddField($table_name, $field_name, $field_value)
 {
     $this->debugMessage("Featured::importAddField ({$table_name}, {$field_name}, {$field_value})");
     switch ($table_name) {
         case TABLE_FEATURED:
             if ($this->import_is_insert) {
                 if ($field_name === 'featured_date_added') {
                     $field_value = 'now()';
                 } elseif ($field_name === 'featured_last_modified') {
                     $field_value = self::DBIO_NO_IMPORT;
                 }
             } else {
                 if ($field_name === 'featured_last_modified') {
                     $field_value = 'now()';
                 }
             }
             parent::importAddField($table_name, $field_name, $field_value);
             break;
         default:
             break;
     }
     //-END switch interrogating $table_name
 }
Esempio n. 4
0
 public static function getHandlerInformation()
 {
     DbIoHandler::loadHandlerMessageFile('ProductsOptions');
     return array('version' => '1.0.0', 'handler_version' => '1.0.0', 'include_header' => true, 'export_only' => false, 'description' => DBIO_PRODUCTSOPTIONS_DESCRIPTION);
 }
Esempio n. 5
0
 public static function getHandlerInformation()
 {
     DbIoHandler::loadHandlerMessageFile('Customers');
     return array('version' => '1.0.0', 'handler_version' => '1.0.0', 'include_header' => true, 'export_only' => true, 'description' => DBIO_CUSTOMERS_DESCRIPTION);
 }
Esempio n. 6
0
 protected function importUpdateRecordKey($table_name, $table_fields, $products_id)
 {
     global $db;
     if ($table_name != TABLE_PRODUCTS) {
         if ($this->import_is_insert) {
             $table_fields['products_id'] = array('value' => $products_id, 'type' => 'integer');
         } else {
             $this->where_clause = 'products_id = ' . (int) $this->key_fields['products_id'];
         }
     }
     if ($table_name == TABLE_PRODUCTS_TO_CATEGORIES) {
         if ($this->operation != 'check') {
             foreach ($table_fields as $field_name => $field_data) {
                 $db->Execute("INSERT IGNORE INTO {$table_name} (products_id, categories_id) VALUES ( {$products_id}, " . (int) $field_data['value'] . ")");
             }
         }
         $table_fields = false;
     }
     return parent::importUpdateRecordKey($table_name, $table_fields, $products_id);
 }
 protected function importBuildSqlQuery($table_name, $table_alias, $table_fields, $extra_where_clause = '', $is_override = false, $is_insert = true)
 {
     $proceed_with_query = true;
     if ($table_name == TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD) {
         if (empty($this->import_sql_data[TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD]['products_attributes_filename']['value'])) {
             $proceed_with_query = false;
         } elseif ($this->operation != 'check') {
             if ($this->import_is_insert) {
                 $this->import_sql_data[TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD]['products_attributes_id']['value'] = $this->key_fields['products_attributes_id'];
             } else {
                 $this->where_clause = "pad.products_attributes_id = " . $this->key_fields['products_attributes_id'];
             }
         }
     }
     return $proceed_with_query ? parent::importBuildSqlQuery($table_name, $table_alias, $table_fields, $extra_where_clause, $is_override, $is_insert) : false;
 }
 protected function importBuildSqlQuery($table_name, $table_alias, $table_fields, $extra_where_clause = '', $is_override = false, $is_insert = true)
 {
     return $table_name == TABLE_PRODUCTS ? false : parent::importBuildSqlQuery($table_name, $table_alias, $table_fields, $extra_where_clause, $is_override, $is_insert);
 }