Page 1 of 1

Search for SKU doesn't search variations

Posted: Tue Dec 30, 2008 4:54 pm
by mfreeze
In the advanced search, the SKU search only returns results for primary products and not unique SKUs assigned to variants. Is there any way to make it search the SKUs assigned to variations?

Re: Search for SKU doesn't search variations

Posted: Wed Dec 31, 2008 8:55 am
by mazhar
Advance Search page only lists the products and can't list the variants. If you want to list the primary product when some one searches with some Sku of its variant then you will need some customization for this. One possible solution for this could be use a standard prefix character with Sku modifier for each variants for example if the Sku of primary product is MYSKU then its variant must have Sku modifiers prefixed with - symbol like -VAR1, -VAR2 so that their final Sku becomes MYSKU-VAR1. Then you can customize the Advance Search page so that when some one searches by Sku first you grab the entered Sku and check that it contains the - symbol or not. If it contains the - symbol just remove the symbol and characters after that part and send this modified version of Sku for searching. This will always list the primary products if some one searches for their variants.