HomeStoreCustom WorkSupportDocumentation Blog, newsletter
Knowledge BaseCreate ticketView ticketLost ticket?

Introduction and Installation


This module is for importing information into Affiliate Manager 5.x

With it you can import product configuration data and category configuration data from a flat file, affiliates from Merchant's "affiliates" feature, and affiliates from Affiliate Manager for Merchant 4.x. In the module's admin there is a tab for each of these different functions. Below you'll find a section in the documentation specific to each tab.

The official documentation on how to install a module for Merchant 5.x can be found here on MivaMerchant's site:

Module Installation

Product Configuration from Flat File

Initial screen:
Import?
   from file: Upload
   using as a delimiter:
Tab  
Other:

Restore from last backup?

On this tab you can import product configuration data for Affiliate Manager 5.x from a flat file (aka "text file").

The from file: field has to contain the path to the text file containing the data to import. It can be uploaded from your computer using the "upload" button next to the field.

You'll have to tell the module what delimiter to expect in the import file. This can be a "tab" (specified by checking the radio button next to the Tab label in the using as a delimiter area) or any character you want (specified in the field next to the Other label).

To initiate the import simply check the Import? box and click on the Import button or on the "Update" button at the bottom of the page. This will bring up a second import screen, discussed below, which will let you assign the fields and determine how to handle existing data.

With every import (this is true regardless of which tab the import is done on; they all back up to the same place) the module creates back-up copies of the relevant databases (copies of the originals with the suffix _bak applied to the name). Note that each import will over-write the previously backed-up data. To restore the databases to the "pre-import" data (and again this applies just to the latest import) check off the Restore from last backup? box and click on "Update" at the bottom of the Screen.

When you click to Import you'll be taken to the second screen, where you can assign the fields to the imported file contents.

Second screen:
If product already has a configuration: Keep Existing configuration
Update Existing configuration
Replace Existing configuration
Top row is a "header" row?
Fields:
Row
1 alpha cow cost 1 2
2 bob cow price 3 4
3 beta pig profit 5 6
4 alpha pig profit 7 8

This screen shows you the first rows of your imported data file. For each column in the import file you have to tell the import module how to treat that column of data (the selection of fields is stored by the module so on subsequent imports you will not have to re-assign the columns).

The If product already has a configuration option determines how the module will handle the situation where a configuration record is being imported which already exists in the Affiliate Manager databases. If you select Keep Existing Configuration then the imported data is discarded. If you select Update Existing Configuration then the imported data is used to change those fields for the existing record (for example you could import only the "Basis" field and have only this field modified). The other fields are left unchanged. If you select Replace Existing Configuration then the entire record is deleted and replaced with the imported data. Default values are used for any data which is not imported.

If your data file has a top row of labels (aka a "header row") then make sure that you select the Top row is a "header" row? option so that the module doesn't attempt to import it.

The imported data file can have the following columns:

Affiliate ID
OR
Affiliate Code

Product ID
OR
Product Code

Delete Product config. first?
Permit Category Override?
Basis
Percentage
Flat rate

Most of the time you will likely be importing the Affiliate Code and Product code. Just make sure that you properly assign these to the "Affiliate Code" and "Product Code" labels.

The Delete Product config. first? option has special utility. If you import a 1 in this column (or anything other than a 0 or blank) then all of that product's affiliate data will be deleted before any data is imported from the file. This is triggered only the first time it is encountered and if it is not set in the first record for that product in the data file but is set for subsequent records it will delete all of the data that has just been imported for that product! So be careful. This option can be used to delete a previous product's affiliate configuration so that you can "start from scratch".

In addition to these labels, you can also opt to skip a column entirely (for example, you might have other columns in the file for reference but which you do not to import) by selecting the "skip" label.

A typical import file, using the pipe | as the delimiter, might look like:
alpha|cow|cost|1|2
beta|cow|cost|2|3
alpha|pig|cost|1|2
beta|pig|cost|2|3
etc.

