Skip to main content

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

More
6 years 10 months ago #312874 by sixdeuces
-- 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.

More
6 years 10 months ago - 6 years 10 months ago #312875 by Philip
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 years 10 months ago by nicolas.

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

More
6 years 10 months ago - 6 years 10 months ago #312889 by lousyfool

Philip wrote: "MY_MM"= m-m


Sorry, but that's wrong syntax. It must be
Code:
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: 6 years 10 months ago by lousyfool.

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

More
6 years 10 months ago - 6 years 10 months ago #312890 by lousyfool
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
Code:
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: 6 years 10 months ago by lousyfool.

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

More
6 years 10 months ago #312898 by nicolas
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.228 seconds
Powered by Kunena Forum