VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: EvanGR on June 24, 2019, 11:23:40 AM

Title: Custom fields with multiple values
Post by: EvanGR 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]
Title: Re: Custom fields with multiple values
Post by: Hawker 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.
Title: Re: Custom fields with multiple values
Post by: PRO on June 25, 2019, 22:19:06 PM
Quote from: EvanGR on June 24, 2019, 11:23:40 AM
. 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.