Field Types Archives - Plugin Republic https://pluginrepublic.com/support-categories/field-types/ WooCommerce Plugins Tue, 25 Jul 2023 09:30:27 +0000 en-US hourly 1 https://pluginrepublic.com/wp-content/uploads/2020/10/cropped-favicon-1-32x32.png Field Types Archives - Plugin Republic https://pluginrepublic.com/support-categories/field-types/ 32 32 Text swatches https://pluginrepublic.com/documentation/text-swatches/ https://pluginrepublic.com/documentation/text-swatches/#respond Wed, 21 Jun 2023 15:50:33 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=3361130 Text swatch fields are actually radio or checkbox fields with some extra styling applied. The user can click on a button-style text swatch to select it. To create a text swatch field:

The post Text swatches appeared first on Plugin Republic.

]]>
Text swatch fields are actually radio or checkbox fields with some extra styling applied.

The user can click on a button-style text swatch to select it.

To create a text swatch field:

  • Decide whether you want to allow the user to choose a single option or multiple options per field
  • If the user can only choose a single option, follow the guidance to create a ‘Radio Group‘ field
  • If the user can select multiple options, follow the guidance to create a ‘Checkbox Group‘ field (Pro only)
  • In the field settings, just enable the ‘Display as Swatch’ option

The post Text swatches appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/text-swatches/feed/ 0
Information fields https://pluginrepublic.com/documentation/information-fields/ https://pluginrepublic.com/documentation/information-fields/#respond Sun, 18 Aug 2019 07:17:08 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=102157 Information fields are used to provide further details about a product or field. Unlike most other field types in Add-Ons Ultimate, information fields don’t accept any user input. They display information only. To add an information field: Click ‘Add Field Select ‘Information’ as the ‘Field Type’ Click ‘Add Row’ to add a new row of […]

The post Information fields appeared first on Plugin Republic.

]]>
Information fields are used to provide further details about a product or field. Unlike most other field types in Add-Ons Ultimate, information fields don’t accept any user input. They display information only.

To add an information field:

  • Click ‘Add Field
  • Select ‘Information’ as the ‘Field Type’
  • Click ‘Add Row’ to add a new row of information

Information fields are displayed as tables on the front end.

Note that you can include an optional image if you wish.

The post Information fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/information-fields/feed/ 0
Calculation fields https://pluginrepublic.com/documentation/calculation-fields/ https://pluginrepublic.com/documentation/calculation-fields/#respond Fri, 14 Jun 2019 07:38:07 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=76780 Calculation fields allow you to make calculations using formulas. The formulas can include values inputted by the user through other fields, as well as fixed values, the product price, product properties like dimensions and weight, and other variables that you can set. There’s a video at the bottom of this page that will give you […]

The post Calculation fields appeared first on Plugin Republic.

]]>
Calculation fields allow you to make calculations using formulas. The formulas can include values inputted by the user through other fields, as well as fixed values, the product price, product properties like dimensions and weight, and other variables that you can set.

There’s a video at the bottom of this page that will give you an overview of the calculation field.

Calculation fields are available with the Pro version of the licence.

Creating a calculation field

Choose ‘Calculation’ as the field type. You can give the field a label if you wish.

In the ‘Formula’ field, enter the formula that will be used to make the calculation. You can use the following tags:

Field tags, e.g. {field_101}

In the image above, you can see that the formula contains the tag {field_960}. This means that the calculation will use the value from the field with the ID 960.

Note that when using field tags:

  • Fields must be in the same product
  • Fields can be either number fields or other calculation fields

Product price tags, {product_price}

You can include the product price in your formula, e.g.:

{field_960} + {product_price}

This will return the sum of the value of field ID 960 and the price of the product.

Global variables, e.g. {variable_1}

There is scope to set three global variables that can be used in your calculation fields. These are represented as {variable_1}, {variable_2} and {variable_3}.

You can set values for global variables from WooCommerce > Settings > Product Add-Ons.

Extending global variables

If the three global variables available to you aren’t enough, you can create as many unique variables as you like.

Set name / value pairs as in the snippet below:

View this code snippet on GitHub.

You can follow the steps here to add a snippet to your site.

Field price, e.g. {field_999_field_price}

To get the price value of a field, use:

{field_999_field_price}

Option price tags, e.g. {field_999_option_price}

You can get the value of selected options for radio and select fields, eg:

{field_999_option_price}

This will give you the value of the selected option for field 999.

Number of uploads

You can get the number of uploaded files by field, e.g:

{field_999_number_uploads}

This will return the number of files uploaded to field ID #999.

Pages in an uploaded PDF

Use the following tag to get the number of pages in an uploaded PDF:

{field_xxx_pdf_count}

See this article for a fuller explanation.

Quantity

