The Margin plugin let's you set a margin to the product price (for example) and imports the new price according to the value set.
From Components -> CSVI pro ->Templates tab -> Rules, Click New to add a new rule for margin plugin.
For example to create a rule to set 20% margin for product_price field of a virtuemart product.
- Give a Descriptive name for the rule in name field.
- Select Action as Import.
- Select Plugin as CSVI margin.
- Click on load plugin button.
You will now see three new fields appears
- Value type field to select how the margin is calculated either percentage or value.
- Margin field to set how much percentage or value to be added, For example here its 20.
- Operation type used to calculate the margin.
ExampleHere is an example on how to create a rule using margin plugin for a product_price field in virtuemart.
Now set this rule to template fields to use the margin plugin like below
When the fields are set with rules you can see a small fire icon next to the field name in Template fields tab.
Important Note :
- Make sure that product_price (example used in this template) are added in template fields list.
- Use file for configuration option in templates->template name->file tab set to No.
Now that all rules and fields are set, CSVI will automatically calculate the product_price according to the new margin set. Say here for an example the product_price in CSV file has been given as 100. While import CSVI will calculate the price and show as below.