WooCommerce Product Add-Ons Ultimate Archives - Plugin Republic https://pluginrepublic.com/support-categories/product-extras-for-woocommerce/ WooCommerce Plugins Sat, 30 Sep 2023 08:16:35 +0000 en-US hourly 1 https://pluginrepublic.com/wp-content/uploads/2020/10/cropped-favicon-1-32x32.png WooCommerce Product Add-Ons Ultimate Archives - Plugin Republic https://pluginrepublic.com/support-categories/product-extras-for-woocommerce/ 32 32 How to retrieve the page count of an uploaded PDF https://pluginrepublic.com/documentation/how-to-retrieve-the-page-count-of-an-uploaded-pdf/ https://pluginrepublic.com/documentation/how-to-retrieve-the-page-count-of-an-uploaded-pdf/#respond Tue, 25 Jul 2023 09:27:58 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=3496689 You can now access the page count for a PDF upload in your calculations by using this tag: {field_xxx_pdf_count} Note that you will need the Pro version of Add-Ons Ultimate and the Advanced Uploads extension to retrieve an uploaded PDF’s page count. The first step is to enable the feature by going to WooCommerce > […]

The post How to retrieve the page count of an uploaded PDF appeared first on Plugin Republic.

]]>
You can now access the page count for a PDF upload in your calculations by using this tag: {field_xxx_pdf_count}

Note that you will need the Pro version of Add-Ons Ultimate and the Advanced Uploads extension to retrieve an uploaded PDF’s page count.

The first step is to enable the feature by going to WooCommerce > Settings > Product Add-Ons > Uploads. Enable these settings and click ‘Save changes’.

  • Enable PDF uploads
  • Enable PDF page count

Then, create the following fields.

An Upload field which now accepts a PDF file. You will need to disable ‘Allow multiple uploads’ as the calculation will only read 1 file.

Create a Calculation field that will reference the Upload field. When a PDF file is uploaded, the calculation will retrieve the number of pages.

The post How to retrieve the page count of an uploaded PDF appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/how-to-retrieve-the-page-count-of-an-uploaded-pdf/feed/ 0
Add/show currency symbol on calculation fields in the cart https://pluginrepublic.com/documentation/add-show-currency-symbol-on-calculation-fields-in-the-cart/ https://pluginrepublic.com/documentation/add-show-currency-symbol-on-calculation-fields-in-the-cart/#respond Thu, 20 Jul 2023 13:26:43 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=3477784 By default, the calculation, and number field values don’t have a currency symbol in the cart/cart page. If you’d like the values to have your set currency symbol, then here’s a snippet you can use: Here’s how to add your snippet: How to add a code snippet to your site

The post Add/show currency symbol on calculation fields in the cart appeared first on Plugin Republic.

]]>
By default, the calculation, and number field values don’t have a currency symbol in the cart/cart page. If you’d like the values to have your set currency symbol, then here’s a snippet you can use:

View this code snippet on GitHub.

Here’s how to add your snippet: How to add a code snippet to your site

The post Add/show currency symbol on calculation fields in the cart appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/add-show-currency-symbol-on-calculation-fields-in-the-cart/feed/ 0
Change the number of radio/checkbox image columns on mobile devices https://pluginrepublic.com/documentation/change-the-number-of-radio-checkbox-image-columns-on-mobile-devices/ https://pluginrepublic.com/documentation/change-the-number-of-radio-checkbox-image-columns-on-mobile-devices/#respond Thu, 20 Jul 2023 13:25:13 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=3477777 By default, the checkbox, and radio image fields are shown as a single column on mobile devices. If you’d like to change the number of columns displayed on small devices, here’s some CSS to make the adjustments: The above code will make the section display 4 columns. You can adjust the number of columns, by […]

The post Change the number of radio/checkbox image columns on mobile devices appeared first on Plugin Republic.

]]>
By default, the checkbox, and radio image fields are shown as a single column on mobile devices. If you’d like to change the number of columns displayed on small devices, here’s some CSS to make the adjustments:

View this code snippet on GitHub.

The above code will make the section display 4 columns. You can adjust the number of columns, by changing the width value.

You only need to divide 100% by the number of columns you’d like. For example, 2 columns = 100/2 =50%.

The width should be set to 50%.

Here’s how to add your CSS: How to add CSS to your WordPress site

The post Change the number of radio/checkbox image columns on mobile devices appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/change-the-number-of-radio-checkbox-image-columns-on-mobile-devices/feed/ 0
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
Send add-on field data to ShipStation https://pluginrepublic.com/documentation/send-add-on-field-data-to-shipstation/ https://pluginrepublic.com/documentation/send-add-on-field-data-to-shipstation/#respond Tue, 01 Nov 2022 15:10:29 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=2544207 You can export add-on field data from orders to ShipStation using a snippet. ShipStation only allow two fields to be sent – custom field 2 and custom field 3. You’ll need to use the following snippet, updating the return values for each filter with the name of the data you want to send. The name […]

