使用C#和Magentostore更新和下载产品 [英] Products Up- and Download with C# and the Magentostore
问题描述
我是如何做到产品在Magentoshop易产品图片高度或下载.整个应该用C#实现.我魔杖使用SOAP V2.我对每一个帮助表示感谢.
how I am able to do products in the Magentoshop easy products with pictures highly or downloaded. The whole one should be realised with C #. I wand to use SOAP V2. I am grateful for every help.
推荐答案
不容易反正获得从mangento店在C# - 项目.
Isn't easy anyway to get the product information from a mangento shop in your C#-project.
所有你必须首先添加一个
First of all you have to add a ServiceReference
in you C#-project to connect to the magento soap service.
使用SOAP V2服务,您必须使用类似的东西
Working with the SOAP V2 service you have to use something like this
http://<your domain>/magento/index.php/api/v2_soap?wsdl
作为
as your ServiceReference
.
包括在
After including the ServiceReference
you should have an Interface
namend Mage_Api_Model_Server_V2_HandlerPortTypeClient
in your Objectexplorer.
现在你可以从你的C# - 项目.
Now you are able to communicate with the Magento SOAP Service from your C#-project.
下面,用于与服务和获取产品信息的communitaction一个基本样品.
Here a basic sample for the communitaction with the service and getting product information.
包含
using <YourSOAPService>.ServiceReference;
你的类文件.然后尝试以下.
to your class file. Then try the following.
Mage_Api_Model_Server_V2_HandlerPortTypeClient client = null;
client = new Mage_Api_Model_Server_V2_HandlerPortTypeClient();
if (client.State != System.ServiceModel.CommunicationState.Opened)
client.Open();
var sessionID = _client.login(<yourApiUser>, <yourApiPassword>);
catalogProductEntity[] resultArray = null;
client.catalogProductList(out resultArray, sessionID
, new filters(), <storeview>);
运行的代码后,你应该在你的C# - 项目.
After running that code you should have an array with all unfilterd products of your magento shop in your C#-project.
在此示例中的所有值
In this sample all values in <>
musst be replaced with your on information.
这篇关于使用C#和Magentostore更新和下载产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!