Author Topic: String custom filed does not work as expected, no dropdown list in frontend.  (Read 2166 times)

michelerighetti

  • Beginner
  • *
  • Posts: 9
  • intermediate
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
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

  • Beginner
  • *
  • Posts: 9
  • intermediate
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
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

  • Beginner
  • *
  • Posts: 9
  • intermediate
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Remove the linefeed.

KEY_1;KEY_2;KEY_3;

Then it should work

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

michelerighetti

  • Beginner
  • *
  • Posts: 9
  • intermediate
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
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

  • Beginner
  • *
  • Posts: 9
  • intermediate
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10249
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
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.

michelerighetti

  • Beginner
  • *
  • Posts: 9
  • intermediate
Yes ;D now it works.
 Thankyou to all.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Nice you have it working :)

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