How to create general upload rules

In order to enable, user side, the possibility to associate one or more files to the products added to cart is essential to create, administrator side, the specific upload rules.

The general rules you have created apply to all the products of the shop unless you disable the feature on the single product.

If the upload button does not show: 

  • check the pages on which you enabled the file upload
  • make sure that you enabled the upload for the products and/or the order

To create a general rule, go to YITH Plugins -> Uploads and click on the Add new rule button.

Add new upload rule - General

For each new rule you need to specify:

  • label to show to the user for the file
  • allowed extensions (if the file has a different extension, it will be rejected)
  • maximum size allowed for the file
  • Enable or not the notes: when enabled, the user could attach notes to the file and the administrator could read them in the specific order page

Each rule corresponds with an upload required on the product. 

Assuming that we have created 3 upload rules, the user will have to add 3 files when purchasing.

Uploads required

Upload rules management on simple products

By default, all the general rules apply to all the products of the shop unless enabled or if you have configured at least a new rule on the product. Let’s analyze how to do it.

Go to the product and click on the “Add new rule” button.

Set rules on the simple product

As for any new rule, you must specify the parameters:

  • label to show to the user for the file
  • allowed extensions (if the file has a different extension, it will be rejected)
  • maximum size allowed for the file
  • allow notes: when enabled, the user could attach notes to the file and the administrator could read them in the specific order page

Assuming that we configured 4 general upload rules (therefore, 4 files) and 2 on the YITH T-Shirt product, we expect to get 4 files as required for all the products in the cart and 2 for the YITH T-Shirt product.

Cart page

How to manage the uploads on variable products

Unlike the simple products, you must enable the file upload on variable products manually. 

Go to the product edit page and select the variation to change. As highlighted in the screenshot, you can see, in the bottom of the section, the complete list of the general upload rules already created.
Each selected rule will link with the variation. 

Set general rule on single variation

If you want to create ad hoc rules for the selected product variations, you can add them through the “Add new rule” button and save the product.

Set rules for the variable product

Now the general rules will be no longer available for each variation: the choice should be made from the ones you have created in the product.

Set upload rule on the single variation