The post Send add-on field data to ShipStation appeared first on Plugin Republic.

]]>
You can export add-on field data from orders to ShipStation using a snippet. ShipStation only allow two fields to be sent – custom field 2 and custom field 3.

You’ll need to use the following snippet, updating the return values for each filter with the name of the data you want to send. The name can be formed by adding an underscore before the field label name -so if your field label is ‘Upload’, the name will be ‘_Upload’.

View this code snippet on GitHub.

Here’s how to add a snippet.

The post Send add-on field data to ShipStation appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/send-add-on-field-data-to-shipstation/feed/ 0
Using fractions in measurements https://pluginrepublic.com/documentation/using-fractions-in-measurements/ https://pluginrepublic.com/documentation/using-fractions-in-measurements/#respond Tue, 01 Nov 2022 07:38:39 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=2543363 You might want to allow users to enter measurements in fractions, most likely of inches. So a user might want to enter the width of an item as 5 and 1/8 inches. You can then use these measurements to calculate the price of a product. There’s an example product here showing this in action. To […]

The post Using fractions in measurements appeared first on Plugin Republic.

]]>
You might want to allow users to enter measurements in fractions, most likely of inches. So a user might want to enter the width of an item as 5 and 1/8 inches. You can then use these measurements to calculate the price of a product.

There’s an example product here showing this in action.

To allow the user to enter measurements in fractions:

  • First create a standard number field for your first dimension, e.g. ‘Width’, for the user to enter the whole number
WooCommerce number field
  • Then create a select field with the different fractions as the options – e.g. 1/8, 1/4, etc.
  • Enter the decimal equivalent of the fraction, e.g. 0.125, 0.25, etc, in the ‘Price’ column next to the fractions
  • Finally, set ‘Field Price Visibility’ and ‘Option Price Visibility’ to ‘Hidden’
WooCommerce field for fractions

You can repeat for any further dimensions – e.g. height.

Using fractions in calculations

You can now use the decimal values for the fields in your calculations. Create a calculation field to work out the value of your ‘width’ fields as a decimal:

Calculation field for fractions

Note that the formula looks like this:

{field_1752} + {field_1753_option_price}

You will need to change the field IDs to match yours. We use the {field_1753_option_price} tag to get the decimal value for the fractions.

You can also set this field to ‘Hide Calculation’ so that it’s not displayed on the front end. Also, ensure that you set the ‘Decimal Places’ to the create number.

Repeat this for your ‘height’ field.

Calculating the area

Now you can create a field to set the area. This will just multiply the value of your two calculation fields above.

The formula will be:

{field_2796} * {field_2797}

You will need to change the field IDs to match your own IDs.

The post Using fractions in measurements appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/using-fractions-in-measurements/feed/ 0
How to display add-on fields in Germanized for WooCommerce invoices https://pluginrepublic.com/documentation/how-to-display-add-on-fields-in-germanized-for-woocommerce-invoices/ https://pluginrepublic.com/documentation/how-to-display-add-on-fields-in-germanized-for-woocommerce-invoices/#respond Tue, 18 Oct 2022 14:40:53 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=2497847 First, you’ll need to insert a shortcode into your template. In WooCommerce > Settings > Germanized > Invoices & Packing Slips click the Edit icon next to your invoice template. Add the following shortcode under the line item in your template: [document_item_product data="aou_addons"] Next, you’ll need to add this snippet: https://gist.github.com/plugin-republic/b6c4fae7799531f6897bd37d4fde0cbd. Here’s how to add […]

The post How to display add-on fields in Germanized for WooCommerce invoices appeared first on Plugin Republic.

]]>
First, you’ll need to insert a shortcode into your template. In WooCommerce > Settings > Germanized > Invoices & Packing Slips click the Edit icon next to your invoice template.

Add the following shortcode under the line item in your template:

[document_item_product data="aou_addons"]

Next, you’ll need to add this snippet: https://gist.github.com/plugin-republic/b6c4fae7799531f6897bd37d4fde0cbd.

Here’s how to add a snippet.

The post How to display add-on fields in Germanized for WooCommerce invoices appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/how-to-display-add-on-fields-in-germanized-for-woocommerce-invoices/feed/ 0
Remove quantity field from WooCommerce product https://pluginrepublic.com/documentation/remove-quantity-field-from-woocommerce-product/ https://pluginrepublic.com/documentation/remove-quantity-field-from-woocommerce-product/#respond Wed, 25 May 2022 13:47:57 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=2028446 If you wish to use a product add-on field to set quantity, or you just want to allow a user to purchase products in a quantity of one only, you need to enable the ‘Sold individually’ option. This will remove the standard WooCommerce quantity field from next to the add to cart button. Click the […]

