Skip Navigation

[Resolved] Allow Users to select Product variations

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to allow my site Users to select Product Attributes and purchase those Products.

Solution: Use Product Attributes and Variations.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 11 replies, has 3 voices.

Last updated by Christian Cox 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#952485
Screen Shot 2018-07-20 at 9.11.03 PM.png

I am trying to make a custom field that is a select box with several options. I have tried every way I can think of and I can't get it to show. When I click on the box for field type select boxes are shown as not allowed. Why is this? I have a paid account so I don't understand why there is something I can't use. I have looked at the tutorials for adding custom fields through your website, google search and YouTube and I've yet to find any instructions on how to add a custom field that has a field type other than a single line field. I really need help with this as it's for a client and I've spent hours trying to figure this out.

Also, from a user standpoint, your website page load speed is painfully slow and is further adding to my frustration.

Thank you

#952804

I apologize if you did not find the Documentation or online videos about how to create other than single line custom fields in Toolset Types.

Please can you let me know where you looked, so I can inform our DOC admin to update?

The Documentation to follow in order to add Custom Fields (of several kinds) is here:
https://toolset.com/documentation/
https://toolset.com/documentation/user-guides/#types-topics
==> https://toolset.com/documentation/user-guides/using-custom-fields/
The specific task you refer to is shown here:
https://toolset.com/documentation/user-guides/using-custom-fields/#how-to-add-custom-fields-to-content

Later, certain fields cannot be converted to other field types.
That, is expected, its due to the complexity of some of those fields.

I think, that is what you see there in the ScreenShot you show me (the fields cannot be converted, but as above shown you can create).

Please let me know if you need more details, and I will let our DOC admin know your suggestions and data once I have it.

#953623

Hi, I'm still not able to figure this out. I'm using Toolset with Woocommerce and I need to have a select box on the single product page for two different variables. I don't want to set them up as variables in the default Woocommerce set up because I want to avoid having hundreds of variables for each product and because these two variables don't have a price associated with them I thought just having a select box for each would work. If this can't be done then I am going to have to find another plugin to use.
Thanks

#953822
step1.png
step2.png

When I click on the box for field type select boxes are shown as not allowed. Why is this?
It appears that you are trying to modify an existing field in the screenshot you provided. Some field types cannot be converted to a select field, and the field you are trying to modify is one of those field types. Single line fields cannot be converted to select fields. Instead of modifying an existing field, click the "Add New Field" button and select the "select" field type for the new field. Build your select field options as needed. If you do not want to keep the single line field, you may remove it.

I will be glad to log in and set it up for you if you are unable to add a new select field. Please provide login credentials here in the private reply fields and I will take care of it for you.

#953867

It seems basic HTTP authentication is required to access the site, and neither the WP login or SFTP login worked for me. Can you provide the basic auth credentials as well?

#953900
Screen Shot 2018-07-23 at 5.20.15 PM.png
Screen Shot 2018-07-23 at 5.20.21 PM.png

Both of these Field Groups contain select-type custom fields now. It looks like you were successful at creating them, so I did not need to create them again. I am attaching screenshots that show the select-type custom fields existing in each Field Group.

If you want to add more or different options to each select field, click "Add Option". See the screenshots attached here. For example, if you want the field options to be "Red", "Yellow", and "White", click the "Add Option" button twice to insert two new option rows. Change the "Display text" entries to be "Red", "Yellow", and "White". Then add unique values for each entry in the "Custom field content" column. I recommend using lowercase text for these, like "red", "yellow", and "white".

Now, check the settings for the Field Group by toggling open the "Settings for the fields group" panel. Be sure to assign this Field Group to at least one post type. Then edit or create one of those posts in wp-admin, and you should see your custom fields appear with the correct options in the post editor.

#953904

Hi
Do I not have to select the field type? In the screenshot you don't have anything selected. In the Field Group settings I selected products, pages and posts. Is this correct? I also selected the template. So the new field should show up when I add it to the template?

Thanks

#953933

Hi I added the color options, added the short code into a text module in the content template but the select box doesn't show on the front end. If I go to the product setup page I see the options I added. Am I missing something and if so could you please fix it.

#954468

Do I not have to select the field type? In the screenshot you don't have anything selected.
Actually, I have the field type "Select" selected. This is the type you should choose if you want to display a select field in wp-admin when editing a post. There is no "null" or default value in the field type options.

In the Field Group settings I selected products, pages and posts. Is this correct?
If you want the custom fields in a Field Group to appear in the post editor for these three post types, then this is correct.

I also selected the template. So the new field should show up when I add it to the template?
If you select a template in the Field Group editor in the "Appears on" section, then the Field Group will only be displayed in the post editor screen if the Content Template you select here is applied to the post. This lets you display different custom fields in the post editor depending on which Content Template you apply to the post. Whether or not you insert the field in the Content Template to be displayed on the front-end is irrelevant here.

I added the short code into a text module in the content template but the select box doesn't show on the front end.
Okay I think you're confusing the display of custom field values and the display of custom field inputs on the front-end of the site. When you insert the Types field shortcode like this, the value selected in wp-admin will be displayed on the front-end of the site:

[types field="rose-color"][/types]

If you want to allow Users to search for items using a select box as a filter, then you must create a View and insert a filter in the Search and Pagination editor area of the View editor screen. Filter by the custom field, and you can choose to display the filter as a select box.

If you want to allow Users to create or edit posts and choose custom field values using a select box, then you must use Toolset Forms.

So if you can tell me more about what you actually want to accomplish, I can help you set it up correctly. Right now I'm not clear what you want to do with this field.

#954487

The website is for a gravesite floral delivery service. Customer selects the the bouquet size. Then they need to select either a second rose color or a carnation color. This is why I need the selector fields.

#954493

p.s. I could just make the second rose color and the carnations additional variations. It just makes it more cumbersome to manage since there is no additional price associated with these options.

#954580

Okay so you want the selected option(s) to be stored in a new WooCommerce Order. It's best to handle this with Product Attributes and variations in WooCommerce. Capturing a value with a Form, and storing it in a WooCommerce Order custom field is more complicated than adding Product variations in WooCommerce. The custom field value will be less integrated and less accessible in the Order fulfillment process.

To capture a value with a Form and add that to an Order, you would have to use Forms Commerce to create a new Post, and store the custom field values on that new Post. Then you would have to write custom code using the Forms Commerce API to get those values and apply the values to the corresponding Order.

My best advice is to use Product variations.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.