Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Add "simple" ean to fix feed 2 (#37)
Browse files Browse the repository at this point in the history
* Fix tipo 2, mpn en producto

* Add "simple" ean to fix feed 2
  • Loading branch information
danidomen authored and mdogo committed Nov 23, 2017
1 parent 2d752c3 commit 548e599
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doofinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 548e599

Please sign in to comment.