/   /   /  Migrate Form ATG Commerce to Magento 2 (concept and programmation) (part1)

Note:

For more extensions and themes visit our store

Migrate Form ATG Commerce to Magento 2 (concept and programmation) (part1)


In the world of the big business  appear Oracle ATG Commerce , in many statistic It occupies an advanced position , yes the Magento 1   It has several elements to accommodate large-scale projects and it's needs ,  But it lacks the tools by which tasks are separated, and the removal of conflict, the user experience in admin, default unit test tool , it's real and flexible system but with old mechanism  , In Ibnab we think the Magento 2 is here for taking  advanced position in this domain of big  business  and  large-scale projects .
In this series of course we give some ideas and path for how migrate from ATG Commerce to Magento 2  .

Atg give your a large exported xml files contain all data of store, items of catalog  customer and config… ;

Atg commerce use technique of product , product sku (for more options related to product like price group or any other) , the more important file here for our case the xml contain the data of catalog .

How is Read from XML ?

Every element is a tag with name <add-item it can be <update-item, and have some 'in line' property the : <add-item item-descriptor="device" repository="/atg/commerce/catalog/ProductCatalog" id="prod1">

item-descriptor : set of repository items that share the same attributes (like attribute set in magento)
id : id of product
repository : the class responsible of read and write in db for specific entity or table

  1.  
  2. <add-item item-descriptor="device" repository="/atg/commerce/catalog/ProductCatalog" id="prod1">
  3.   <set-property name="type"><![CDATA[device]]></set-property>
  4.   <set-property name="childSKUs"><![CDATA[skuNokE6]]></set-property>
  5.   <set-property name="colour"><![CDATA[Colour_001]]></set-property>
  6.  <set-property name="name"><![CDATA[Nokia E6]]></set-property>
  7.   <set-property name="ancestorCategories"><![CDATA[cat10002,cat10004]]></set-property>
  8.   <set-property name="brand"><![CDATA[brand_006]]></set-property>
  9.   <set-property name="subType"><![CDATA[dst10001]]></set-property>
  10.   <set-property name="parentCategoriesForCatalog"><![CDATA[catalog10002=cat10004]]></set-property>
  11. </add-item>
  12.  

Now we go to item-descriptor device-sku for getting the custom attributes and options of device :

  1.  
  2. <add-item item-descriptor="device-sku" repository="/atg/commerce/catalog/ProductCatalog" id="skuNokE6">
  3.   <set-property name="preorderable"><![CDATA[false]]></set-property>
  4.   <set-property name="listPrice"><![CDATA[57.0]]></set-property>
  5.   <set-property name="notInSale"><![CDATA[true]]></set-property>
  6.   <set-property name=" "><![CDATA[catalog10002]]></set-property>
  7.   <set-property name="channels"><![CDATA[200006,200002]]></set-property>
  8.   <set-property name="instock"><![CDATA[false]]></set-property>
  9.   <set-property name="outofstock"><![CDATA[false]]></set-property>
  10.   <set-property name="type"><![CDATA[device-sku]]></set-property>
  11.   <set-property name="name"><![CDATA[Nokia E6]]></set-property>
  12. </add-item>
  13.  

from sku we can read the price from  set-property with name  listPrice here is 57.0 ,

Now we can  get  the device and read many attributes informations like name , price , type, brand .

But for example we have here brand <set-property name="brand"><![CDATA[brand_006]]></set-property> with custom identifier how we can get the name and information , ok in the xml search for item-descriptor="brand" I think as result you have many items brand for example :

  1.  
  2. <add-item item-descriptor="brand" repository="/atg/commerce/catalog/ProductCatalog" id="brand_006">
  3.   <set-property name="description"><![CDATA[Nokia]]></set-property>
  4.   <set-property name="idseo"><![CDATA[Nokia]]></set-property>
  5.   <set-property name="name"><![CDATA[Nokia]]></set-property>
  6. </add-item>
  7.  

you can now get the data of brand  ….

how we can get categories of product from here , you can explore <set-property name="ancestorCategories"><![CDATA[cat10002,cat10004]]></set-property> for product device ,
the cat10002 is root category and cat10004 is sub category and for finding what the catalog(store in magento ) this category  related to it go to in device :

  1.  
  2. <set-property name="parentCategoriesForCatalog"><![CDATA[catalog10002=cat10004]]></set-property>
  3.  

the complete tag is :

  1.  
  2. <add-item item-descriptor="catalog" repository="/atg/commerce/catalog/ProductCatalog" id="catalog10002">
  3.   <set-property name="rootCategories"><![CDATA[cat30054,cat10002]]></set-property>
  4.   <set-property name="displayName"><![CDATA[catalog B2C]]></set-property>
  5.   <set-property name="directAncestorCatalogsAndSelf"><![CDATA[catalog10002]]></set-property>
  6.   <!-- export is false   <set-property name="version"><![CDATA[2]]></set-property>  -->
  7.   <set-property name="allRootCategories"><![CDATA[cat30054,cat10002]]></set-property>
  8.   <set-property name="creationDate"><![CDATA[8/7/2008 17:51:59]]></set-property>
  9.   <set-property name="lastModifiedDate"><![CDATA[2/26/2014 11:34:09]]></set-property>
  10. </add-item>
  11.  

here the catalog or store is  catalog10002 and the root category of this catalog is :
  1.  
  2. <set-property name="rootCategories"><![CDATA[cat30054,cat10002]]></set-property>
  3.  

for finding just search with id=”cat10002”.

Ok we stop here it we be continued in next courses ...

 

Comments

IBNAB is a company made of a group of professionals whose work is providing secure open source solutions. Our company strives for reaching magnificent results with each experience and provides professional open source solutions that cover every part of the business process.