Differences between revisions 2 and 3
Revision 2 as of 2011-05-30 02:06:42
Size: 3861
Editor: clifford
Comment:
Revision 3 as of 2011-05-30 03:07:29
Size: 6994
Editor: clifford
Comment:
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
Line 31: Line 32:
Line 38: Line 40:
Line 61: Line 64:
just like stock , need to get the csv from magento admin page

system->Import/Export->profile->exprot_customers.

then need to modify it to suit the import program

the original csv file look like this
after change should look like this.
then use impmagdrmin to import it.
{{{
impmagdrmin
}}}
selected the upated csv file

== Update product in magento. ==
there is two way to set up item in magento.
there is the instance method and the log method.
the way we control it , involve programing. as demonstrated below.
by default magento connection has been disabled for most program.
we need to turn on the connection on for each individual program, to have them connected.
1, edit cclib/init.c find the following section
{{{
if(!strcmp(prognm,"staad")// the programs we want to connect to magento
       || !strcmp(prognm,"stgaad")
       || !strcmp(prognm,"chmin")
       || !strcmp(prognm,"spost")
       || !strcmp(prognm,"stpost")
       || !strcmp(prognm,"oqpost")
       || !strcmp(prognm,"impmagdrmin")
       || !strcmp(prognm,"impmagord")
       || !strcmp(prognm,"impmagstmin")
       || !strcmp(prognm,"log2magento")
       || !strcmp(prognm,"gencont"))
        suppress_magento = NO;
    if(!strcmp(prognm,"staad")// the program we allow to update magento product records
       || !strcmp(prognm,"stgaad")
       || !strcmp(prognm,"log2magento")
       || !strcmp(prognm,"chmin")
       || !strcmp(prognm,"spost")
       || !strcmp(prognm,"stpost")
       || !strcmp(prognm,"oqpost"))
        suppress_magento_update = NO;
    if(comp.use_cscart == 'm' && !suppress_magento)
        init_magento();}}}
there is a check for'''suppress_magento'''this control if we connect to magento for that particular program
we will at least need it set to NO for the following program
log2magento -- need to connect
gencont -- need to get the set info so need to connect
impmagstmin -- need to get the online id , so need to connect
impmagdrmin -- need to get online id , so need to connect
impmagord -- need to download order from magento so need to connect
staad -- need to get the color and size from magento , to limit user input
stgaad -- same as staad
then there is an other check use to control if that program is allowed to update magento product record'''suppress_magento_update'''
default all program should not allow to update magento record.
if want the change done by a particular program immediately appear in magento , the set this flag for that program.
Also if the flag set for a program the'''suppress_magento'''need to set for that program too.
1, so if we only want the log program to update magento record , then just put
log2magento
in the check.
2, if we want to update magento in posting and staad we put
staad
stgaad
stpost
spost
oqpost
in the check.
regardless of how we update the product. in staad the colour/size tab , will be using combo box , to limit the entry to avaliable on in magento.
following is pictures indicating the mapping of control field and magento field.
== Repopulate magento with control product. ==
1, when

Setting up integration with Magento

  1. Introduction
  2. setting up magento and control option
  3. setting up category
  4. import products from Magento.
  5. import Debtor from Magento.
  6. update Products in Magento.
  7. Repopulate Products in Magento.
  8. download orders from Magento.

Introduction

This is a document , which design to guild through the integration process step by step.

Setting up magento and control option

the first step for the integration, is to set up the control options. without the options setup correctly, all the following will not work. there are three places ,needed to be set up.

1, coaad page 2, need to run contrl

  • Enable update to odbc data files = 'Y'
  • Online Store use Cscart/Magento/None = 'M'
  • Lasted downloaded Online order id = "an order number in magento , which and order <= will not get downloaded to control"

2, braad Sales tag, need to run brctrl

  • Webshopper data source -- the xmlrpc interface of magento ,e.g.http://dev.daleandwaters.com.au/api/xmlrpc/

  • webshop login user name -- the user name used to login to magento xmlrpc service, hosting company will need to give us this.
  • webshopper login user password -- provided by the hosting company.
  • Default online Saleperson -- pick any control operator
  • default online customer -- pick any control customer

3, magento side * go to manage attribute sets and create a new set.

  • assign three attributes to the set which contain all color , size and subsize.

