WooCommerce Conditional Product Fields at Checkout

The WooCommerce Conditional Product Fields at Checkout plugin allows you to display additional product fields at checkout accoring the products currently in cart! Fields can be dynamically displayed accoriding logic rules…and all done using a nice visual editor!

Note: The plugin, like WordPress, requires a minimum 5.5 PHP version.

LIVE DEMO

http://www.codecanyon.eu/wcpfc/wp-admin
(Shop admin account)
user: demo
pass: demo

(customer account)
user: demo2
pass: demo

How to automatically update the plugin

To receive automatic updates just install and configure the Envato updater plugin: https://goo.gl/pkJS33 .The official guide that explains how to configure it can be found in the following link: https://envato.com/market-plugin .

How it works

The plugin through a visual editor allows the creation of extra product fields that will be showed in the Checkout page. Each field can have its own conditional rules by which the plugin will decide if it has to be showed or not.
Coditional rules can take in consideration other conditional field values or native checkout field values (Example: billing first name, shipping last name, billing country, etc.).
At last but not least, each field can be showed just one time per order, one time per product, or one time for each product cart quantity.

Conditional logic and dynamically field display

Each field can have several “and/or” conditional rules that will make the field dynamically visible only if satisfied. A conditional rule can be related to other fields values or the native billing/shipping checkout fields. Note: that in case of other custom field values, the logic rule can be created only for fields that have the same Display policy and Position options.

Field types

The plugin will allow the shop admin to create the following field types:

  1. Text
  2. Textarea
  3. Number
  4. Email
  5. Select/Multiselect
  6. Date
  7. Time
  8. Country & state

For each field you can configure its own options like CSS classes to assign to the input field, placeholder text, show on emails, show on order details page, row size, etc.

Visibility according products/categories

A field can be displayed only for the selected products or catgories. If none is selected, the plugin will display one field for each product in cart. Selecting a category, the plugin will show one field for each product matching the selected categories.

Display policy

By default the plugin will show a field for each matching product. However you can select choosing among the following options:

  1. Per product: the field will be showed just one time for matching products
  2. Per cart quantity: the field will be showed N times for matching products, where N is the cart quantity
  3. One time: just one time if at least one of the selected products/categories matches with the ones currently in cart.
Position

You can choose where the field will be displayed: after billing or shipping forms. Note: in case of shipping form selection, the field will be showed
only if the Ship to a different address option has been checked during the checkout. Otherwise the shipping form won’t be showed by WooCommerce and then the field will be invisible.

Country & state field note

Can be selected only the states/provinces for the allowed sell countries configured in the WooCommerce -> Settings -> General menu.

WPML compability

If WPML is detected, the plugin will automatically show multilanguage input fields for labeles, placehonders, etc. In this way you can enter different texts for each language.

Frontend integration

Additional fields will be seamlessly integrated into (in case of “one time” field type) or after (in case of “per product” or “per cart quantity” field type) the Billing/Shipping form if the associated conditional rules (if any) are satisfied. Note: in case of shipping form selection, the field will be showed
only if the Ship to a different address option has been checked during the checkout. Otherwise the shipping form won’t be showed by WooCommerce and then the field will be invisible.

The plugin will also display some validation message once the order is placed in case of mandatory fields, wrong email format or if a numeric value is not in the preselected range

Backend integration

Additional fields will be seamlessly integrated into the order details page according the field type. One time fields are reported under the customer billing/shipping details (according to the field position) and the Product/Cart quantity field type are reported under each produch to which they refer.

Examples

For example, you can:

  1. create a field that will be showed only if the Billing country is Italy and State/Province is Rome
  2. After creating a text field named “field1” , you can create a second field that will be showed only if “field1” contains the phrase “hello world”, and so on!
  3. After creating a date field “field1”, you can create a second field that will be showed only if the selected date for “field1” is greater than 25th december 2018

And so on!

Note on altered checkout forms

If you have altered in any way checkout forms adding/removing/customizing fields using 3rd party plugin, this may interfere with the plugin causing it to not properly work.

SCREENSHOTS

Field configurator page

WCPFC

Condition logic – Field configurator page

WCPFC

Checkout page

WCPFC

Order details page

WCPFC

Notification email
WCPFC

Admin order details page
WCPFC

= 1.1 - 07.09.18 =
* Fixed an issue with select fields and logic rules

= 1.0 - 05.09.18 =
* First release