NOP 3.8 Partial Sku Search

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi,

We upgraded to NOP 3.8 and noticed that the partial Sku search stopped working.  In researching I saw that it was intended to do an exact match in 3.8.

I did some searching on this and tried a few suggestions but can't seem to get the partial sku searching to work.

I updated the "ProductLoadAllPaged" stored procedure to the below but it didn't seem to work.  I've also enabled full text search as well.

--SKU
    IF @SearchSku = 1
    BEGIN
      SET @sql = @sql + '
      UNION
      SELECT p.Id
      FROM Product p with (NOLOCK)
      WHERE '
      IF @UseFullTextSearch = 1
        SET @sql = @sql + 'CONTAINS(p.[Sku], @Keywords) '
      ELSE
        SET @sql = @sql + 'PATINDEX(@Keywords, p.[Sku]) > 0 '
    END


Is this correct OR is this there something else to change to allow partial sku searching?

Thanks for the help.

Toby
6 years ago
Hi,

I also tried this for the WHERE Clause but this didn't seem to work either.  It didn't error out or anything but I still can't seem to search for partial skus.

WHERE p.[Sku] + LIKE ''%'  + @OriginalKeywords + '%'''


Any ideas on how to get this to work?

Thanks for the help.

Toby
6 years ago
tsapusek wrote:
Hi,

I also tried this for the WHERE Clause but this didn't seem to work either.  It didn't error out or anything but I still can't seem to search for partial skus.

WHERE p.[Sku] + LIKE ''%'  + @OriginalKeywords + '%'''


Any ideas on how to get this to work?

Thanks for the help.

Toby


you found some fix?
6 years ago
Hi,

Actually this is what I have for the sku in the stored procedure and it worked:

--SKU (exact match)
    IF @SearchSku = 1
    BEGIN
      SET @sql = @sql + '
      UNION
      SELECT p.Id
      FROM Product p with (NOLOCK)
      WHERE p.[Sku] LIKE ''%'  + @OriginalKeywords + '%'''
    END


This change worked fine for a plain install.  The issue that I was having with another site that I was working was a plugin was conflicting with it and forcing it to not work properly.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.