News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

String custom filed does not work as expected, no dropdown list in frontend.

Started by michelerighetti, November 03, 2020, 10:23:14 AM

Previous topic - Next topic

michelerighetti

Hello to all. I have this problem, when I set up a custom field string, I can see the dropdown list in backend, but in frontend appears only the value selected in backend.
to make a custom filed string that works correctly I have to duplicate a previous string custom filed that works previously and so the new one works too.
Furthermore the qith this copied custom filed the translation not works properly: in fact it only translates the first value, the other values remain with the constant.
Shomeone can help me?

Jörgen

You have to set the caustom field as input for cart otherwise You have prechoosen the value in Your backen for the customer to see.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

michelerighetti

Quote from: Jörgen on November 03, 2020, 19:37:59 PM
You have to set the caustom field as input for cart otherwise You have prechoosen the value in Your backen for the customer to see.

Jörgen @ Kreativ Fotografi
Thankyou Jörgen for your quick reply. Now it works.
What do you think about the language that only translates the first value ?

Jörgen

I have not tried this myself. But make the translation
MY_COLORS = "Red;Green;Blue";

I guess this will work.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

michelerighetti

Quote from: Jörgen on November 03, 2020, 23:14:59 PM
I have not tried this myself. But make the translation
MY_COLORS = "Red;Green;Blue";

I guess this will work.

Jörgen

You mean "MY_COLORS" is the first dropdown value and "Red; Green; Blue" are all translated values including the first?
I have tried this and it doesn't work.

Michele

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

michelerighetti

Quote from: Jörgen on November 04, 2020, 08:10:31 AM
Remove the linefeed.

KEY_1;KEY_2;KEY_3;

Then it should work

Jörgen
Thankyou Jörgen, I did as you say, I removed the keys in the language overrides file, but it doesn't work. Maybe I didn't understand what to do. so I describe how I set the string field:
I have a sring with KEY_1;KEY_2;KEY_3; (3 selection options in frontend), I have set a overrides language file with
KEY_1="option 1"
KEY_2="option 2"
KEY_3="option 3"
In frontend only the first value is taken
This don't works.

Jörgen

Have you removed the LINEFEEDS in Your first setup??
It should look like:

VALORE_1;VALORE_2;VALORE_3;

This works since years, I have tested it on VM version 3.2.12.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

michelerighetti

Quote from: Jörgen on November 04, 2020, 23:30:00 PM
Have you removed the LINEFEEDS in Your first setup??
It should look like:

VALORE_1;VALORE_2;VALORE_3;

This works since years, I have tested it on VM version 3.2.12.

Jörgen
Hi Jörgen thanks for your help and patience
I have removed the keys from the default values in the setup, and so the sringa field does not give me options if I apply it to a product.
Maybe I don't understand what and where I have to remove the keys, and where I have to write the translations.
Michele

GJC Web Design

I think Joerg means use
VALORE_1;VALORE_2;VALORE_3;

in the valore predefinito with NO line breaks
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

Yes, thank you John

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.


Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.