- Posts: 43
- Thank you received: 0
Remove custom field in only one language
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.41-1
-- Browser(s) name and version -- : all
Hi,
In the checkout is a custom field labelled "State".
Is it possible to remove it from the Dutch version of the site while
preserving it in the English version?
Another field reads (in Dutch): "Familienaam", which is rather oldfashioned.
Could it be replaced by "Achternaam"?
In English it is correct ("Last name".
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
1.
To remove your order custom field (not required) from your Dutch version, the solution will be to directly edit the "custom_fields" file of the "Checkout" view of your front-end template via "Hikashop->Display->Views", and change these lines :
Here is the documentation of Hikashop custom fields :
Label : The label of the field. You can translate it via joomfish. Note that core custom fields should be translated via the translation file of hikashop so that everyone can benefit of the translations. In the translation file, you will find them by searching for the english label which will be uppercase and spaces replaced with _. For example, you will find "Middle name" with the key MIDDLE_NAME in the translation file. You can edit the translation files of HikaShop in the configuration page of HikaShop, under the tab languages.
Please Log in or Create an account to join the conversation.
Joomfish won't install on my Joomla 3.
Would Falang do?
Please Log in or Create an account to join the conversation.
I assumed that I had to replace 'Your_Customfield_Column' by 'address_state'.
Is that correct?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Can you show me how did you edited the code that I gave you and how you configured your "Staat" custom field through some screenshots ?
Thanks.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Can you try to replace the line:
if($lang->get('tag') == 'nl-NL' && $fieldName == 'address_state')
by:
if($lang->getTag() == 'nl-NL' && $fieldName == 'address_state')
in your file ?
Please Log in or Create an account to join the conversation.
I'm afraid that doesn't work too.
Please Log in or Create an account to join the conversation.
Is the custom field "address_state" the one created by default by HikaShop or you have created a new custom order field for that ?
If it is the default one, so the view to edit in your case is "address / form".
Please Log in or Create an account to join the conversation.
I would be very happy with some code to add/replace in the address/form file.
Please Log in or Create an account to join the conversation.
Xavier is right in that the code Mohamed provided is only for custom fields of the table "order" not for custom address fields like the one you want to display/hide. However, he was wrong on the file to edit.
For custom address fields on the registration form, you want instead to edit the file "custom_fields" of the view "user".
There, you can add such code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
When I click the button in the checkout to change the billing / shipping address
the 'State' field appears again in the Dutch site.
I assume some other PHP file(s) should be edited?.
Please Log in or Create an account to join the conversation.
Yes, for that page, the same change should be made in the file "form" of the view "address".
Please Log in or Create an account to join the conversation.
If my editing is correct (see screenshot) I 'm afraid I edited the wrong file.
"Staat" is still there in Dutch.
Please Log in or Create an account to join the conversation.
It depends on which front-end template you're using (you are editing the view for the template "beez3") and which kind of address selector you're using in the checkout.
Depending if you're using the "popup", the "list" or the "dropdown" address selector, the used view in HikaShop might not be the same.
The "list" and "dropdown" selectors are using "address | show" while the popup is using "address | form".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
You're perfectly right. I wasn't paying attention so I edited the address / form file for the beez3 template.
I should have edited this file for the favouritedark template. Now I've done that the problem is solved.
Please Log in or Create an account to join the conversation.