Product characteristic 'M-M' automatically converted to 'mm'

  • Posts: 18
  • Thank you received: 0
  • Hikashop Business
1 week 10 hours ago #312874

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.24
-- Browser(s) name and version -- : Chrome

As the title states, I have a product characteristic of the string 'M-M'. This is shorthand for "Mens Medium". It saves with no problem, but when displayed on the front end it gets converted to 'mm'. Other values in the same characteristic such as 'M-XL' and 'M-XXS' are not affected.

I assume it's trying to auto-correct it to millimeters. Is there a way to disable this behavior?

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

  • Posts: 2287
  • Thank you received: 298
  • MODERATOR
6 days 22 hours ago #312875

Hello,

Yes, you right it's converted and translated automatically, what you have to do is create in your language file a new translation as this example :
"MY_MM"="m-m"

Hope this will fit your needs !
Regards

Last edit: 6 days 18 hours ago by nicolas.

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

  • Posts: 1898
  • Thank you received: 632
  • Hikamarket Multivendor Hikashop Business
6 days 22 hours ago #312889

Philip wrote: "MY_MM"= m-m


Sorry, but that's wrong syntax. It must be
M-M="M-M"

Last edit: 6 days 22 hours ago by lousyfool.

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

  • Posts: 1898
  • Thank you received: 632
  • Hikamarket Multivendor Hikashop Business
6 days 22 hours ago #312890

Actually, I just checked, and it must come from the HikaShop translation MM="mm" as used for the month in credit card details.
So, you want to make your translation override

MM="M-M"
trusting that you won't use the related credit card payment method ;)

Last edit: 6 days 22 hours ago by lousyfool.

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
6 days 17 hours ago #312898

Hi,

Philip was indeed missing the double quotes in his message. I've edited it.
And yes, you want to create your own override, that's why Philip was recommanding using the MY_MM key so that you can then replace M-M in the characteristic by MY_MM so that the translation system will replace MY_MM by M-M on the frontend.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum