sort by option is working only standard tab not working for multiple language (english and french) using nopcommerce

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 年 前
Hi,

I'm using nop version 4.0 in the site we are using multi-language (English and French),
In public store I open one category in that I sort by option with 'AtoZ' or 'ZtoA' but it only considered standard tab information what we mention in admin product edit we have three tabs like standard, English, and French but it takes only standard tab only while I select different language also sort by works only standard tab information, not for selected language.


Thanks,
Venkat Goud.
4 年 前
It's the default behavior of nopCommerce. It can search product from localized values, can not sort by those. You need customization for that.

Here is sorting query of product search stored procedure.

--sorting
SET @sql_orderby = ''  
IF @OrderBy = 5 /* Name: A to Z */
  SET @sql_orderby = ' p.[Name] ASC'
ELSE IF @OrderBy = 6 /* Name: Z to A */
  SET @sql_orderby = ' p.[Name] DESC'
ELSE IF @OrderBy = 10 /* Price: Low to High */
  SET @sql_orderby = ' p.[Price] ASC'
ELSE IF @OrderBy = 11 /* Price: High to Low */
  SET @sql_orderby = ' p.[Price] DESC'
ELSE IF @OrderBy = 15 /* creation date */
  SET @sql_orderby = ' p.[CreatedOnUtc] DESC'
ELSE /* default sorting, 0 (position) */
BEGIN
  --category position (display order)
  IF @CategoryIdsCount > 0 SET @sql_orderby = ' pcm.DisplayOrder ASC'
    
  --manufacturer position (display order)
  IF @ManufacturerId > 0
  BEGIN
    IF LEN(@sql_orderby) > 0 SET @sql_orderby = @sql_orderby + ', '
    SET @sql_orderby = @sql_orderby + ' pmm.DisplayOrder ASC'
  END
    
  --name
  IF LEN(@sql_orderby) > 0 SET @sql_orderby = @sql_orderby + ', '
  SET @sql_orderby = @sql_orderby + ' p.[Name] ASC'
END
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.