Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Show Table of Contents

Set up CSV interface

In this article we will set up the CSV interface with affiliate-toolkit. You can use it to connect products and lists from countless stores.

Find out CSV URL

The first thing you need to do is find out the CSV feed URL. At most affiliate networks you will find a tool for "Create a Feed" or similar functions.

Here, for example, the tool to create a feed for AWIN:

The feed URL is with the red box. Depending on the provider, it may look different. Please note that this URL should not be shortened. Copy the full URL into the URL field of the store.

It is important that you select CSV (UTF8 if available), if available you can also enable GZIP. Our plugin does not support the import of ZIP files.

Requirements for the use of the interface

We download the CSV feed from the respective provider and import it into a temporary table.

Please make sure that your database allows this size. A feed with one gigabyte will also load the database with one gigabyte. Some hosters have limits here.

The PHP option"allow_url_fopen" must be active on your host. This option enables the URL-enabled fopen wrappers that allow external access to URL objects such as files.

Installing the CSV extension

Download the extension from our website. To do this, click on "Download now":

You can then upload and install the ZIP file normally via the WordPress plugin installation. After activation, the CSV interface is also selectable under Shop API.

Setting up the store for CSV feeds

Now create a new store in affiliate-toolkit under Shops.

1) TItel of the store internal

The designation can be freely selected and is only used internally.

2) Data supplier

Here you select CSV API.

3) Feed List URL

Insert here the feed URL you generated from the respective Create a Feed tool.

4) CSV character set

By default, the files are opened with the UTF8 character set. So you don't have to enter anything in that case.

There are CSV files which have a different character set. In this case, you must enter the necessary character set. If the file uses e.g. the Windows character set 1252, you can enter"ISO-8859-1". The characters are then converted from code page 1252 to UTF8 during import.

5) Columns separator

This separator separates the fields from each other. You either have to see directly in the Create a Feed tool which separator it is or you have to open the file in the editor and check which character it is.

We currently support the following separators:

  • Tab
  • Pipe (|)
  • Circumflex (^)
  • comma (,)
  • Semicolon (;)

6) Import mode

The import mode specifies how the file should be imported. So you can choose between:

  • File stream
    Your file will be opened in the stream and written to the web space. This way the work memory is not overloaded because copying is always done in blocks. However, some providers do not support this.
  • File download
    Here the file is retrieved (loaded into memory) via wp_remote_get and then written to disk. In the course of this, line breaks can also be removed.
  • Web client
    Similar to file download but here a web request is sent outside of WordPress. The file is also completely loaded into memory and then written to disk.
  • GZIP compression
    Your file will be opened in the stream and at the same time unzipped and written to the web space. This way the work memory is not overloaded because copying and unpacking is always done in blocks.

7) First row is column header

If your file contains a column header, select this option. Most vendors send a column header with the file. Otherwise you will only get column 1 to column x as field name.

8) Remove line breaks before importing

This option can be used to clean up the import file. Some vendors insert line breaks in item descriptions which can cause problems during import. This option removes the line breaks before import.

9) Character limit

For example, if the product title or description contains the delimiter itself, add either a quotation mark (") around the text or an apostrophe (') around the text.

10) Waiting time before file is downloaded

Here you can define a waiting time before the upload. As a rule, you do not need this.

11) Ignore first x lines

If your import file has a summary in the first lines, then it would be good to skip those lines. This is the only way to read in the columns correctly.

12 Pre-filter (one term per line)

Allows you to specify search terms for the feed during import. Only if this search term is present in the line, the line will be imported. For example, categories "Technology" can be imported but "Fashion" is ignored.

Import the feeds

After you save the store, the recognized fields will be listed. These fields must now be assigned. On the left you can see the field name of affiliate-toolkit. On the right you need to select the field name in the CSV.

1) Prefix

Here you can append a value to the front of the field. e.g. with the prefix "https://" the field "" becomes "".

2) Field name

Select the correct field name here. Once the data has been imported, you will also see a sample value in parentheses.

3) Suffix

Here you can append a value to the end of the field. e.g. with the sufix "?ref=1" the field "" becomes "".

4) Fallback

If the field does not contain a value, the fallback value is taken.

5) User defined fields

Here you can fill your own fields with CSV values.

Download the feed

After you have linked the fields, you can load the product data.

You can see that the store is marked with "Download & Import required" in orange.

Here the product feed is not yet imported. There are two ways to do this:

  • Wait until the cronjob has done the work (this happens in the background)
  • Trigger the import manually (this can lead to a timeout)

You can start the import manually by checking the "Download & Import required" box. Then you save the store.

Example configurations

Here we have put together some more sample configurations. Of course, it is possible that your configuration has changed in the meantime.

CSV Shop for Mediamarkt and Saturn respectively

We have used this configuration for Mediamarkt.

CSV Shop for CJ Affiliate (formerly Commission Junction) Feeds

We are still trying to find a sample configuration here.

CSV Shop for Webgains

This is the configuration we used for Webgains.

CSV Shop for Belboon

This is the configuration we used for Belboon.

Database Tables & Files

You will find a new table in your database named {prefx}_atkp_csv_ {shopid}.

In the directory "/wp-content/uploads/affiliate-toolkit" you will also find the associated feed CSV files:

Import products via the backend

Create search lists

A list is a group of products. You can create search lists and also extended lists here. We have also written a separate article on this.

How to add a product box to your page.

We have written a separate article on this. You can find it here. You can find the explanation for shortcodes here.

Updated: 21. February 2023
Still not using affiliate-toolkit?
Setup takes less than 5 minutes and you can start to import first products!
Learn more about the packagesDownload FREE Version
Still need help?
Submit Your Question
Please give us the details, our support team will get back to you.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram