You are here:  » Everything is grouped as one


Everything is grouped as one

Submitted by bem on Wed, 2014-09-24 23:05 in

Hi David ,

I was recently working on a huge upgrade. I tried some things which didn't work so put it all back as it was, but now I'm getting some really weird results - things are being grouped together where they shouldn't be, or weren't before.

Take the following link for example - {link saved}

it's grouping everything from that merchant into one item, and when you go into that item it's just showing the product listed.

I think it might be something to go with grouping everything by EAN as not all the products in my feed have this (I have one feed containing all my merchants).

Have you seen something like this before?

Thanks
Ben

Submitted by support on Thu, 2014-09-25 09:08

Hello Ben,

I see that the product pages for that merchant are OK, so it will be something to do with the GROUP BY in search.php.

One thing you could do is simply to make ean be an MD5 hash of the product name if there is no ean value in the feed. That way, every product without an EAN will have a value that can be used to GROUP BY that is the same for all products of the same name.

To do this, in your includes/admin.php look for the following comment around line 353:

  /* create dupe_hash value */

...and REPLACE with:

  if (!$importRecord["ean"])
  {
    $importRecord["ean"] = md5($importRecord["name"]);
  }
  /* create dupe_hash value */

Don't forget to re-import of course as the above code is only executed at import time.

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by bem on Thu, 2014-09-25 21:12

Hi David ,

Worked perfectly. Thank you so much!

Thanks
Ben