Export catalog data(using an external tool) from my e-commerce

Vote:
 

Hi, guys,

I have some questions.

I want to create an external tool(which is not part of my web-site) that will export the catalog from my ecommerce site. I want an external tool, because I want it to do it on special schedule and not mannually.

The import will be done mannually through the e-commerce UI.

Can I call and use the export method of episerver e-commerce?

Do you have any suggestions how to do it?

 

Thanks in advance,

Lena

#75303
Sep 24, 2013 15:55
Vote:
 

And If I can call and use the export method of episerver e-commerce which configurations I need?

Or I can not use it externally from a web environment?

 

#75379
Sep 26, 2013 13:31
Vote:
 

Hi Lena, 

I see that you were looking for solution in Sep-13, Did you find any solution to this problme ? I am looking for similar one and still deciding the approach I should follow. Any help would be much apprecited. Thx!

 

Thx,
Jay

#77254
Nov 13, 2013 20:14
Vote:
 

// Create MetaModelGenerator
MetaModelGenerator generator = new MetaModelGenerator();

// Use generator.SelectedElements to export custom elements

try

{
// Open DataContext
DataContext.Current = new DataContext(connectionString);

// Load Save Commands
SchemaDocument schema = new SchemaDocument();
schema.LoadDefault();
generator.Schema = schema;

// Load Save Commands
XmlDocument xmlOutput = generator.Generate();

xmlOutput.Save(filePath);

}
catch (Exception ex)
{
}

#77277
Edited, Nov 14, 2013 12:42
Vote:
 

Thanks Khan for the reply. I think I asked question in wrong thread or may be wrong way.

I would re-write the question below;

I want to import data from extrnal system to Epi Commerce. I would use Catalog API for the same. The issue is, some of the products I am importing from my external source have to go in multiple location in the Commerce. So I am looking for API that supports copying products to multiple location. These products are exactly identicle but in commerce they need to be in two or more location.

To clarify more, lets take this example;

Location 1: Products > Soda > Coke

Location 2: Products > Grocery Isle > Soda > Coke

Let me know, I am ok giving more details if you would like. Thx again!

Jay

#77285
Nov 14, 2013 15:42
Vote:
 

http://docs.mediachase.com/display/ecf52devguide/Importing+Catalog+Data+using+APIs

http://docs.mediachase.com/display/ecf52devguide/Exporting+and+Importing+Meta+Model

http://docs.mediachase.com/display/ECFG52CommerceGuide/Importing+and+Exporting+Catalogs

http://docs.mediachase.com/display/ECFG52CommerceGuide/Using+CSV+Files+to+Quickly+Create+Custom+Catalogs

Using the CSV Import we can do this by assigning categories as Cat1,Cat2 (Separated by comma) in Inout Column.

Regards

/K

 

#77298
Nov 15, 2013 9:26
Vote:
 

You should take a look on the

CatalogRelationDto relation = new CatalogRelationDto();

A fast example could be something like this. Lets say you have a comma seperated list where you want these relations for the specific product.

       string[] commerceCategories = i.Product.CommerceCategory.Split(',');

                            foreach (string category in commerceCategories)
                            {

                                #region Create Relations
                                // Set the entry node relation.
                                CatalogRelationDto relation = new CatalogRelationDto();
                                CatalogRelationDto.NodeEntryRelationRow nodeRelation = relation.NodeEntryRelation.NewNodeEntryRelationRow();
                                nodeRelation.CatalogId = catalogID;
                                nodeRelation.CatalogEntryId = entry.CatalogEntry[0].CatalogEntryId;
                                nodeRelation.CatalogNodeId = int.Parse(category);
                                nodeRelation.SortOrder = 0;
                                relation.NodeEntryRelation.AddNodeEntryRelationRow(nodeRelation);

                                CatalogContext.Current.SaveCatalogRelationDto(relation);

                                #endregion

                            }


                            skuPropHelper.SaveEntry(entry);

#77694
Nov 23, 2013 20:34
Vote:
 

The export command is part of the Mediachase.Commerce.dll.  If you look at the CatalogImport.exe command line tool that is available for download you can get an idea for what configuration you need to be able to call the CatalogImportExport.Export() method.  This is the same method called by Commerce Manager after selecting a catalog for export.

        ///<summary>

        /// Exports the specified catalog name.

        ///</summary>

        ///<param name="catalogName">Name of the catalog.</param>

        ///<param name="output">The output.</param>

        ///<param name="baseFilePath">The base file path.</param>

        public void Export(string catalogName, Stream output, string baseFilePath)

#77750
Nov 25, 2013 21:40
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.