I have a situation with a dropdown list within my Prestashop 1.7.5.1 Site-Template, in the products section a Dropdown appears to filter by:
Best Seller, Relevance, From AZ, From ZA, price 0-1, price 1-0
I have searched and searched for a way to translate the word Best Seller, because my site is only managed in Spanish. When a word doesn't translate well, from the element inspector I look for the module that contains it and I modify the LS of this file to the language I want, but I can't find Best Seller.
Inside this location: public_html/themes/MyTemplate/templates/catalog/_partials/sort-orders.tpl
I found the file that is where the variables that are listed in that Dropdown are taken from
<div class="products-sort-order dropdown mb-1">
<span class="sort-by">{l s='Sort by:' d='Shop.Theme.Global'}</span>
<div>
<span data-toggle="dropdown">{if isset($listing.sort_selected)}{$listing.sort_selected}{else}{l
s='Select' d='Shop.Theme.Actions'}{/if}<i class="linearicons-chevron-down ml-1"></i></span>
<div class="dropdown-menu dropdown-menu-right">
{foreach from=$listing.sort_orders item=sort_order}
<a
rel="nofollow"
href="{$sort_order.url}"
class="select-list dropdown-item {['current' => $sort_order.current, 'js-search-link' =>
true]|classnames}"
>
{$sort_order.label}
</a>
{/foreach}
</div>
</div>
</div>
I can't find where the $listing.sort_orders variable calls me from , which is where I think the list that is displayed in said dropdown is located.
I have searched for more than 20 Prestashop forums and I can't find how to solve this. There is a question asked since 2017 questioning this as well and no one has responded to this forum on Prestashop.
Can someone tell me how to fix it?
I answer my question after investigations, apparently it is something very common in PrestaShop templates to have problems when doing this translation.
The translation of 'Best sellers' should be modified in International->Translations->Module translations->Faceted search->Store But it does not appear there due to a PrestaShop bug 1751. IMAGE1
You can try other translation recommendations in the PrestaShop forum FORUM #1
If none of these options work for you, you can go to the code directly and modify the .php file directly located modules/ps_facetedsearch/src/Product/SearchProvider.php IMAGE2
I hope someone finds this helpful.