VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: visitmontaione on November 22, 2022, 10:22:20 AM

Title: Custom fields how to setup multiple attributes.
Post by: visitmontaione on November 22, 2022, 10:22:20 AM
Hello, I have to setup simple attributes to a product that are NOT product variant but just specification.

For example for each wine I would like to assign the kind of grape it is made by, as follow:

Wine Crioperla: Cabernet Franc;Cabernet Sauvignon

Wine Borgoforte: Sangiovese;Sauvignon Blanc;Syrah;

And so on for other wines.

Each value (the kind of grape), must be a value for a product filter.

How can I setup in custom field?

I have done the same job in custom field for "Year" attributes. But it was easy because I only have to select one year per each wine.

Now, instead I need to make a multiple selection for kind of grape, because a wine can be made by different grapes.

Is there a solution for that in VM or I need specific extension/plugin?

Thanks and regards
Title: Re: Custom fields how to setup multiple attributes.
Post by: Jörgen on November 23, 2022, 11:21:26 AM
Hello
Set up a custom attribute string

Title: Wine Crioperla
Attribute cart (YES)
Input (NO)

Default value: Cabernet Franc;Cabernet Sauvignon

Admin only (YES)
Is list (YES)


You add this to your product and you can select between Cabernet Franc and Cabernet Sauvignon

Jörgen @ Kreativ Fotografi
Title: Re: Custom fields how to setup multiple attributes.
Post by: visitmontaione on November 23, 2022, 12:56:33 PM
Hello Joergen, thank you for your reply.

I've already done, but this way allow to select only 1 value per product.

Instead I need to add several value per wine/product because a wine is made no only by 1, but 2 or more variety of grapes.

I am afraid I can do simply with VM.  ::)
Title: Re: Custom fields how to setup multiple attributes.
Post by: balai on November 23, 2022, 13:31:50 PM
If you use the core VM's custom fields, you have to re-assign the same custom field to the product to add a new value.

Alternatively you could use a custom field plugin like Custom Fields For All (https://breakdesigns.net/extensions/joomla/custom-fields-for-all)
This allows you to select multiple values from a single field.