Close

Show Local Name in Results

mail2mhm
9 years ago
#7871 Quote
Avatar
  • 10
Hello guys and support team
I have a request:
Is there any way to show both "Name" and "Local Name" of a product In nop.Instant.Search, in two separate lines?
hristian.dimov
9 years ago
#7873 Quote
Avatar
  • Moderator
  • 386
mail2mhm wrote:
Hello guys and support team
I have a request:
Is there any way to show both "Name" and "Local Name" of a product In nop.Instant.Search, in two separate lines?


Hi mail2mhm,

What do you mean by "Local Name". There is no such field in the Product entity. Please elaborate on this.
Regards,
Hristian Dimov
Nop-Templates.com
mail2mhm
9 years ago
#7874 Quote
Avatar
  • 10
hello
Dear hristian.dimov
We have 2 languages for our website and also We have 3 name s for our products, first one is Standard, that can not be left blank, second name is English, and third name is Arabic.
So When we choose Arabic for our site, local name means Arabic, and when we choose English for our site, the local name means English....
So we want to have a result in nop.instant.search in Both Standard name and local name.
Regards
mail2mhm
9 years ago
#7875 Quote
Avatar
  • 10
in fact we want to modify this section in view file :

template: '<div class="instant-search-item" data-url="@storeLocation/${ data.SeName }">' +
                                   '<div class="img-block">' +
                                       '<img src="${ data.DefaultPictureModel.ImageUrl }" alt="${ data.Name }" title="${ data.Name }" style="border:none">' +
                                   '</div>' +
                                   '<div class="detail">' +
                                      '<div class="title">${ data.Name }</div>' +
 
                                      '<div class="price"># var price = ""; if (data.ProductPrice.Price) { price = data.ProductPrice.Price } # #= price #</div>' +
                                    '</div>' +
                              '</div>',
hristian.dimov
9 years ago
#7876 Quote
Avatar
  • Moderator
  • 386
mail2mhm wrote:
hello
Dear hristian.dimov
We have 2 languages for our website and also We have 3 name s for our products, first one is Standard, that can not be left blank, second name is English, and third name is Arabic.
So When we choose Arabic for our site, local name means Arabic, and when we choose English for our site, the local name means English....
So we want to have a result in nop.instant.search in Both Standard name and local name.
Regards


Hi mail2mhm,

Unfortunately this is not possible. These 3 names are depending on what language you are currently using. Example: if you choose English then the product will be with English name;if you choose Arabic -> it will be in Arabic. So when the product model is prepared it will take the name for the currently selected language ( this is the way nopCommerce works ).

Hope this helps !
Regards,
Hristian Dimov
Nop-Templates.com