• OpenCart Manager RSS
  • OpenCart Manager YouTube
  • Follow OpenCart Manager on Twitter
  • Google+
  • OpenCart Manager on Blogger
  • OpenCart Manager on FaceBook
8 AM - 7 PM (GMT) / 3 AM - 2 PM (EST)

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.

Expressions for OpenCart product import
Expressions for OpenCart product import

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.

Expressions for OpenCart product import
Expressions for OpenCart product import

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

Expressions for OpenCart product import
Expressions for OpenCart product import

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

CONCAT([CSV_COL(22)], "New")

Now we are going to add product manufacturer to description. Analogically, we will use the function applied in previous formula

Expressions for OpenCart product import
Expressions for OpenCart product import

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

Privacy Preference Center

Strictly Necessary

These cookies are necessary fro the site ot function.

woocommerce_cart_hash, woocommerce_items_in_card, wp_woocommerce_session_{hash}


These are used to track user interaction and detect potential problems. These help us improve our services by providing analytical data on how users use this site.

_ga, _gid, _gat-_UA-326982215-25, LaSID, LaVisitorId, __utma, __utmc, __utmv, __utmz

Close your account?

Your account will be closed and all data will be permanently deleted and cannot be recovered. Are you sure?