The post Remove quantity field from WooCommerce product appeared first on Plugin Republic.

]]>
If you wish to use a product add-on field to set quantity, or you just want to allow a user to purchase products in a quantity of one only, you need to enable the ‘Sold individually’ option. This will remove the standard WooCommerce quantity field from next to the add to cart button.

Click the ‘Inventory’ tab in the ‘Product data’ section:

The post Remove quantity field from WooCommerce product appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/remove-quantity-field-from-woocommerce-product/feed/ 0
Multicurrency support for Add-Ons Ultimate https://pluginrepublic.com/documentation/multicurrency-support-for-add-ons-ultimate/ https://pluginrepublic.com/documentation/multicurrency-support-for-add-ons-ultimate/#respond Mon, 23 May 2022 10:52:17 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=2016448 WooCommerce Product Add-Ons Ultimate is fully compatible with the Aelia Currency Switcher for WooCommerce. You don’t need to update settings – the integration will work straight out of the box.

The post Multicurrency support for Add-Ons Ultimate appeared first on Plugin Republic.

]]>
WooCommerce Product Add-Ons Ultimate is fully compatible with the Aelia Currency Switcher for WooCommerce. You don’t need to update settings – the integration will work straight out of the box.

The post Multicurrency support for Add-Ons Ultimate appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/multicurrency-support-for-add-ons-ultimate/feed/ 0
Add-on field validation https://pluginrepublic.com/documentation/add-on-field-validation/ https://pluginrepublic.com/documentation/add-on-field-validation/#respond Tue, 17 May 2022 08:58:33 +0000 https://pluginrepublic.com/?post_type=ht_kb&p=1972608 Validation allows you to define certain rules for your fields. For example, you can specify that a field is required so if the user does not complete the field, an error is displayed and the user cannot add the product to the cart. By default, fields are validated when the user clicks the Add to […]

The post Add-on field validation appeared first on Plugin Republic.

]]>
Validation allows you to define certain rules for your fields. For example, you can specify that a field is required so if the user does not complete the field, an error is displayed and the user cannot add the product to the cart.

By default, fields are validated when the user clicks the Add to Cart button. WooCommerce’s standard behaviour is to validate the add to cart form and reload the product page. Any validation notices are displayed when the page is reloaded.

WooCommerce validation notice

The position and style of the notice is set by your theme.

Optimised validation

If you prefer the validation to take place without the product reloading, you can choose the ‘Optimised validation’ option. Go to WooCommerce > Settings > Product Add-Ons to enable the setting.

Optimised validation will display inline messages for any fields that have failed validation when the user clicks the Add to Cart button.

This helps guide the user to any fields which have failed validation. It’s particularly helpful on product pages with several add-on fields.

Filter optimised validation messages

If you’d like to change the text in the optimised validation messages, you can use these snippets:

View this code snippet on GitHub.

What happens if validation isn’t working?

If the user is able to add a product to the cart and bypass validation, either:

  • Enable ‘Optimised validation’ above. This will prevent the user from adding the product to the cart
  • Or, check this article

Number field validation

If you have set a minimum or maximum value for your number field, it will try to validate this whether or not the field is required.

This means that if you have entered a minimum of 5 and the user leaves the field empty, there will still be a validation error if the user tries to add the product to the cart – even though the field is not required.

To ensure that number fields can be left empty even if they have a minimum or maximum value, and prevent validation on a non-required number field, add this to your functions.php file or snippets file:

View this code snippet on GitHub.

Filter validation message

You can filter the default validation error message when the user adds an item to the cart like this:

View this code snippet on GitHub.

Custom validation for add-on fields

You can add your own validation when a user adds a product to their cart.

Validation minimum number of files

In the example below, we’re checking that the value of field with ID pewc_group_3990_4033 is not less than 10. Substitute with your own values.

View this code snippet on GitHub.

Here’s an example for setting a minimum number of files to upload:

View this code snippet on GitHub.

Setting minimum quantity of child products

Here’s an example for requiring a minimum quantity of child products:

View this code snippet on GitHub.

Setting maximum quantity of child products

Here’s an example of how to filter the validation message when the maximum number of child products has been exceeded.

View this code snippet on GitHub.

You can update the $message variable to whatever you like. Use the $field_label and $max_products variables in your message if required.

Find out here how to add this snippet to your site.

The post Add-on field validation appeared first on Plugin Republic.

]]>
https://pluginrepublic.com/documentation/add-on-field-validation/feed/ 0