For reference the full list of possible fields (You might use this as a header row for reference):

Affiliate ID|Affiliate Code|Product ID|Product Code|Delete Product config. first?|Permit Category Override?|Basis|Percentage|Flat rate|

again, you only need one of the Affiliate Id or Affiliate Code and one of the Product Id or Product Code

Category Configuration from Flat File

Initial screen:
Import?
   from file: Upload
   using as a delimiter:
Tab  
Other:

Restore from last backup?

On this tab you can import category configuration data for Affiliate Manager 5.x from a flat file (aka "text file").

The from file: field has to contain the path to the text file containing the data to import. It can be uploaded from your computer using the "upload" button next to the field.

You'll have to tell the module what delimiter to expect in the import file. This can be a "tab" (specified by checking the radio button next to the Tab label in the using as a delimiter area) or any character you want (specified in the field next to the Other label).

To initiate the import simply check the Import? box and click on the Import button or on the "Update" button at the bottom of the page. This will bring up a second import screen, discussed below, which will let you assign the fields and determine how to handle existing data.

With every import (this is true regardless of which tab the import is done on; they all back up to the same place) the module creates back-up copies of the relevant databases (copies of the originals with the suffix _bak applied to the name). Note that each import will over-write the previously backed-up data. To restore the databases to the "pre-import" data (and again this applies just to the latest import) check off the Restore from last backup? box and click on "Update" at the bottom of the Screen.

When you click to Import you'll be taken to the second screen, where you can assign the fields to the imported file contents.

Second screen:
If category already has a configuration: Keep Existing configuration
Update Existing configuration
Replace Existing configuration
Top row is a "header" row?
Fields:
Row
1 alpha cow cost 1 2
2 bob cow price 3 4
3 beta pig profit 5 6
4 alpha pig profit 7 8

This screen shows you the first rows of your imported data file. For each column in the import file you have to tell the import module how to treat that column of data (the selection of fields is stored by the module so on subsequent imports you will not have to re-assign the columns).

The If category already has a configuration option determines how the module will handle the situation where a configuration record is being imported which already exists in the Affiliate Manager databases. If you select Keep Existing Configuration then the imported data is discarded. If you select Update Existing Configuration then the imported data is used to change those fields for the existing record (for example you could import only the "Basis" field and have only this field modified). The other fields are left unchanged. If you select Replace Existing Configuration then the entire record is deleted and replaced with the imported data. Default values are used for any data which is not imported.

If your data file has a top row of labels (aka a "header row") then make sure that you select the Top row is a "header" row? option so that the module doesn't attempt to import it.

The imported data file can have the following columns:

Affiliate ID
OR
Affiliate Code

Product ID
OR
Category Code

Delete Category config. first?
Basis
Percentage
Flat rate

Most of the time you will likely be importing the Affiliate Code and Category Code. Just make sure that you properly assign these to the "Affiliate Code" and "Category Code" labels.

The Delete Category config. first? option has special utility. If you import a 1 in this column (or anything other than a 0 or blank) then all of that category's affiliate data will be deleted before any data is imported from the file. This is triggered only the first time it is encountered and if it is not set in the first record for that category in the data file but is set for subsequent records it will delete all of the data that has just been imported for that category! So be careful. This option can be used to delete a previous category's affiliate configuration so that you can "start from scratch".

In addition to these labels, you can also opt to skip a column entirely (for example, you might have other columns in the file for reference but which you do not to import) by selecting the "skip" label.

A typical import file, using the pipe | as the delimiter, might look like:
alpha|cow|cost|1|2
beta|cow|cost|2|3
alpha|pig|cost|1|2
beta|pig|cost|2|3
etc.

For reference the full list of possible fields (You might use this as a header row for reference):

Affiliate ID|Affiliate Code|Category ID|Category Code|Delete Category config. first?|Basis|Percentage|Flat rate|

