When the Tiered pricing table for WooCommerce is active, WP All Import will include an additional metabox with all tiered pricing fields:
General import fields
The metabox allows you to import four tiered pricing values:
Fixed tiered pricing rules
Fixed tiered pricing rules must be in the following format:
quantity:price,quantity:price,quantity:price
For example, if your pricing look the following 10 pieces = 15$ each, 20 pieces = 10$ each, 50 pieces = 8$ each, the import string for those rules must be the following:
10:15,20:10,50:8
Please note that you don’t need to include a currency sign. Please use a dot for the decimal separator.
Percentage tiered pricing rules
Percentage tiered pricing rules must be in the following format:
quantity:discount,quantity:discount,quantity:discount
For example, if your pricing looks the following 10 pieces = 5% discount, 20 pieces = 8% discount, 50 pieces = 10% discount, the import string for this rules must be the following:
10:5,20:8,50:10
Please note, you don’t need to include the percentage sign.
Tiered pricing type
This field must be either “fixed” or “percentage”.
Minimum order quantity
A number that are more than 2.
Here is an example of a CSV with correct values for the import:
Unfortunately, currently, the “maximum order quantity” and “group of” fields are not available to import using this interface.
Role-based import fields
You can import unique tiered pricing values for any role. Select a role you want to import values for and match values with your import template:
Beside the same four fields as you have for general import, for a role you can also import:
- Regular price
- Sale price
- Percentage discount
- Pricing type
Pricing type
Similar to tiered pricing type, here you have 2 available values to import: fixed or percentage.
If you choose fixed, the plugin will use regular and sale price fields to override the base pricing for the selected role.
If you choose percentage, the plugin will use “percentage discount” filed to calculate a new base price for the selected role.
Change rules separator
Change the separator for the percentage and fixed tiered pricing rules fields. By default, the plugin will separate rules using a comma as the separator. In this case, you must use dot (.) as a decimal separator for your pricing values. You can change the separator, for example, to “;” using the following code snippet:
<?php
add_filter('tiered_pricing_table/rules_separator', function() {
return ";"
});
?>
Leave a Reply