Product fields allow you to use other products as add-on fields in your WooCommerce product. Product Categories fields allow you to use all products from the specified categories as add-on fields.
Note that Product and Product Categories fields are only available when you purchase the Pro version of the plugin.
To add a Products field
To add a Product field, just choose ‘Products’ from the ‘Field Type’ dropdown list.
To add a Product Categories field
To add a Product Categories field, just choose ‘Product Categories’ from the ‘Field Type’ dropdown list.
Standard parameters
See this article for an overview of the standard parameters available to Product fields.
Product field parameters
Product and Product Categories fields have some parameters that are not shared by all fields:
Product layout
Choose how your child products will be displayed on the front end:
- Checkboxes Images let you add one or more child products as an addon field. The customer can select multiple child products within the field that will get added to the cart. The field will display the child product thumbnail
- Checkboxes List – the same as the Checkboxes Images above but without the child product image
- Radio Images allow you to add one or more child products as an addon field, just like the checkboxes layout, though in the case of radio buttons the customer can only select one child product from the field. The child product image will be displayed
- Radio List – same as Radio Images above but without the child product image
- Select lets you add your child products as a dropdown field.
- Column displays your child products in a single column layout. Note that the ‘Column’ setting also allows you to use variable products as child products.
Product quantities
Choose how to manage the quantities of child products:
- Independent: when you specify a product addon field’s quantity as independent, the customer will be able to purchase as many of the child product as they wish, regardless of how many of the parent product they’ve chosen
- Linked: when you specify the quantity as linked, the quantity of the child product added to the cart will always be the same as the quantity of the parent product
- One-only: when you specify the quantity as one-only, then only one child product can be added to the cart, regardless of how many of the parent product has been added
Number columns
Choose how many columns to display the image swatches in on the front end.
Hide labels
Select this option to hide the text labels and only display the images.
Minimum / Maximum Products
You can specify a minimum and/or maximum number of child products if you are using ‘Checkboxes’ as the ‘Products Layout’ and ‘Independent’ as the ‘Products Quantities’ type. You’ll see two new settings:
If you are specifying a minimum or maximum number of checkboxes, you might need to ensure that ‘Required field’ is checked in order to ensure that users select the required number of checkboxes.
Discounting child products
You can choose to offer a discount on child products. Just enter the value of the discount and the discount type, percentage or fixed.
The price of the child product will be adjusted accordingly.
Hiding child products on the site
If you don’t want users to find your child products on the site, you can set them to ‘Hidden’.
Note that the user could still find hidden products if they have the direct URL. To prevent users from accessing hidden products at all, go to WooCommerce > Settings > Product Add-Ons > Products and select the option to ‘Redirect hidden products’.
Setting a limit on the number of products in Product Categories fields
By default, the Product Categories field will only query 100 products per category. You can change this limit by using this snippet:
<?php | |
function prefix_pewc_products_for_cats_limit($limit) { | |
// Increase the limit to 120 | |
$limit = 120; | |
return $limit; | |
} | |
add_filter('pewc_products_for_cats_limit', 'prefix_pewc_products_for_cats_limit'); |
‘How to’ guides
There are several ‘how to’ guides with different ideas for using the Products field, including: