Author Topic: Custom fields with multiple values  (Read 312 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 275
Custom fields with multiple values
« on: June 24, 2019, 11:23:40 am »
Hello,

I am trying to create a custom field with multiple values, and I want each value to appear separately in the front-end (like you would with tags for example).
I import my data in bulk using CSVi. The custom field values are separated by a semi-colon. Unfortunately, in the front-end, the values appear with a semi-colon, just like I imported them.

(See attached screenshots for how the custom fields appear in the front-end, and how the custom-field is configured in the backend)

Any assistance appreciated, thanks!

[Joomla 3.9.8, VM 3.4.5.10063]

Hawker

  • Jr. Member
  • **
  • Posts: 69
  • A beginner
Re: Custom fields with multiple values
« Reply #1 on: June 25, 2019, 17:45:26 pm »
A guess here, but it looks as if CSVi might not be importing to Customfields correctly. - Ask the makers through their support board?

Long shot: have you checked that there are no space characters in the Customfield cells of your CSV file?
If in VM3 there is only one custom field for many products, then it should not be too difficult to input the years into the customfield itself, with semicolons correctly placed.
VM v. 3.4.2
Joomla v. 3.9.5
PHP v. 7.2.1

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10376
  • VirtueMart Version: 3+
Re: Custom fields with multiple values
« Reply #2 on: June 25, 2019, 22:19:06 pm »
. Unfortunately, in the front-end, the values appear with a semi-colon, just like I imported them.


You need to use php explode() to split them on the front end if you want to keep them separated by semicolon in database.
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)