add 2 columns to excel
This commit is contained in:
parent
b67c3f7300
commit
5a9d780365
@ -110,23 +110,25 @@ class AdminAntWp extends AdminTab
|
||||
if($line[0] != '') {
|
||||
$ean = trim($line[0]);
|
||||
$products[$ean] = array(
|
||||
'ean' => $ean,
|
||||
'supplier_ref' => trim($line[1]),
|
||||
'name_ha' => trim($line[2]),
|
||||
'quantity' => trim($line[3]),
|
||||
'ppc' => trim($line[4]),
|
||||
'prix_ha' => trim($line[5])
|
||||
'ean' => $ean,
|
||||
'supplier_ref' => trim($line[1]),
|
||||
'name_ha' => trim($line[2]),
|
||||
'quantity' => trim($line[3]),
|
||||
'ppc' => trim($line[4]),
|
||||
'prix_ha' => trim($line[5]),
|
||||
'name_attribute_ha' => trim($line[6])
|
||||
);
|
||||
$eans[] = $ean;
|
||||
} else {
|
||||
$ref = trim($line[1]);
|
||||
$products[$ref] = array(
|
||||
'ean' => trim($line[0]),
|
||||
'supplier_ref' => $ref,
|
||||
'name_ha' => trim($line[2]),
|
||||
'quantity' => trim($line[3]),
|
||||
'ppc' => trim($line[4]),
|
||||
'prix_ha' => trim($line[5])
|
||||
'ean' => trim($line[0]),
|
||||
'supplier_ref' => $ref,
|
||||
'name_ha' => trim($line[2]),
|
||||
'quantity' => trim($line[3]),
|
||||
'ppc' => trim($line[4]),
|
||||
'prix_ha' => trim($line[5]),
|
||||
'name_attribute_ha' => trim($line[6])
|
||||
);
|
||||
$refs[] = $ref;
|
||||
}
|
||||
@ -164,7 +166,8 @@ class AdminAntWp extends AdminTab
|
||||
|
||||
foreach (Db::getInstance()->executeS('
|
||||
SELECT p.`id_product`, p.`id_tax_rules_group`, p.`id_category_default`, at.`ean13`, p.`price`, p.`wholesale_price`,
|
||||
p.`reference`, p.`supplier_reference`, p.`weight`, p.`height`, p.`width`, p.`depth`, c.`position`, cu.`nc8`, cu.`id_country`
|
||||
p.`reference`, p.`supplier_reference`, p.`weight`, p.`height`, p.`width`, p.`depth`, c.`position`, cu.`nc8`, cu.`id_country`,
|
||||
al.`name` as attribute_name
|
||||
FROM
|
||||
`'._DB_PREFIX_.'product` p
|
||||
INNER JOIN (SELECT date_add, max(id_product) as maxid FROM `'._DB_PREFIX_.'product` GROUP BY `supplier_reference`) as b
|
||||
@ -175,6 +178,10 @@ class AdminAntWp extends AdminTab
|
||||
ON (cu.`id_product` = p.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` at
|
||||
ON (at.`id_product` = p.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` ac
|
||||
ON (ac.`id_product_attribute` = at.`id_product_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (al.`id_attribute` = ac.`id_attribute` AND al.`id_land` = 2)
|
||||
WHERE at.`ean13` IN ("'.implode('","',$eans).'")
|
||||
AND p.`id_product` IS NOT NULL
|
||||
ORDER BY c.`position`
|
||||
@ -280,7 +287,7 @@ class AdminAntWp extends AdminTab
|
||||
Avec les colonnes suivantes :<br>
|
||||
</p>
|
||||
<ul style="list-style:none;">
|
||||
<li style="font-size:13px;"><i>ean;ref_fournisseur;nom_produit_HA;quantite;PPC;prix_achat</i></li>
|
||||
<li style="font-size:13px;"><i>ean;ref_fournisseur;nom_produit_HA;quantite;PPC;prix_achat;taille_ha</i></li>
|
||||
</ul>
|
||||
<p>Les colonnes suivantes et la première ligne du fichier seront ignorées.</p>
|
||||
<p></p>'
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user