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

  • Posts: 31
  • Thank you received: 2
  • Hikashop Business
4 years 4 months 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: 4486
  • Thank you received: 609
  • MODERATOR
4 years 4 months 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: 4 years 4 months ago by nicolas.

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

  • Posts: 2143
  • Thank you received: 747
4 years 4 months ago #312889

Philip wrote: "MY_MM"= m-m


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


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 4 years 4 months ago by lousyfool.

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

  • Posts: 2143
  • Thank you received: 747
4 years 4 months 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 ;)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 4 years 4 months ago by lousyfool.

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
4 years 4 months 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.065 seconds
Powered by Kunena Forum