Expressions As Unique Means of Data Handling Right In The Course Of OpenCart Import
OpenCart import unquestionably makes colossal contribution to product management catering for bulk product transfer to database. When multitude of merchandise is expected to be added or some are waiting for refresh, import functionality leaves behind traditional methods of product maintenance.
On the one hand, it is beneficial since huge data sets can be uploaded altogether to the database. Time input reduces to minimal. Merchandise are placed to desired categories. Prices are updated, you set markups or markdowns. Required modifications have been implemented.
On the other hand, you should assiduously inspect import file and make sure details are sufficient. If OpenCart price is supposed to be updated, your .csv file must contain price column with proper values. Product quantity needs refreshing? Check whether quantity is indicated in the spreadsheet. The rule is: If you need values to be added or updates, they should be provided.
Store Manager for OpenCart somewhat does not conform to the rules. The matter is, data being appended, can be adjusted straight in the process of OpenCart import with the help of expressions.
What Is Expression and When Is It Applied?
Expression is some specific formulae, SQL rule implementing which user can input necessary information or change values. This is so-called command to accomplish definite operations and attain desired value. The formula takes and evaluates values provided in the file and fill in necessary fields.
In fact, modifications are carried out in the course of file import and help merchants bypass manual product-after-product modifying.
The rules are applied at “Link .csv Columns to Database Fields” step of the import wizard. It consists of three columns, Field, CSV Column and Expression. Decide, what field you want to apply the statement for, put it into focus and Editor button will appear in Expression column.
Editor helps store owners build appropriate commands. Auto Complete Window provides all the commands, macros and functions available. Directly in this window you can check the formula you have composed.
Samples of Expressions for OpenCart Data Processing
Expressions might be used to manage any product associated details. Have a closer look at cases described and expressions used.
1. Managing OpenCart Product Status
Naturally, when product quantity is equal to zero, they go out of stock. We are going to create the rule that will help set product status. In short, if number of these or those merchandise equals to 1 or 0, they will be disabled. On contrary, if there is more than one item of certain product in stock, this product status will be enabled.
IF([CSV_COL(26)]<1, 0, 1)
To build the rule, IF command is used. [CSV_COL(26)] stands for quantity, in other words, column number 26 of .csv file contains quantity.
2. Replacing or Removing Values
You might also need to replace some text or remove it at all. As for example, you sold some merchandise at reduced price and attached “Low price now” record to product name. Now you need to remove it or substitute with “Popular” record.
REPLACE([CSV_COL(INDEX)], "Low price now", "")
REPLACE([CSV_COL(INDEX)], "Low price now", "Popular")
3. Product Price Update
Oftentimes price indicated in the file does not suit since store owners plan to sell these very products at higher price or want to set markdowns. Expressions will help you out. In a matter of seconds product cost will acquire desired value.
Once you apply the following expression, price will be increased by 15 percent
This is simple expression, “decoding” which we get, value of .csv file column number 24, that is price, multiplied by 1.15. Depending on number of price column in the file you upload, you are supposed to replace number in the rule correspondingly.
Contrariwise, to reduce OpenCart price by 15%, use the following command
where INDEX is the number of price column in .csv file you perform OpenCart import from.
If you have some specific requirements for price to be updated, you may configure conditions with the help of more complicated SQL statements. Let’s say, you need to increase by 20% cost for products, price for which in the file fluctuates from $10 to $100. The formula will be the following
In case price range differs, simply substitute values in the expression.
4. Text Fields Handling
Not only numeric fields require updates. Suppose you are going to sell new merchandise, have their details in the file but want to add “New” to product name. “CONCAT” command allows you to easily implement modification
Now we are going to add product manufacturer to description. Analogically, we will use the function applied in previous formula
Let’s experiment and add “Low price for this product” to names of merchandise, price of which is less than $100.
IF([CSV_COL(24)]<100,CONCAT([FIELD_VALUE],"Low price for this product"),[FIELD_VALUE])
Expressions, listed above illustrate only several cases, when store owners might manage data straight in the course of OpenCart import. You can merge .csv file columns, update product stock, prices on a selective basis, correct text values and manage other details right within the course of data transfer. It refines catalog management and allows entrepreneurs to bypass lots of routines web store prepares.
Free trial of Store Manager for OpenCart is accessible at opencartmanager.com/free-download