- Posts: 50
- Thank you received: 1
Search with translated custom field values
My subject is maybe similar to www.hikashop.com/forum/2-general-talk-ab...h-falang.html#124731
but my problem is that I can not get hits from translated values custom fields in search. It works great in english (default) but not in my second language. I have set the Product search plugin correctly and getting hits from the english values. No hits in my second language. I have translated the values of the custom fields in Falang. Am I doing something wrong? Or is it not possible to do this?
I guess one solution is to make two custom fields. One for English and one for Swedish... Hmm
Regards
Mathias
Please Log in or Create an account to join the conversation.
The search plugins handle the translations search. However, it will only search in the translations of the current language of the website. So if your website is displayed in english while you search a word in french, it won't look at the french translations and won't return any match.
Also, if the search plugin already finds at least a match in a product's main data, it won't look into the translations.
Please Log in or Create an account to join the conversation.
1. When doing a search in english display I get hits in english from product name, product description and product level (my custom field value). Doing a search in swedish display I get hits in swedish from product name, product description but NOT product level (my custom field value).
All translations made within Hikashop (product name, product description) works fine. It is the translation of my custom field values done in Falang that do not work.
When I do a search in swedish display with "english values" of the custom field I get hits. That would indicate that the translation does not work right? Maybe it is a Falang problem?
2. One other strange thing I noticed. When doing searches with values in custom fields the numbers do no not get searched. I will explain:
My custom field values (as stored in db):
Level 1:Very Easy
Level 2:Easy
Level 3:Intermediate
and so on...
When eg doing:
Search on "Level 2" -Hits from all products
Search on "Level" -Hits from all products.
Search on "Easy" -Hits from correct products.
Search on "Level Easy" -Hits from correct products.
How come?
/Mathias
Please Log in or Create an account to join the conversation.
It is a Joomla thing. The search component is restricting seaches to words only to be 3 letter words. I had to make changes to allow the search component to process searching for words with one letter.
Solution:
Copy file /language/en-GB/en-GB.localise.php to /language/overrides/
Make changes to the copied file from
to
Then do the same thing with file /administrator/language/en-GB.localise.php (copy and make changes)
There you have it.
My main problem stated in the subject of this thread is however no solved. (No 1 in prev post)
/Mathias
Please Log in or Create an account to join the conversation.
You can't translate the product values of custom product fields via Falang. You can only translate the value of the fields.
So if you use a custom product of the type "text" and that for each product you translate the value of that field via Falang, you will be able to search in the translations of the field.
But if you translate the values of the field via Falang, it's always the english value which is stored in the product and the translation is Falang is not linked to the product but to the field which is why the search system doesn't find it. Unfortunately, it would be quite complex to support that.
Please Log in or Create an account to join the conversation.
You say:
How is that possible? Custom fields does not show in individual product translations. In Falang it is the same as picking the flag in product edit in Hika. Only hika default fields are there.So if you use a custom product of the type "text" and that for each product you translate the value of that field via Falang, you will be able to search in the translations of the field.
Please Log in or Create an account to join the conversation.
Something like that:
<field type="text" name="COLUMN_NAME" length="255" maxlength="255" translate="1">My field</field>
Please Log in or Create an account to join the conversation.
One final thing:
Is it possible to get the translation custom fields to be shown in Hika when you click on the flag? Or maybe that is the complex part?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Once again thanks for all your help.
Regards
Mathias
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I've installed in Falang the updated xml with added custom fields.
It is well recognized by falang that also shows the sample data with all the fields.
But the added fields doesn't show up in the translation form for the product, what else to do ?
Thank you for your help
Please Log in or Create an account to join the conversation.
I've installed in Falang the updated xml with added custom fields.
It is well recognized by falang that also shows the sample data with all the fields.
But the added fields doesn't show up in the translation form for the product, what else to do ?
Thank you for your help
(I'm sorry for duplicate posting)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I attach here some screenshot about configuration and views where custom fields are missing ...
Thank you for any suggestion
Please Log in or Create an account to join the conversation.
Adding the fields as being translatable in Falang/JoomFish won't make them appear in the translation edition popup of Hikashop.
What that allows you to do, is to translate them via the translation interface of Falang/JoomFish.
So it's actually normal.
Please Log in or Create an account to join the conversation.
after upgrading to latest hikashop my backend in Falang for translations of hikashop products hangs (see attachment).
Maybe some field update in the db or something to re-update in Falang for custom fields ?
Please Log in or Create an account to join the conversation.
Mathias
Please Log in or Create an account to join the conversation.
That should then display an error message on that blank page with more information on what's going on.
Please Log in or Create an account to join the conversation.
This should be connected to custom fields previously added, but in hikashop backend they still works fine.
Here is a screenshot with the debug/error_reporting enabled if I try to access the "Content Elements - Hikashop Products" section.
Also if I try to access the Translations sections the hikashop products are listed, clicking on a product it reports a white screen with this error:
I've also tried to uninstall an reinstall Falang but nothing changes ...
Please Log in or Create an account to join the conversation.