You can get the value of the product quantity field to use in your calculation:

{quantity}

Look up tables

Look up tables allow you to pull prices from a pricing grid, based on user inputs. There is a dedicated article here on how to use them.

Dimensions and weight

Use the following tags in your formula for dimensions and weight:

{product_weight}
{product_length}
{product_width}
{product_height}

Attributes

If you have applied a single attribute term to your product that has a numerical value, you can use this in a calculation. For instance, if you have an attribute called ‘Pattern’ with the term ’10’ then you can pull this value into your calculations like this:

{pa_pattern}

Please note that this will only work when your attribute terms have numerical values; and it will only get the first term applied to the product.

Operators

You can use the following operators: +, -, *, /

You can use parentheses to determine the order of operations within the calculation.

For example:

( ( {field_950} * {field_951} ) + {product_price} ) / {variable_1}

You will need to ensure that your parentheses balance correctly otherwise the formula won’t evaluate.

Hide Calculation

Select this option to hide the calculation from the page, while still allowing it to function.

Rounding

You can choose to round up or round down to the nearest whole number. Just select the desired option from the ‘Round Result’ field.

Decimal Places

Set how many decimal places you’d like to return your result to.

Action

The ‘Action’ setting allows you to define how the calculation result might affect your product page.

  • Choose ‘Display As Cost’ if the calculation result will affect the cost of the product
  • Choose ‘Set Product Price’ to set the result of the calculation as the total product price
  • Choose ‘Update Quantity’ if the calculation result will change the quantity selected
  • Choose ‘Update Child Product Quantity’ to update the quantity field of a specific ‘Products’ field (radio images and radio list only). See this tutorial for more details
  • Choose ‘Add to Product Weight’ to add the result of the calculation to the weight of the product

Better Variations

If you are using the grid layout in Better Variations, you can get the total number of variations selected by the user with this:

{total_variations}

Bookings for WooCommerce

There are two parameters specifically for the Bookings for WooCommerce plugin:

{calculated_booking_cost} – this will return the total cost of the selected booking

{num_units_int} – this will return the number of selected units (e.g. days, weeks)

{num_bookings} – this will return the quantity selected

Advanced Custom Fields

If you are using the Advanced Calculations extension for Add-Ons Ultimate, you can include the value of fields created using ACF in your calculations.

To use ACF fields in your calculations:

  • Create your ACF fields for products. Only ‘Number’ fields will work with calculations
  • Any ACF fields on a product page will be automatically made available for calculations 
  • To use an ACF field in a calculation, you will need to use the ACF field name, e.g. my_number, prefix it with acf_, and wrap it in curly braces – e.g. {acf_my_number} – in your formula

Remember: you’ll need the Advanced Calculations extension to use ACF fields in calculations.

More information

There are several example products using calculation fields in this article.

You can also check out this video for an overview.

The post Calculation fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/calculation-fields/feed/ 0
Variable products as child products https://pluginrepublic.com/documentation/add-variable-products-as-child-products/ https://pluginrepublic.com/documentation/add-variable-products-as-child-products/#respond Mon, 08 Apr 2019 15:25:47 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=57872 If you are using the child products field, you might want to add variable products as child products. You can do this by using the ‘Column’ setting in the ‘Products Layout’ field. The child products will be displayed with variations in a select field. Note that all variations are shown in a single dropdown.

The post Variable products as child products appeared first on Plugin Republic.

]]>
If you are using the child products field, you might want to add variable products as child products.

You can do this by using the ‘Column’ setting in the ‘Products Layout’ field.

WooCommerce column layout setting

The child products will be displayed with variations in a select field.

Child product variations

Note that all variations are shown in a single dropdown.

The post Variable products as child products appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/add-variable-products-as-child-products/feed/ 0
Variation specific fields https://pluginrepublic.com/documentation/variation-specific-fields/ https://pluginrepublic.com/documentation/variation-specific-fields/#respond Thu, 04 Apr 2019 16:52:34 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=57279 If you’re adding extra fields to variable products, you can choose to create different fields for different variations. When you add a new field, you’ll see the ‘Variations’ section at the bottom of the field parameters. (Please note: the ‘Variations’ field will only appear after your product has been saved or published. It’s not visible […]

The post Variation specific fields appeared first on Plugin Republic.

]]>
If you’re adding extra fields to variable products, you can choose to create different fields for different variations.

When you add a new field, you’ll see the ‘Variations’ section at the bottom of the field parameters.

(Please note: the ‘Variations’ field will only appear after your product has been saved or published. It’s not visible on new products.)

If you only want to show this extra field for certain variations, just type the variation ID(s) into the field.

Now, the extra field will only appear when the variation is selected.

Global variation specific fields

