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
<add-item item-descriptor="device" repository="/atg/commerce/catalog/ProductCatalog" id="prod1"> <set-property name="type"><![CDATA[device]]></set-property> <set-property name="childSKUs"><![CDATA[skuNokE6]]></set-property> <set-property name="colour"><![CDATA[Colour_001]]></set-property> <set-property name="name"><![CDATA[Nokia E6]]></set-property> <set-property name="ancestorCategories"><![CDATA[cat10002,cat10004]]></set-property> <set-property name="brand"><![CDATA[brand_006]]></set-property> <set-property name="subType"><![CDATA[dst10001]]></set-property> <set-property name="parentCategoriesForCatalog"><![CDATA[catalog10002=cat10004]]></set-property> </add-item>
Now we go to item-descriptor device-sku for getting the custom attributes and options of device :
<add-item item-descriptor="device-sku" repository="/atg/commerce/catalog/ProductCatalog" id="skuNokE6"> <set-property name="preorderable"><![CDATA[false]]></set-property> <set-property name="listPrice"><![CDATA[57.0]]></set-property> <set-property name="notInSale"><![CDATA[true]]></set-property> <set-property name=" "><![CDATA[catalog10002]]></set-property> <set-property name="channels"><![CDATA[200006,200002]]></set-property> <set-property name="instock"><![CDATA[false]]></set-property> <set-property name="outofstock"><![CDATA[false]]></set-property> <set-property name="type"><![CDATA[device-sku]]></set-property> <set-property name="name"><![CDATA[Nokia E6]]></set-property> </add-item>
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 :
<add-item item-descriptor="brand" repository="/atg/commerce/catalog/ProductCatalog" id="brand_006"> <set-property name="description"><![CDATA[Nokia]]></set-property> <set-property name="idseo"><![CDATA[Nokia]]></set-property> <set-property name="name"><![CDATA[Nokia]]></set-property> </add-item>
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 :
<set-property name="parentCategoriesForCatalog"><![CDATA[catalog10002=cat10004]]></set-property>
the complete tag is :
<add-item item-descriptor="catalog" repository="/atg/commerce/catalog/ProductCatalog" id="catalog10002"> <set-property name="rootCategories"><![CDATA[cat30054,cat10002]]></set-property> <set-property name="displayName"><![CDATA[catalog B2C]]></set-property> <set-property name="directAncestorCatalogsAndSelf"><![CDATA[catalog10002]]></set-property> <!-- export is false <set-property name="version"><![CDATA[2]]></set-property> --> <set-property name="allRootCategories"><![CDATA[cat30054,cat10002]]></set-property> <set-property name="creationDate"><![CDATA[8/7/2008 17:51:59]]></set-property> <set-property name="lastModifiedDate"><![CDATA[2/26/2014 11:34:09]]></set-property> </add-item>
here the catalog or store is catalog10002 and the root category of this catalog is :
<set-property name="rootCategories"><![CDATA[cat30054,cat10002]]></set-property>
for finding just search with id=”cat10002”.
Ok we stop here it we be continued in next courses ...
Comments