- Posts: 20
- Thank you received: 5
Category names not displaying properly
5 years 6 months ago #330360
by confidant
Category names not displaying properly was created by confidant
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.12
-- Browser(s) name and version -- : Firefox Mac 78.7.1
I imported a spreadsheet of products and I created columns for "parent_category" and "categories". The import was successful, and it created categories A,B,C,D,E,F,G,H and J. Each of those categories has subcategories named like "A1, A2, A3, etc."
The only category with more than ten subcategories is J. That category followed the same naming convention in the spreadsheet, but Hikashop admin pages do not display those names properly in the sidebar category tree, or in the product editing page, or in the category listing. On many of the categories it drops the J from the start and just shows a number instead of "J1, J2, J3, etc." (see the attached image).
If I view the categories table in PHPMyAdmin, the category_name field is correct.
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.12
-- Browser(s) name and version -- : Firefox Mac 78.7.1
I imported a spreadsheet of products and I created columns for "parent_category" and "categories". The import was successful, and it created categories A,B,C,D,E,F,G,H and J. Each of those categories has subcategories named like "A1, A2, A3, etc."
The only category with more than ten subcategories is J. That category followed the same naming convention in the spreadsheet, but Hikashop admin pages do not display those names properly in the sidebar category tree, or in the product editing page, or in the category listing. On many of the categories it drops the J from the start and just shows a number instead of "J1, J2, J3, etc." (see the attached image).
If I view the categories table in PHPMyAdmin, the category_name field is correct.
Please Log in or Create an account to join the conversation.
5 years 6 months ago #330372
by nicolas
Replied by nicolas on topic Category names not displaying properly
Hi,
I suppose that the issue is that you have an extension with translation keys for J1, J2, etc and thus, when HikaShop displays the category name on its interface, the name gets translated with the translation from the other extension which only has the number.
The simplest in that case will be to circumvent the problem and change these category names to something like: MY_J1, MY_J2, MY_J3 and then, under the Languages tab of the HikaShop configuration, edit your translation file and on the override area on the right add such rows:
MY_J1="J1"
MY_J2="J2"
MY_J3="J3"
etc
That way, your categories name will be translated to J1, J2 , J3 when displayed everywhere in HikaShop.
I suppose that the issue is that you have an extension with translation keys for J1, J2, etc and thus, when HikaShop displays the category name on its interface, the name gets translated with the translation from the other extension which only has the number.
The simplest in that case will be to circumvent the problem and change these category names to something like: MY_J1, MY_J2, MY_J3 and then, under the Languages tab of the HikaShop configuration, edit your translation file and on the override area on the right add such rows:
MY_J1="J1"
MY_J2="J2"
MY_J3="J3"
etc
That way, your categories name will be translated to J1, J2 , J3 when displayed everywhere in HikaShop.
Please Log in or Create an account to join the conversation.
5 years 6 months ago - 5 years 6 months ago #330392
by confidant
Replied by confidant on topic Category names not displaying properly
I learned that these are language constants defined in en-GB.ini. It seems funny that Hikashop is parsing category names where a user is expecting to simply enter their own data. I entered overrides for those constants. For now it seems to be working. I will report back if there are complications.
Last edit: 5 years 6 months ago by confidant.
The following user(s) said Thank You: Philip
Please Log in or Create an account to join the conversation.
Time to create page: 0.215 seconds