Product listing sorting causes translation to not work

  • Posts: 27
  • Thank you received: 4
  • Hikashop Business
3 months 4 weeks ago #302960

-- HikaShop version -- : 4.0.2
-- Joomla version -- : 3.9.2
-- Browser(s) name and version -- : Firefox 64.0.2

I have Falang set as the translation engine.

Steps to reproduce:

  1. Go to main product listing page. Change language to something other than English (English is default). Products are listed correctly in that language.
  2. Choose any sorting
  3. The page will now show the products in English.
  4. Clear all filters. The products are back in the site language.


From what I could tell, it's a query in the Product view.html.php when trying to fetch rows.
When there is no sorting, Falang will see LEFT JOIN #__hikashop_product AS b and correctly translate the product names.
When a sorting is chosen, Falang will see LEFT JOIN (SELECT ...) AS b and my guess is since this is a subquery, Falang doesn't correctly translate the products.

I can't seem to get any further. Is there anything I can do to fix this, or will there be a fix in an update?

Please Log in or Create an account to join the conversation.

  • Posts: 65706
  • Thank you received: 9590
  • MODERATOR
3 months 4 weeks ago #302964

Hi,

I'm not sure why there would be a subquery for the sorting by name, however, for the sorting by price, it is necessary to have a subquery to be able handle the prices properly in all the different cases without breaking the pagination system.
So I don't see what we could do in our code. Believe me, we would love to be able to separate the query into 2 to reduce the processing time of the query, but we had to do it that way.
It would be great if Falang could handle subqueries but I suspect it won't be easy to handle either. I would still recommend contacting them and see if there is something they can do about it.
Also, we still have on our todo list the creation of our own translation system in the future, at which point this wouldn't be a problem. But as it's not a priority I can't see that as a potential solution for you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum