Thanks and this seems to be working but may i please know where to change / modify and how to do this? we are new to nopcommerce so please explain in details (how to do and which file to change) - can we do this through FTP ?
we want to do this --- EXAMPLE --------------- One of our product part number / sku is EW-FT-2-1220-3000
Currently nopcommerce SEARCH function is working ONLY if we search the whole part number "EW-FT-2-1220-3000" in search box
we want it to search even if we enter "FT-2" and list all products having word "FT-2" found in part number field in database.
i think something just need to be changed in codes (like in php we used to do %% search string %% in select statement) -------------
All you need to do is modify the stored procedure ProductLoadAllPaged with the text from the previous post. This will allow you search with the left hand 3 characters.
Go to vanillawoodfloors.co.uk and search for 306 to see this in action.
I am sorry to bother you. I know PHP & MySQL but completely new to SQL Server Manaegment Studio. I have connected it to our database but dont know what you said to modify stored procedure.
Could you please tell me, how do i access a stored procedure "ProductLoadAllPaged" in visual studio?
...if we search = EW-ABC or ABC or XYZ etc... then also it must display a product containing anything we search in EW-ABC-XYX-700...
If you have SQL Server 2016 or greater, and OK with the "-" as the separator, then after the SET @sql = @sql + 'OR p.[Sku] = @OriginalKeywords ' put this
IF CHARINDEX('-', @OriginalKeywords) > 0 SELECT @sql = @sql + ' OR p.[Sku] like ''%' + value + '%''' FROM STRING_SPLIT(@OriginalKeywords, '-')
will generate this OR p.[Sku] = @OriginalKeywords OR p.[Sku] like '%EW%' OR p.[Sku] like '%ABC%' OR p.[Sku] like '%XYZ%' OR p.[Sku] like '%700%'
it searches on SKU properly the way we want. what if we want it to search into product description as well
can anybody please help with a code to write in "ProductLoadAllPaged" stored procedure so that if we can search on any word written in product description paragraph then all those products also get listed after searching?
eg: there is a word "ground level" in one of the product description but it doesnt appear when we search from a search text box in header of our nopcommerce store. it only displays products if we tick those checkboxes of "advance search" on search page.
your help will be greatly appreciated.
thank you!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.