Variation specific fields are only available on add-ons applied to individual products, not for global add-ons. This is because variations are unique to each variable product.

A useful workaround for this is to use conditions based on attribute. This allows you to display fields depending on whether the product has the specified attribute term.

The post Variation specific fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/variation-specific-fields/feed/ 0
Global add-ons https://pluginrepublic.com/documentation/global-add-ons/ https://pluginrepublic.com/documentation/global-add-ons/#respond Thu, 14 Feb 2019 14:29:44 +0000 http://localhost/pluginrepublic/?post_type=ht_kb&p=39266 Global add-ons give you the ability to create groups of Product Add-Ons fields and apply them to multiple products in one go. You still create fields in exactly the same way so, if you haven’t already done so, please read this article on creating your first field. Creating global add-ons To create a new global […]

The post Global add-ons appeared first on Plugin Republic.

]]>
Global add-ons give you the ability to create groups of Product Add-Ons fields and apply them to multiple products in one go. You still create fields in exactly the same way so, if you haven’t already done so, please read this article on creating your first field.

Creating global add-ons

To create a new global group, go to Product Add-Ons > Global Add-Ons.

Click ‘Add New Global Group’ to create a new group of Product Add Ons fields.

Rules

You need to define a rule that will determine when to display the group of Product Add-Ons fields. You can select from the following options:

  • Display on all products
  • Display for a list of specified products
  • Display if the product belongs to a list of specified categories

Creating fields

You create groups and fields in exactly the same way that you do for individual products.

The post Global add-ons appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/global-add-ons/feed/ 0
Upload fields https://pluginrepublic.com/documentation/upload-fields/ https://pluginrepublic.com/documentation/upload-fields/#respond Thu, 14 Feb 2019 14:16:46 +0000 http://localhost/pluginrepublic/?post_type=ht_kb&p=39263 Upload fields allow you to add upload fields to your WooCommerce product. To add an upload field, just choose ‘Upload’ from the ‘Field Type’ dropdown list. AJAX uploads If you’d like to enable AJAX uploads, go to WooCommerce > Settings > Product Add-Ons > Uploads and check the option to ‘Enable AJAX uploader’. AJAX gives […]

The post Upload fields appeared first on Plugin Republic.

]]>
Upload fields allow you to add upload fields to your WooCommerce product.

To add an upload field, just choose ‘Upload’ from the ‘Field Type’ dropdown list.

AJAX uploads

If you’d like to enable AJAX uploads, go to WooCommerce > Settings > Product Add-Ons > Uploads and check the option to ‘Enable AJAX uploader’.

AJAX gives a better user experience, including displaying upload status and progress and thumbnails for all uploaded files.

It also allows you to charge a price per uploaded file and set the maximum number of uploaded files.

Show the ‘Upload files’ graphic

If you want to retain the ‘Upload files’ graphic to make it clear to the user that they can upload further files, just check the ‘Retain upload graphic’ option.

Disable add to cart button

You can opt to disable the add to cart button while files are uploading. This will prevent users trying to add the product to their cart before the upload is complete.

Parameters

  • Allow multiple uploads – check this to allow the user to upload more than one file per upload field
  • Price per upload – check this to multiply the field price per the number of uploaded files (only available when using the AJAX upload method)
  • Maximum files – enter the maximum number of files that can be uploaded to this field (only available when using the AJAX upload method)

Where are uploaded files stored?

Files are uploaded to the wp-content/uploads/product-extras directory. If you prefer, you can upload files to directories based on order number.

To upload files to separate directories for each order, go to WooCommerce > Settings > Product Add-Ons and enable ‘Organise uploads by order’.

How to download uploaded files

You can access the uploads in a number of ways:

  • You can view the files directly from the order screen
  • If you have the ‘Organise uploads by order’ option selected, you can click the ‘Download files’ button to download all uploads per order in a single zip
  • You can use FTP to access the uploads folder directly

How to rename uploaded files

You might want to rename uploaded files. You can do this by entering the new file name format in ‘Rename files’.

You can use a number of dynamic tags which will be replaced by information about the file, including:

  • {original_file_name}
  • {order_number}
  • {group_id}
  • {field_id}
  • {date}
  • {product_id}
  • {product_sku}

Uploading different file types

By default, the plugin will allow you to upload the following file types:

  • GIF
  • JPEG
  • PNG

Uploading PDF files

If you’d like to enable PDFs as a file type, go to WooCommerce > Settings > Product Add-Ons and check the option to ‘Enable PDF uploads’.

Uploading other file types

To upload other file types, please see this article.

Setting the maximum file size for uploads

Please see this article for how to set the maximum file size for uploads.

Uploading without logging in

As a security measure, users are required to log in before uploading a file. If you wish to allow any user to upload files, go to WooCommerce > Settings > Product Add-Ons and ensure the ‘Users must be logged in to upload’ setting is deselected.

