Translation for custom field not showing up

  • Posts: 25
  • Thank you received: 4
  • Hikashop Essential
1 month 2 days ago #359770

-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.2
-- Browser(s) name and version -- : Firefox


I’ve created a custom field (WYSIWYG) and added it in the hikashop/ display/ views – “show_tabular” file where the price is originally located using the below command (“originalartwork” is the column name of my custom field) :

<?php echo $this->element->originalartwork; ?>

I’ve enabled “translatable” in the custom field setting and turned off display on the front-end, so that my custom field's content doesn’t appear in the specifications’ section. The custom field's box appears when I click on the French language file (translations) for a specific product; however, when I enter the French text, save the file and check the French page on the frontend, it shows the English text, not the French translation that I’ve entered. The French text I entered for the description of the product is appearing when I open the product’s French page though.

Is there something I’m not doing well?

Here is the link to the page I’ve been working on to try the layout/ settings:

Thank you!

Last edit: 1 month 1 day ago by Noe.

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

  • Posts: 81428
  • Thank you received: 13058
1 month 1 day ago #359784


The code you're using is the code to display the value of the custom field for the product directly from the database, without any processing.
So you would have to use code like this instead:

$field = $this->fieldsClass->getField('originalartwork', 'product');
echo $this->fieldsClass->show($field, $this->element->originalartwork);
This will handle translations, content tags, etc.

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

Time to create page: 0.047 seconds
Powered by Kunena Forum