Frequently Asked Question

Bulk Export/Import of Products for Google Merchant
Last Updated 7 years ago

It is a good idea to manually set data for at least one product via your admin section first, which will serve as a reference for you to work from.

Exporting From Your Store

Log in to your database in phpmyadmin

Backup the oc_uksb_google_merchant_products table first. (just incase)

After which, click on the SQL tab

Run the following command: (you may need to change the table prefixes from 'oc_' to match your table prefixes.

SELECT u.*,, p.model FROM oc_uksb_google_merchant_products u LEFT JOIN oc_product_description pd on (pd.product_id = u.product_id) LEFT JOIN oc_product p on (p.product_id = u.product_id) Order By u.product_id ASC;
Once run, at the bottom, click on the 'export' link.


Export Method: custom
Rows: Dump All Rows
Output: Save output to a file
Format: CSV
Format Specific Options:
Columns separated with: ;
Columns enclosed with:
Columns escaped with: \
Lines Terminated with: AUTO
Replace NULL with:

Also click/check the box 'Put column names in first row'

Click 'Go' and you should be prompted to download the CSV file.

You can then open up that file in whichever spreadsheet program you use.


In your spreadhseet program/app, you can move the last two columns to the left if you wish as they are just for reference and will need to be deleted after you have finished adding / editing your data. (before importing back to the database).

Edit the product details to suit.

Variant Products

To add variations in the spreadsheet program every combination needs to be added and separated by commas

For example

A Blue and Red t-shirt in Small, Medium and Large

Colour column

Size column

Similar for any of the other columns that are headed 'v_something'

Importing Back To Your Store

Once finished adding your variations, save the file (make sure you have deleted the two columns 'name' and 'model')
Also a good idea to delete the first row which contains the column headers names.

Back in to phpmyadmin.

Click on the table in the left sidebar named 'oc_uksb_google_merchant_products'

If you haven't already backed up this table, now is the time to do it.

In the top tabs, click on 'Import'

Browse for the edited CSV file

Format: CSV (should have autodetected this after you browsed for the file).

Format-specific options:
Click/check - Replace table data with file
Columns Separated with: ;
Columns enclosed with:
Columns escaped with: \
Lines Terminated with: AUTO

Click 'Go'


Things to be careful of:

Do not use a semicolon in any of your fields

Make sure if entering variation data in a column that you enter the same number of comma separated values in every column in that row
e.g in my example above there were 6 colour values
therefore there were 6 size values
If I were to add in the v_prices column any different prices then I would have to enter 6 prices (+0,+10.00,-5,-6.50,0,0) the plus sign can be omitted.

Please Wait!

Please wait... it will take a second!