Repeat Rules are useful when you want to repeat a section or a field based on a certain property of the checkout page. The property value will be used to determine how many times the section or field should be repeated. The property value should resolve to a number.
You can repeat section & fields based on:
- Product quantity
- Cart count
General Instructions To Set Repeat Rules
This section will explain the common steps to set repeat rules.
To set repeat rules:
- Navigate to the WooCommerce → Checkout Form → Checkout Fields page.
- Open the field/section property form popup.
- Click on the Add Field button to open the popup form if you are setting repeat rules for a new field.
- Click on the Edit Field button to open the popup form if you are setting repeat rules for an existing field.
- Click on the Add New Section button to open the popup form if you are setting repeat rules for a new section that you are creating.
- Click on the Edit Section button to open the popup form if you are setting repeat rules for an existing section.
- Navigate to the Repeat Rules tab from the popup.
- From this tab, you can define repeat rules.
- Once the repeat rule is set, click on the Save & Close button to save the settings.
Repeat Rule Based On Cart Quantity
Repeat field or section N number of times, where N is the cart quantity.
Repeat Rule Based On Product Quantity
Repeat field or section N number of times, where N is the quantity of a particular product.
Advanced Settings
Note: Enable/Disable the below options based on your needs while setting up repeat rules for the default and custom sections.
Start indexing from parent: Enable the option to start the index from the parent section.
Inherit Cart & User based display rules: By default, this feature is enabled. It applies the Cart & User based display rules of the parent section to all the repeated sections.
If the feature is not needed, disable this behavior by unchecking the checkbox.
Inherit Fields based display rules: It inherits the field-based display rules of the parent section to all the repeated sections. Enable or disable the feature based on your needs.
For example, a travel agency only needs to display the passport number textbox if the customer’s age is eighteen or above. Once the feature is enabled, it displays the passport textbox based on the field value and gets repeated in the required areas.
Adjust display rules based on fields in the same section: To set rules based on the fields of that particular section.
For example, a travel agency has three customers of different age groups. If one among them is below eighteen, he/she does not need to display a passport field. Here, the rules can be set based on the field value of each customer.
Comments
0 comments
Please sign in to leave a comment.