Expressions and Purpose of Their Usage in the Process of VirtueMart Import
VirtueMart import from the file is considered to be the most convenient and fastest way to update product catalog or enrich it with new merchandise. You have the spreadsheet, containing necessary products and information associated to them and having appended it to database you get new products created or existing ones updated.
Sounds nice, doesn’t it? Although import to VirtueMart does not always go off without a hitch. The commonest hurdle, VirtueMart users encounter, is that, the file to be imported, does not meet the requirements. Sometimes the file, sent by supplier, does not contain all the necessary fields or wrong values are inputted for some fields.
You think there is nothing else left for you to do but show patience and meticulously add necessary data to the file before importing it to VirtueMart? You are mistaken, there is a smarter way out. Store Manager for VirtueMart allows you to manage data with expressions in the process of VirtueMart import without interference in the import file.
Expressions are commands, mathematical rules that take their variables from data provided in the file and evaluate them. On the basis of it certain operation is performed and desired value is returned. Expression is a set of SQL statements that will help you indicate what information is required and bypass manual file inspecting.
How to Use Expressions?
Formulae, which are used to modify or add data, are inputted on the 5th step of import to VirtueMart configuring, namely “Link .csv columns to database fields”. On this step you must proceed with fields mapping and associate file columns to appropriate fields at VirtueMart database. In such a way, you are specifying what exactly information should be uploaded to your webshop. On condition that you did not assign some of the columns, this information won’t be appended to VirtueMart.
To create expression you need first of all define what field it will be applied to and open expression editor. Choose the field to alter and click on Edit button available under Expression column in the same row.“Auto Complete Window” is designed to simplify your work with formulae. Click corresponding button on the toolbar or use Ctrl+Space combination and you will derive the list of .csv file columns, set of SQL commands, macros and functions, which can be used for expression generating.
Read related article providing examples of expressions usage - http://virtuemart-manager.com/useful-articles/tips-tricks/use-expressions-and-modify-data-right-in-the-process-of-import-to-virtuemart