You are here:  » Grouping by SKU and Name

Support Forum



Grouping by SKU and Name

Submitted by chrisstaunton on Wed, 2009-10-07 16:07 in

Hi David,

My site implements the SKU comparison mod (matching SKU or name) and for the products.php this works superbly. The problem is, that on the search results page because the query is only grouping by SKU and not by matching SKU OR name, the two return different results if the SKUs don't match. i.e. my search results show two products of the same name (but different SKUs) as seperate entities, but when clicked both go through to the same page where their results are combined in the price comparison table. This is also the case for my sitemap where I'm grouping by SKU and getting multiple instances of the same page name and URL in my list.

I appreciate that to match by both SKU or product name in the search results would be quite intensive, but as my site is niche and only lists a few thousand products, I might be able to get away with this comparison. I'm very new to SQL, so wouldn't really know where to start trying to write this query. Do you think this is possible and what would be the most efficient/clean way to perform this query in my search results and sitemap?

Many thanks

Chris

Submitted by support on Wed, 2009-10-07 16:44

Hello Chris,

Yes, it is feasible in niche sites (depending on the size of your niche of course) and I have helped other users do the same. If you could email me your products.php (for reference) and search.php I will add the secondary query to each result in order to add the SKU grouping...

Cheers,
David.