4, configure gencont page 3

  • Location for Webshop 1 = "the branch just been configured"
  • default Magento attribute set = "the attribute just set up in magento", this field is a pick list , will only allow you select available set in magento. all item created from control will appear in magento belong to this set. Note that this is not Category.
  • default Magento color attribute = "the attribute which contain all color in magento" is a pick list again, will only allow to pick the attribute belong to the selected set.
  • default Magento size attribute = "the attribute which contain all size in magento"
  • default Magento subsize attribute = "the attribute which contain all subsize in magento"

Setting up Category

we do not support , download of category from magento to control , or the other way , the category configuration has to be done manually. there are two way to do this

  1. by impcamin, we need to put in the online_id of magento's category in the column "online_id", the online id of the category can be found in magento admin page , manage Category.
  2. or by caaad when , creating a new category in caaad, user can enter the online_id, this field is only editable in creation time, no alteration is allowed after that.

Import products from magento

We need to get a csv file from magento, the csv can be obtained in magento admin page, system->Import/Export->profile->exprot_all_product. In case of ftp outbound not working, need to contact the hosting company, for the file.

after that , need to remove use less column in the header , and sort the csv in ascending order according to the SKU field

here is an example of what the original csv will look like.

here is an example of what the csv look like after the change.

then we will need to run

impmagstmin

select the updated csv file , it may take some time , depending on the size of the csv,

following points are very important , please make sure it is carried out

  • please , make sure when running impmagstmin , the connection has been setup, (thes option in coaad , braad, gencont)

  • please , run this program in the branch , specified in the gencont as webshop location 1, the program is will not choose it for you, you need to do a manual conset.

Importing customer from magento

just like stock , need to get the csv from magento admin page

system->Import/Export->profile->exprot_customers.

then need to modify it to suit the import program

the original csv file look like this after change should look like this. then use impmagdrmin to import it.

impmagdrmin

selected the upated csv file

Update product in magento.

there is two way to set up item in magento. there is the instance method and the log method. the way we control it , involve programing. as demonstrated below. by default magento connection has been disabled for most program. we need to turn on the connection on for each individual program, to have them connected. 1, edit cclib/init.c find the following section

if(!strcmp(prognm,"staad")// the programs we want to connect to magento
       || !strcmp(prognm,"stgaad")
       || !strcmp(prognm,"chmin")
       || !strcmp(prognm,"spost")
       || !strcmp(prognm,"stpost")
       || !strcmp(prognm,"oqpost")
       || !strcmp(prognm,"impmagdrmin")
       || !strcmp(prognm,"impmagord")
       || !strcmp(prognm,"impmagstmin")
       || !strcmp(prognm,"log2magento")
       || !strcmp(prognm,"gencont"))
        suppress_magento = NO;
    if(!strcmp(prognm,"staad")// the program we allow to update magento product records
       || !strcmp(prognm,"stgaad")
       || !strcmp(prognm,"log2magento")
       || !strcmp(prognm,"chmin")
       || !strcmp(prognm,"spost")
       || !strcmp(prognm,"stpost")
       || !strcmp(prognm,"oqpost"))
        suppress_magento_update = NO;
    if(comp.use_cscart == 'm' && !suppress_magento)
        init_magento();

there is a check forsuppress_magentothis control if we connect to magento for that particular program we will at least need it set to NO for the following program log2magento -- need to connect gencont -- need to get the set info so need to connect impmagstmin -- need to get the online id , so need to connect impmagdrmin -- need to get online id , so need to connect impmagord -- need to download order from magento so need to connect staad -- need to get the color and size from magento , to limit user input stgaad -- same as staad then there is an other check use to control if that program is allowed to update magento product recordsuppress_magento_update default all program should not allow to update magento record. if want the change done by a particular program immediately appear in magento , the set this flag for that program. Also if the flag set for a program thesuppress_magentoneed to set for that program too. 1, so if we only want the log program to update magento record , then just put log2magento in the check. 2, if we want to update magento in posting and staad we put staad stgaad stpost spost oqpost in the check. regardless of how we update the product. in staad the colour/size tab , will be using combo box , to limit the entry to avaliable on in magento. following is pictures indicating the mapping of control field and magento field.

Repopulate magento with control product.

1, when

Magento (last edited 2021-08-23 06:37:05 by 60-240-170-244)