again, you only need one of the Affiliate Id or Affiliate Code and one of the Category Id or Category Code

Affiliates from Merchant

Import?
Replace affiliate if already exists?

Restore from last backup?

On this tab you can import the affiliate data from Merchant 5.x's "affiliates" feature. This will import only the affiliate data and will not import the financial data, such as payouts or the configuration data on how the affiliate is to be credited. Fields that are not imported will "default" to the same values used when creating a new affiliate from within Affiliate Manager's "Add affiliate" tab.

To do the import simply check the Import? box and click on the Import button or on the "Update" button at the bottom of the page. If the imported affiliate's code already exists in the Affiliate Manager's databases it will not be imported unless you have checked off the Replace affiliate if already exists? option. If that option is checked, the import will first delete that affiliate from the Affiliate Manager's databases and replace it with the imported information.

With every import (this is true regardless of which tab the import is done on; they all back up to the same place) the module creates back-up copies of the relevant databases (copies of the originals with the suffix _bak applied to the name). Note that each import will over-write the previously backed-up data. To restore the databases to the "pre-import" data (and again this applies just to the latest import) check off the Restore from last backup? box and click on "Update" at the bottom of the Screen.

The import maps the fields as follows (the first is the field in Affiliate Manager and the second is the field in Merchant's "affiliates" feature):

code <= code (called "login" in Merchant admin)
email <= email
company <= company
phone1 <= phone
fax <= fax
address <= addr
city <= city
state <= state
zip <= zip
country <= cntry
url <= site_url

fname lname <= con_name (the "contact name")
  -If the "contact name" has a space in it (eg. "Bob Jones") the module will save the first portion in the "first name" field and the second portion in the "last name"

acitve <= status
  -If the affiliate had the status 'Approved' then it will be made active in Affiliate Manager, otherwise it will be inactive

Affiliates from 4.x

Import?
Replace affiliate if already exists?

Location of previous store's databases:
   (this must be the path to the store's data directory relative to the miva data directory,
   including the ending /, e.g. Merchant2/00000001/)


Restore from last backup?

On this tab you can import the affiliate data from an installation of Affiliate Manager for Merchant 4.x. This will import almost all of the affiliate's data, including the "Referred By:" chain. What is not imported:

  • the customer id associated with the affiliate (so the affiliate will not be able to login to Affiliate Login 5.x until their affiliate account is again associated with a Merchant customer account
  • the affiliate's Payouts, Orders, Hits, etc. are not imported. It is our intention to add this later as a separate feature (it will not attempt to integrate the data but will instead import it as a separate set of database tables which you can view from within admin
  • the affiliate's "start date" will be set to the current time of the import. This will keep Affiliate Manager from attempting to make payouts for time periods before the affiliate was imported
  • the affiliate's "Store settings" data from the 4.x store is not imported

To initiate the import simply check the Import? box and click on the Import button or on the "Update" button at the bottom of the page. If the imported affiliate's code already exists in the Affiliate Manager's databases it will not be imported unless you have checked off the Replace affiliate if already exists? option. If that option is checked, the import will first delete that affiliate from the Affiliate Manager's databases and replace it with the imported information.
In the Location of previous store's databases field you must enter the path, relative to the miva data directory (usually named /mivadata/) of the 4.x store's data. The path has to include the ending /. For example, Merchant2/00000001/.

With every import (this is true regardless of which tab the import is done on; they all back up to the same place) the module creates back-up copies of the relevant databases (copies of the originals with the suffix _bak applied to the name). Note that each import will over-write the previously backed-up data. To restore the databases to the "pre-import" data (and again this applies just to the latest import) check off the Restore from last backup? box and click on "Update" at the bottom of the Screen.



Home Terms of Use, Policies and PrivacyContact UsAbout Us
[ Copyright © 2001-2007 – Viking Coders, LLC ]