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

Commit

Permalink
Merge pull request #12 from doofinder/debugging-variations
Browse files Browse the repository at this point in the history
Bugfix group by including all products with no variations
  • Loading branch information
ecoslado authored Aug 17, 2016
2 parents eae0eb9 + 48a2658 commit 78d4f79
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dfTools.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
define('CATEGORY_SEPARATOR', '%%');
define('CATEGORY_TREE_SEPARATOR', '>');
define('TXT_SEPARATOR', '|');

class dfTools
{
// http://stackoverflow.com/questions/4224141/php-removing-invalid-utf-8-characters-in-xml-using-filter
Expand Down Expand Up @@ -471,7 +470,7 @@ public static function getAvailableProductsForLanguage($id_lang, $id_shop, $limi
ON (p.id_category_default = cl.id_category AND cl.id_shop = _ID_SHOP_ AND cl.id_lang = _ID_LANG_)
LEFT JOIN (_DB_PREFIX_image im INNER JOIN _DB_PREFIX_image_shop ims ON im.id_image = ims.id_image)
ON (p.id_product = im.id_product AND ims.id_shop = _ID_SHOP_ AND _IMS_COVER_)
LEFT JOIN _DB_PREFIX_product_attribute pa
LEFT OUTER JOIN _DB_PREFIX_product_attribute pa
ON (p.id_product = pa.id_product)
LEFT JOIN _DB_PREFIX_product_attribute_image pa_im
ON (pa_im.id_product_attribute = pa.id_product_attribute)
Expand All @@ -480,7 +479,7 @@ public static function getAvailableProductsForLanguage($id_lang, $id_shop, $limi
WHERE
__IS_ACTIVE__
__VISIBILITY__
GROUP BY pa.id_product_attribute
GROUP BY pa.id_product_attribute, p.id_product
ORDER BY
p.id_product
";
Expand Down Expand Up @@ -519,6 +518,7 @@ public static function getAvailableProductsForLanguage($id_lang, $id_shop, $limi
'__IS_ACTIVE__' => $is_active,
'__VISIBILITY__' => $visibility));



return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}
Expand Down
Binary file modified dist/doofinder-p1.5-latest.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion doofinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Doofinder extends Module

const GS_SHORT_DESCRIPTION = 1;
const GS_LONG_DESCRIPTION = 2;
const VERSION = "2.1.6";
const VERSION = "2.1.7";

const YES = 1;
const NO = 0;
Expand Down
2 changes: 1 addition & 1 deletion feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function slugify($text)
if(intval($row['id_product']) > 0){
// ID, TITLE, LINK

if($cfg_product_variations && isset($row['id_product_attribute']) and intval($row['id_product_attribute']) > 0){
if($cfg_product_variations && isset($row['id_product_attribute']) && intval($row['id_product_attribute']) > 0){
// ID
echo "VAR-".$row['id_product_attribute'].TXT_SEPARATOR;
// TITLE
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doofinder-for-prestashop",
"version": "2.1.6",
"version": "2.1.7",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.5.0",
Expand Down

0 comments on commit 78d4f79

Please sign in to comment.