iman.m wrote:Dear Ima9ines
Thank you for your replies.
The Product name in product page issue have been solved by your help.
Now i have another problem:
My product has 2 names, one in Arabic and another one in English:
"Iphone" in English tab
"آی فون" in Arabic tab
And because its necessary to set a name for Standard, I have set Iphone in it.
Now when I load my store in Arabic language, everything is all right, except that when I search these names, the result is the same, For example when i search "آی فون", it shows the product with its Arabic name:"آی فون" that is correct.
But when I search "Iphone", result shows "آی فون" Again!! that is not correct.In other words, the result is related to webpage language..... not what i search....
I want to show the results in Its language,like: when i search iphone, "Iphone" appears, and when i search "آی فون" its arabic name(آی فون) appears.
Or if its possible, show both names, for each of its names, for example when "Iphone" or "آی فون" is searched, the result shows both names in two seperate lines, like:
آی فون
Iphone
Another thing is in management, in Bulk edit Menu(Catalog-->Products--> Bulk edit products), I want to show a column beside "name" column, that shows "Local name". Can you help me to add this column, too?
Hi again,
I have solution for you, it likely not perfect fit your requirements, but I think it is acceptable.
Continue with the first modification in above posts. We should modify something more.
Following are steps:
- Edit the "ProductLoadAllPaged" SQL Server procedure
- Find following block of code:
DECLARE
@SearchKeywords bit,
@sql nvarchar(max),
@sql_orderby nvarchar(max)
and then, replace with
DECLARE
@SearchKeywords bit,
@sql nvarchar(max),
@sql_orderby nvarchar(max),
@oneLanguageCondition nvarchar(max),
@allLanguagesCondition nvarchar(max)
- Find following block of code:
--localized product name
SET @sql = @sql + '
and then, replace with
SET @oneLanguageCondition = 'AND lp.LanguageId = ' + ISNULL(CAST(@LanguageId AS nvarchar(max)), '0')
SET @allLanguagesCondition = 'AND lp.LanguageId IN (SELECT l.Id FROM Language AS l)'
--localized product name
SET @sql = @sql + '
- Next block
--localized product name
SET @sql = @sql + '
UNION
SELECT lp.EntityId
FROM LocalizedProperty lp with (NOLOCK)
WHERE
lp.LocaleKeyGroup = N''Product''
AND lp.LanguageId = ' + ISNULL(CAST(@LanguageId AS nvarchar(max)), '0') + '
AND lp.LocaleKey = N''Name'''
IF @UseFullTextSearch = 1
replace with
--localized product name
SET @sql = @sql + '
UNION
SELECT lp.EntityId
FROM LocalizedProperty lp with (NOLOCK)
WHERE
lp.LocaleKeyGroup = N''Product'''
IF @LanguageId = 0
SET @sql = @sql + @allLanguagesCondition
ELSE
SET @sql = @sql + @oneLanguageCondition
SET @sql = @sql + ' AND lp.LocaleKey = N''Name'''
IF @UseFullTextSearch = 1
- Next block
--localized product short description
SET @sql = @sql + '
UNION
SELECT lp.EntityId
FROM LocalizedProperty lp with (NOLOCK)
WHERE
lp.LocaleKeyGroup = N''Product'''
IF @LanguageId = 0
SET @sql = @sql + @allLanguagesCondition
ELSE
SET @sql = @sql + @oneLanguageCondition
SET @sql = @sql + 'AND lp.LocaleKey = N''ShortDescription'''
IF @UseFullTextSearch = 1
replace with
--localized product short description
SET @sql = @sql + '
UNION
SELECT lp.EntityId
FROM LocalizedProperty lp with (NOLOCK)
WHERE
lp.LocaleKeyGroup = N''Product''
AND lp.LanguageId = ' + ISNULL(CAST(@LanguageId AS nvarchar(max)), '0') + '
AND lp.LocaleKey = N''ShortDescription'''
IF @UseFullTextSearch = 1
- Next block
--localized product full description
SET @sql = @sql + '
UNION
SELECT lp.EntityId
FROM LocalizedProperty lp with (NOLOCK)
WHERE
lp.LocaleKeyGroup = N''Product''
AND lp.LanguageId = ' + ISNULL(CAST(@LanguageId AS nvarchar(max)), '0') + '
AND lp.LocaleKey = N''FullDescription'''
IF @UseFullTextSearch = 1
replace with
--localized product full description
SET @sql = @sql + '
UNION
SELECT lp.EntityId
FROM LocalizedProperty lp with (NOLOCK)
WHERE
lp.LocaleKeyGroup = N''Product'''
IF @LanguageId = 0
SET @sql = @sql + @allLanguagesCondition
ELSE
SET @sql = @sql + @oneLanguageCondition
SET @sql = @sql + 'AND lp.LocaleKey = N''FullDescription'''
IF @UseFullTextSearch = 1
- Next block
--localized product tag
SET @sql = @sql + '
UNION
SELECT pptm.Product_Id
FROM LocalizedProperty lp with (NOLOCK) INNER JOIN Product_ProductTag_Mapping pptm with(NOLOCK) ON lp.EntityId = pptm.ProductTag_Id
WHERE
lp.LocaleKeyGroup = N''ProductTag''
AND lp.LanguageId = ' + ISNULL(CAST(@LanguageId AS nvarchar(max)), '0') + '
AND lp.LocaleKey = N''Name'''
IF @UseFullTextSearch = 1
replace with
--localized product tag
SET @sql = @sql + '
UNION
SELECT pptm.Product_Id
FROM LocalizedProperty lp with (NOLOCK) INNER JOIN Product_ProductTag_Mapping pptm with(NOLOCK) ON lp.EntityId = pptm.ProductTag_Id
WHERE
lp.LocaleKeyGroup = N''ProductTag'''
IF @LanguageId = 0
SET @sql = @sql + @allLanguagesCondition
ELSE
SET @sql = @sql + @oneLanguageCondition
SET @sql = @sql + 'AND lp.LocaleKey = N''Name'''
IF @UseFullTextSearch = 1
- Update the SQL Server procedure