diff --git a/doofinder.php b/doofinder.php index 65fadf9..6b1ad7b 100644 --- a/doofinder.php +++ b/doofinder.php @@ -1301,7 +1301,8 @@ function getSQLOnlyProductsWithAttributes(){ IF(isnull(pa.id_product), p.__MPN__ , GROUP_CONCAT(DISTINCT pa.__MPN__ SEPARATOR '/')) AS mpn, IF(isnull(pa.id_product), p.ean13 , GROUP_CONCAT(DISTINCT pa.ean13 SEPARATOR '/')) AS ean13, - + p.ean13 AS simple_ean13, + p.__MPN__ AS simple_mpn, pl.name, pl.description, pl.description_short, diff --git a/feed.php b/feed.php index 5f1248f..846bb75 100755 --- a/feed.php +++ b/feed.php @@ -225,6 +225,10 @@ function slugify($text) } else{ + $eanLink = $row['ean13']; + if($cfg_product_variations == 2){ + $eanLink = $row['simple_ean13']; + } // ID echo $row['id_product'].TXT_SEPARATOR; // TITLE @@ -233,7 +237,7 @@ function slugify($text) echo dfTools::cleanURL($context->link->getProductLink(intval($row['id_product']), $row['link_rewrite'], $row['cat_link_rew'], - $row['ean13'], + $eanLink, $lang->id, $shop->id, 0,