Merge branch 'ticket-14698-sensefuel' into develop
This commit is contained in:
commit
e0a84b6ab4
@ -322,10 +322,15 @@ class SenseFuelFluxExport
|
||||
$this->products[$i]['family'] = 'Not found';
|
||||
if (count($this->products[$i]['categories_id']) > 0) {
|
||||
// Family
|
||||
$id_category = end($this->products[$i]['categories_id']);
|
||||
$sql = "SELECT id_category_family FROM `"._DB_PREFIX_."category_family_association`
|
||||
WHERE id_category = ".$id_category;
|
||||
$id_category_family = Db::getInstance()->getValue($sql);
|
||||
$categoryR = array_reverse($this->products[$i]['categories_id']);
|
||||
foreach($categoryR as $c) {
|
||||
$sql = "SELECT id_category_family FROM `"._DB_PREFIX_."category_family_association`
|
||||
WHERE id_category = ".$c;
|
||||
$id_category_family = Db::getInstance()->getValue($sql);
|
||||
if (!empty($id_category_family)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!empty($id_category_family) && array_key_exists($id_category_family, $familyFlat)) {
|
||||
$get = $this->parseForParent($id_category_family, $familyFlat);
|
||||
if ($get !== false) {
|
||||
@ -362,7 +367,7 @@ class SenseFuelFluxExport
|
||||
|
||||
private function getFamilyAll($id_lang)
|
||||
{
|
||||
$sql = "SELECT *
|
||||
$sql = "SELECT cf.`id_category_family`, cf.`id_parent`, cf.`position`, cfl.`name`
|
||||
FROM `"._DB_PREFIX_."category_family` cf, `"._DB_PREFIX_."category_family_lang` cfl
|
||||
WHERE cf.id_category_family=cfl.id_category_family AND cfl.id_lang=".$id_lang;
|
||||
$result = Db::getInstance()->ExecuteS($sql);
|
||||
@ -498,11 +503,11 @@ class SenseFuelFluxExport
|
||||
$this->addContentLine($currentProduct['family'], 'g:product_type');
|
||||
|
||||
// Bebeboutik : Force categories
|
||||
if (isset($currentProduct['conso_categories'])) {
|
||||
/*if (isset($currentProduct['conso_categories'])) {
|
||||
foreach ($currentProduct['conso_categories'] as $currentCategory) {
|
||||
//$this->addContentLine($currentCategory, 'g:product_type');
|
||||
$this->addContentLine($currentCategory, 'g:product_type');
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
$this->addContentLine('Ventes privées', 'c:sale_type');
|
||||
$this->addContentLine($currentProduct['catname'], 'c:private_sale_name');
|
||||
|
@ -23,7 +23,9 @@ class SenseFuel extends Module
|
||||
$this->version = '1.0';
|
||||
$this->author = 'Antadis';
|
||||
|
||||
$this->_checkDisplay();
|
||||
if (!Tools::isCli()) {
|
||||
$this->_checkDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
public function install()
|
||||
|
Loading…
Reference in New Issue
Block a user