Hiding uploaded images in the cart and checkout

If you’d like to hide uploaded files from the cart and checkout pages, use this CSS:

View this code snippet on GitHub.

Further information

There’s an extensive tutorial on uploading files to WooCommerce products here.

The post Upload fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/upload-fields/feed/ 0
Textarea fields https://pluginrepublic.com/documentation/textarea-fields/ https://pluginrepublic.com/documentation/textarea-fields/#respond Thu, 14 Feb 2019 14:13:30 +0000 http://localhost/pluginrepublic/?post_type=ht_kb&p=39260 Textarea fields allow you to add textarea fields to your WooCommerce product. To add a textarea field, just choose ‘Textarea’ from the ‘Field Type’ dropdown list. Textarea field parameters Textarea fields have some parameters that are not shared by all fields: Min chars Enter the minimum number of characters permitted in the textarea field. Max […]

The post Textarea fields appeared first on Plugin Republic.

]]>
Textarea fields allow you to add textarea fields to your WooCommerce product.

To add a textarea field, just choose ‘Textarea’ from the ‘Field Type’ dropdown list.

Textarea field parameters

Textarea fields have some parameters that are not shared by all fields:

Min chars

Enter the minimum number of characters permitted in the textarea field.

Max chars

Enter the maximum number of characters permitted in the textarea field.

Price per character

Check this field if you would like to multiply the value of the field price by the number of characters entered by the user.

Free chars

An optional number of free characters to allow the user before the price per character pricing rule is implemented.

This feature is only available with a Pro licence.

Only allow alphanumeric?

Check this field if you would like to restrict the characters to alphanumeric ones.

This feature is only available with a Pro licence.

Only charge alphanumeric?

Check this field if you would like to allow non-alphanumeric characters but only charge for alphanumeric characters.

This feature is only available with a Pro licence.

The post Textarea fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/textarea-fields/feed/ 0
Text fields https://pluginrepublic.com/documentation/text-fields/ https://pluginrepublic.com/documentation/text-fields/#respond Thu, 14 Feb 2019 14:11:13 +0000 http://localhost/pluginrepublic/?post_type=ht_kb&p=39257 Text fields allow you to add text input fields to your WooCommerce product. To add a text field, just choose ‘Text’ from the ‘Field Type’ dropdown list. Standard parameters See this article for an overview of the standard parameters available to text fields. Text field parameters Text fields have some parameters that are not shared […]

The post Text fields appeared first on Plugin Republic.

]]>
Text fields allow you to add text input fields to your WooCommerce product.

To add a text field, just choose ‘Text’ from the ‘Field Type’ dropdown list.

Standard parameters

See this article for an overview of the standard parameters available to text fields.

Text field parameters

Text fields have some parameters that are not shared by all fields:

Min chars

Enter the minimum number of characters permitted in the text field.

Max chars

Enter the maximum number of characters permitted in the text field.

Price per character

Check this field if you would like to multiply the value of the field price by the number of characters entered by the user.

Free chars

An optional number of free characters to allow the user before the price per character pricing rule is implemented.

This feature is only available with a Pro licence.

Only allow alphanumeric?

Check this field if you would like to restrict the characters to alphanumeric ones.

This feature is only available with a Pro licence.

Only charge alphanumeric?

Check this field if you would like to allow non-alphanumeric characters but only charge for alphanumeric characters.

This feature is only available with a Pro licence.

The post Text fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/text-fields/feed/ 0
Select fields https://pluginrepublic.com/documentation/select-fields/ https://pluginrepublic.com/documentation/select-fields/#respond Thu, 14 Feb 2019 14:05:01 +0000 http://localhost/pluginrepublic/?post_type=ht_kb&p=39254 Select fields allow you to add select fields to your WooCommerce product. To add a select field, just choose ‘Select’ from the ‘Field Type’ dropdown list. Standard parameters See this article for an overview of the standard parameters available to select fields. Select parameters Select fields have some parameters that are not shared by all […]

The post Select fields appeared first on Plugin Republic.

]]>
Select fields allow you to add select fields to your WooCommerce product.

To add a select field, just choose ‘Select’ from the ‘Field Type’ dropdown list.

Standard parameters

See this article for an overview of the standard parameters available to select fields.

Select parameters

Select fields have some parameters that are not shared by all fields:

Options

Add each swatch as an option. Click the ‘Add Option’ button to add your first option then enter the option name in the first field, under ‘Option’. You can assign a price to this option that will only be added to the product price if the user selects this option.

See this article for more information about fields that have options.

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.

First field is instruction only

Select this option if the first option in the select field is an instruction – e.g. ‘Pick an option’.

The post Select fields appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/select-fields/feed/ 0