1

I am using EE-1.14.1 with Solr search enabled, and need to set it up so that users can search for the SKU of a simple product, and get shown the configurable product that it is associated with.

These simple products are not visible in search.

For example, if I have the following product:

Product Name         Type            SKU
--------------------------------------------------------
Chair Red/Green      Configurable    Chair-95
 - Red Chair         Simple          CH95-R
 - Green Chair       Simple          CH95-G

...then a search for CH95-R should return the parent product (Chair-95) on the search results page.

Can anyone point me in the right direction?

4
  • 2
    Did you think about creating an attribute called "configurable skus" for example. On product save, you fill up this field with a string of all the children SKUs, and you make this field searchable. May 12, 2015 at 15:25
  • Unfortunately there are around 12,000 SKUs already on the site, so doing this wouldn't be feasible without some significant data-shuffling.
    – jsims281
    May 12, 2015 at 15:30
  • 1
    You can quickly make a script that loops over all your configurable products, and save that data directly in your database. It shouldn't take more than ~30mns to implement & run - as a reference, that question is similar to yours : stackoverflow.com/questions/7070024/… May 12, 2015 at 15:49
  • I think this might be the best approach, thanks for the advice. Feel free to answer so I can accept it.
    – jsims281
    May 12, 2015 at 16:43

1 Answer 1

2

You can create an attribute called "configurable_skus" for example. On product save, you fill up this field with a string of all the children SKUs, and you make this field searchable.

1
  • I like this idea but it poses a problem with the returned product page from search.... It returns the configurable product page and does not pre-select the options associated with that sku. A very clever suggestion though!
    – NotJay
    Apr 28, 2016 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.