Products translation ?

11 years ago
I ve probably forgot this fonction.

I ve'nt solve it, but i ll do asap.
11 years ago

are you implementing the feature in the latest version ?
11 years ago
Working on it.
11 years ago
i've solved the search bug. To fix this bug, alter the Nop_ProductSearch.

ALTER PROCEDURE [dbo].[Nop_ProductSearch]
  @Keywords    NVARCHAR(MAX),  
  @SearchDescriptions bit = 0,
    @PageNumber    INT = 1,
    @PageSize    INT = 20,  
  @ShowHidden bit = 0,
  @TotalProducts INT OUTPUT,
  @Language VARCHAR(10)


    IF @PageSize is null or @PageSize = 0
        SET @PageSize = 20

    SET @Keywords = '%' + rtrim(ltrim(@Keywords)) + '%'

  CREATE TABLE #ProductFilter
      ProductFilterID int IDENTITY (1, 1) NOT NULL,
      ProductID int not null

  IF ((@Keywords IS NOT NULL) AND (LEN(@Keywords) > 0))
      INSERT #ProductFilter (ProductID)
      SELECT distinct p.ProductID
        Nop_Product p with (NOLOCK)
        left join Nop_ProductVariant pv  with (NOLOCK) ON p.ProductID = pv.ProductID            
            patindex(@Keywords, isnull(, '')) > 0
            or patindex(@Keywords, isnull(, '')) > 0
            or patindex(@Keywords, isnull(pv.sku , '')) > 0
            or (@SearchDescriptions = 1 and patindex(@Keywords, isnull(p.ShortDescription, '')) > 0)
            or (@SearchDescriptions = 1 and patindex(@Keywords, isnull(p.FullDescription, '')) > 0)
            or (@SearchDescriptions = 1 and patindex(@Keywords, isnull(pv.Description, '')) > 0)
        and (p.Published = 1 or @ShowHidden = 1)
        and (pv.Published = 1 or @ShowHidden = 1)
        and p.Deleted = 0
        and pv.Deleted = 0

  SELECT  @TotalProducts = COUNT(ProductID)
  FROM  #ProductFilter

  DECLARE @FirstRec int, @LastRec int
  SELECT @FirstRec = (@PageNumber-1) * @PageSize
  SELECT @LastRec = (@PageNumber * @PageSize + 1)

  SELECT [p].[ProductId]
  FROM [Nop_Product] p with (NOLOCK)
    inner join #ProductFilter pf  with (NOLOCK) ON p.ProductID = pf.ProductID
    INNER JOIN Nop_Translate_Product ON Nop_Translate_Product.Fk_ProductId = [p].[ProductId]
  WHERE pf.ProductFilterID > @FirstRec AND pf.ProductFilterID < @LastRec
  AND Nop_Translate_Product.Language = @Language
  ORDER BY p.Name

  DROP TABLE #ProductFilter
11 years ago
thank a lot
11 years ago
Hi Tely, first of all you did a great contribution!! Thank you!!
Let me ask you, did you do these changes on the nopCommerce version 1.11 ??
I'm working now with the latest 1.2 and I woul like to implement your translation feature.
Could you tell me (if you remember) all the pages you changed.
When I finish this I will provide the source to everybody too.
Thanks again.
11 years ago
I'm checking out your app., I'm guessing that you didn't create a UI to enter the translations, correct? At the time you create a product it creates an entry on the translations table and then you change the translation values from the db. Is that how it works?
I will try to create UI and implement it on the products administration.
Any additional info will be welcomed.
11 years ago
Hi, Tely

Does your solution work well also in nopcommerce 1.2? Thank you.
11 years ago
Hi Tely. Excellent work on this. It's exactly what I'm looking for.
Any idea when it should be released for v1.2?
11 years ago
Would it be possible to use Google Translation Services to translate products in some way or is it the easy way to create some panel that will hold the Google Translation Dropdown with all the languages?