Here are the changes I made
1/2
In admin\controller\catalog\product.php
Add:
Code: Select all
$this->data['entry_energy'] = $this->language->get('entry_energy');
$this->data['entry_engine'] = $this->language->get('entry_engine');
$this->data['entry_registration'] = $this->language->get('entry_registration');
$this->data['entry_vintage'] = $this->language->get('entry_vintage');
$this->data['entry_mileage'] = $this->language->get('entry_mileage');
$this->data['entry_fiscal_power'] = $this->language->get('entry_fiscal_power');
$this->data['entry_number_of_doors'] = $this->language->get('entry_number_of_doors');
$this->data['entry_power_din'] = $this->language->get('entry_power_din');
$this->data['entry_transmission'] = $this->language->get('entry_transmission');
$this->data['entry_color_class'] = $this->language->get('entry_color_class');
After:
Code: Select all
$this->data['entry_layout'] = $this->language->get('entry_layout');
Add:
Code: Select all
$this->data['tab_characteristic'] = $this->language->get('tab_characteristic');
After:
Code: Select all
$this->data['tab_data'] = $this->language->get('tab_data');
Add:
Code: Select all
$this->load->model('localisation/language');
$this->data['languages'] = $this->model_localisation_language->getLanguages();
if (isset($this->request->post['energy'])) {
$this->data['energy'] = $this->request->post['energy'];
} elseif (isset($product_info)) {
$this->data['energy'] = $product_info['energy'];
} else {
$this->data['energy'] = '';
}
if (isset($this->request->post['engine'])) {
$this->data['engine'] = $this->request->post['engine'];
} elseif (isset($product_info)) {
$this->data['engine'] = $product_info['engine'];
} else {
$this->data['engine'] = '';
}
if (isset($this->request->post['registration'])) {
$this->data['registration'] = $this->request->post['registration'];
} elseif (isset($product_info)) {
$this->data['registration'] = $product_info['registration'];
} else {
$this->data['registration'] = '';
}
if (isset($this->request->post['vintage'])) {
$this->data['vintage'] = $this->request->post['vintage'];
} elseif (isset($product_info)) {
$this->data['vintage'] = $product_info['vintage'];
} else {
$this->data['vintage'] = '';
}
if (isset($this->request->post['mileage'])) {
$this->data['mileage'] = $this->request->post['mileage'];
} elseif (isset($product_info)) {
$this->data['mileage'] = $product_info['mileage'];
} else {
$this->data['mileage'] = '';
}
if (isset($this->request->post['fiscal_power'])) {
$this->data['fiscal_power'] = $this->request->post['fiscal_power'];
} elseif (isset($product_info)) {
$this->data['fiscal_power'] = $product_info['fiscal_power'];
} else {
$this->data['fiscal_power'] = '';
}
if (isset($this->request->post['number_of_doors'])) {
$this->data['number_of_doors'] = $this->request->post['number_of_doors'];
} elseif (isset($product_info)) {
$this->data['number_of_doors'] = $product_info['number_of_doors'];
} else {
$this->data['number_of_doors'] = '';
}
if (isset($this->request->post['power_din'])) {
$this->data['power_din'] = $this->request->post['power_din'];
} elseif (isset($product_info)) {
$this->data['power_din'] = $product_info['power_din'];
} else {
$this->data['power_din'] = '';
}
if (isset($this->request->post['transmission'])) {
$this->data['transmission'] = $this->request->post['transmission'];
} elseif (isset($product_info)) {
$this->data['transmission'] = $product_info['transmission'];
} else {
$this->data['transmission'] = '';
}
$this->load->model('localisation/color_class');
$this->data['color_classes'] = $this->model_localisation_color_class->getColorClasses();
if (isset($this->request->post['color_id'])) {
$this->data['color_id'] = $this->request->post['color_id'];
} else if (isset($product_info)) {
$this->data['color_id'] = $product_info['color_id'];
} else {
$this->data['color_id'] = 0;
}
After:
Code: Select all
$this->data['length_classes'] = $this->model_localisation_length_class->getLengthClasses();
if (isset($this->request->post['length_class_id'])) {
$this->data['length_class_id'] = $this->request->post['length_class_id'];
} elseif (isset($product_info)) {
$this->data['length_class_id'] = $product_info['length_class_id'];
} else {
$this->data['length_class_id'] = $this->config->get('config_length_class_id');
}
In admin\model\catalog\product.php
Replace:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_added = NOW()");
By:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', energy = '" . $this->db->escape($data['energy']) . "', engine = '" . $this->db->escape($data['engine']) . "', registration = '" . $this->db->escape($data['registration']) . "', vintage = '" . $this->db->escape($data['vintage']) . "', mileage = '" . $this->db->escape($data['mileage']) . "', fiscal_power = '" . $this->db->escape($data['fiscal_power']) . "', number_of_doors = '" . $this->db->escape($data['number_of_doors']) . "', power_din = '" . $this->db->escape($data['power_din']) . "', transmission = '" . $this->db->escape($data['transmission']) . "', color_id = '" . $this->db->escape($data['color_id']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_added = NOW()");
Replace:
Code: Select all
public function editProduct($product_id, $data) {
$this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
By:
Code: Select all
public function editProduct($product_id, $data) {
$this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', energy = '" . $this->db->escape($data['energy']) . "', engine = '" . $this->db->escape($data['engine']) . "', registration = '" . $this->db->escape($data['registration']) . "', vintage = '" . $this->db->escape($data['vintage']) . "', mileage = '" . $this->db->escape($data['mileage']) . "', fiscal_power = '" . $this->db->escape($data['fiscal_power']) . "', number_of_doors = '" . $this->db->escape($data['number_of_doors']) . "', power_din = '" . $this->db->escape($data['power_din']) . "', transmission = '" . $this->db->escape($data['transmission']) . "', color_id = '" . $this->db->escape($data['color_id']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
Add:
Code: Select all
'p.energy',
'p.engine',
'p.registration',
'p.vintage',
'p.mileage',
'p.fiscal_power',
'p.number_of_doors',
'p.power_din',
'p.transmission',
'p.color_id',
After:
Code: Select all
$sort_data = array(
'pd.name',
'p.model',
In admin\view\template\catalog\product_form.tpl
Replace:
Code: Select all
<div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-links"><?php echo $tab_links; ?></a><a href="#tab-attribute"><?php echo $tab_attribute; ?></a><a href="#tab-option"><?php echo $tab_option; ?></a><a href="#tab-discount"><?php echo $tab_discount; ?></a><a href="#tab-special"><?php echo $tab_special; ?></a><a href="#tab-image"><?php echo $tab_image; ?></a><a href="#tab-reward"><?php echo $tab_reward; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a></div>
By:
Code: Select all
<div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-characteristic"><?php echo $tab_characteristic; ?></a><a href="#tab-links"><?php echo $tab_links; ?></a><a href="#tab-attribute"><?php echo $tab_attribute; ?></a><a href="#tab-option"><?php echo $tab_option; ?></a><a href="#tab-discount"><?php echo $tab_discount; ?></a><a href="#tab-special"><?php echo $tab_special; ?></a><a href="#tab-image"><?php echo $tab_image; ?></a><a href="#tab-reward"><?php echo $tab_reward; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a></div>
Add:
Code: Select all
<div id="tab-characteristic">
<table class="form">
<tr>
<td><?php echo $entry_engine; ?></td>
<td><input type="text" name="engine" value="<?php echo $engine; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_energy; ?></td>
<td><input type="text" name="energy" value="<?php echo $energy; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_registration; ?></td>
<td><input type="text" name="registration" value="<?php echo $registration; ?>" size="12" class="date" /></td>
</tr>
<tr>
<td><?php echo $entry_vintage; ?></td>
<td><input type="text" name="vintage" value="<?php echo $vintage; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_mileage; ?></td>
<td><input type="text" name="mileage" value="<?php echo $mileage; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_fiscal_power; ?></td>
<td><input type="text" name="fiscal_power" value="<?php echo $fiscal_power; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_power_din; ?></td>
<td><input type="text" name="power_din" value="<?php echo $power_din; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_number_of_doors; ?></td>
<td><input type="text" name="number_of_doors" value="<?php echo $number_of_doors; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_transmission; ?></td>
<td><input type="text" name="transmission" value="<?php echo $transmission; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_color_class; ?></td>
<td><select name="color_id">
<?php foreach ($color_classes as $color_class) { ?>
<?php if ($color_class['color_id'] == $color_id) { ?>
<option value="<?php echo $color_class['color_id']; ?>" selected="selected"><?php echo $color_class['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $color_class['color_id']; ?>"><?php echo $color_class['name']; ?></option>
<?php } ?>
<?php } ?>
</select></td>
</tr>
</table>
</div>
Before:
Tous les packs de langues Française depuis la v1.4.7 et toutes les versions intégrales 100 % Français sont disponibles sur le Portail Officiel Français.
