C# MagentoSOAP:如何更新数量增量?
我在一个C#项目中使用soapv2,我需要创建许多使用soapv2的文章 现在,对象没有字段quantity\u increments。 即使在文档中也没有它的踪迹,而管理和数据库中的所有其他字段都存在 如何更新此值(针对单个产品)?C# MagentoSOAP:如何更新数量增量?,c#,web-services,magento,soap,C#,Web Services,Magento,Soap,我在一个C#项目中使用soapv2,我需要创建许多使用soapv2的文章 现在,对象没有字段quantity\u increments。 即使在文档中也没有它的踪迹,而管理和数据库中的所有其他字段都存在 如何更新此值(针对单个产品)? 有人有什么想法或建议吗?我终于找到了一个解决方案:创建一个模块,在对象catalogInventoryStockItemUpdateEntity中添加指定的数量增量和数量增量 通过这种方式,我在创建或更新产品时通过SOAP设置了两个参数 这是wsdl.xml中的主
有人有什么想法或建议吗?我终于找到了一个解决方案:创建一个模块,在对象catalogInventoryStockItemUpdateEntity中添加指定的数量增量和数量增量 通过这种方式,我在创建或更新产品时通过SOAP设置了两个参数 这是wsdl.xml中的主要代码
这是wsi.xml
对我来说,它只在wsdl中添加了以下4个元素(wsi.xml):
如果没有元素启用数量增量和使用配置启用数量增量,clkurtz的答案对我不起作用,因为数量增量选项仍然被禁用。我认为只有在标准配置中禁用了数量增量时,才需要这两个元素。我刚刚发现使用REST时,数量增量字段确实存在。为什么它在SOAP中不可用?是虫子还是我有什么毛病?
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
<complexType name="catalogInventoryStockItemUpdateEntity">
<all>
<element name="qty_increments" type="xsd:int" minOccurs="0" />
<element name="use_config_qty_increments" type="xsd:int" minOccurs="0" />
</all>
</complexType>
</schema>
</types>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
name="{{var wsdl.name}}"
targetNamespace="urn:{{var wsdl.name}}">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
<xsd:complexType name="catalogInventoryStockItemUpdateEntity">
<xsd:sequence>
<xsd:element name="qty_increments" type="xsd:int" minOccurs="0" />
<xsd:element name="use_config_qty_increments" type="xsd:int" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
name="{{var wsdl.name}}"
targetNamespace="urn:{{var wsdl.name}}">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
<xsd:complexType name="catalogInventoryStockItemUpdateEntity">
<xsd:sequence>
<xsd:element name="enable_qty_increments" type="xsd:int" minOccurs="0" />
<xsd:element name="use_config_enable_qty_inc" type="xsd:int" minOccurs="0" />
<xsd:element name="qty_increments" type="xsd:int" minOccurs="0" />
<xsd:element name="use_config_qty_increments" type="xsd:int" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
</wsdl:definitions>