1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Field Types
  5. File Uploads
  6. Upload fields
  1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Field Types
  5. Upload fields
  1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Upload fields

Upload fields

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:

.mini_cart_item dl img,
.cart_item dl img,
.pewc-upload-thumb-wrapper,
.mini_cart_item dl br,
.cart_item dl br,
.pewc-upload-thumb-wrapper br {
display: none
}

Further information

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

Was this article helpful?

Related Articles