2017-11-07 4 views
1

제목을 통해 새로 만든 제품에 대한 stock_available 섹션이 없습니다. Prestashop 1.6.1 webservice를 통해 새 제품을 성공적으로 만들 수 있습니다. Prestashop webservices

<stock_availables nodeType="stock_available" api="stock_availables" /> 

그래서 내가 어떻게 제품에 대한 초기 량을 설정하는 생각이 없습니다 : 문제는 새로운 제품 XML 빈 stock_available 부분을 가지고 있다는 것입니다. 백 오피스에서 수동으로 설정하면 stock_available 섹션이 채워집니다.

아마도 XML 요청에 누락 된 것이 있습니까? 여기에 있습니다 :

<?xml version="1.0" encoding="UTF-8"?> 
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> 
<product> 
    <id/> 
    <id_manufacturer/> 
    <id_supplier/> 
    <id_category_default>52</id_category_default> 
    <new/> 
    <cache_default_attribute/> 
    <id_default_image/> 
    <id_default_combination/> 
    <id_tax_rules_group/> 
    <position_in_category/> 
    <type/> 
    <id_shop_default/> 
    <reference>A130</reference> 
    <supplier_reference/> 
    <location/> 
    <width/> 
    <height/> 
    <depth/> 
    <weight/> 
    <quantity_discount/> 
    <ean13/> 
    <upc/> 
    <cache_is_pack/> 
    <cache_has_attachments/> 
    <is_virtual/> 
    <on_sale/> 
    <online_only/> 
    <ecotax/> 
    <minimal_quantity/> 
    <price>1.30</price> 
    <wholesale_price/> 
    <unity/> 
    <unit_price_ratio/> 
    <additional_shipping_cost/> 
    <customizable/> 
    <text_fields/> 
    <uploadable_files/> 
    <active>1</active> 
    <redirect_type/> 
    <id_product_redirected/> 
    <available_for_order>1</available_for_order> 
    <available_date/> 
    <condition/> 
    <show_price>1</show_price> 
    <indexed>1</indexed> 
    <visibility/> 
    <advanced_stock_management/> 
    <date_add/> 
    <date_upd/> 
    <pack_stock_type/> 
    <meta_description> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </meta_description> 
    <meta_keywords> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </meta_keywords> 
    <meta_title> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </meta_title> 
    <link_rewrite> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </link_rewrite> 
    <name> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </name> 
    <description> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </description> 
    <description_short> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </description_short> 
    <available_now> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[product name]]></language> 
    </available_now> 
    <available_later> 
     <language id="1" xlink:href="http://www.mysite.it/prestashop/api/languages/1"><![CDATA[available later]]></language> 
    </available_later> 
<associations> 
<categories> 
    <category> 
    <id/> 
    </category> 
<category> 
     <id>52</id> 
    </category> 
     </categories> 
<images> 
    <image> 
    <id/> 
    </image> 
</images> 
<combinations> 
    <combination> 
    <id/> 
    </combination> 
</combinations> 
<product_option_values> 
    <product_option_value> 
    <id/> 
    </product_option_value> 
</product_option_values> 
<product_features> 
    <product_feature> 
    <id/> 
    <id_feature_value/> 
    </product_feature> 
</product_features> 
<tags> 
    <tag> 
    <id/> 
    </tag> 
</tags> 
<stock_availables> 
    <stock_available> 
    <id/> 
    <id_product_attribute/> 
    </stock_available> 
</stock_availables> 
<accessories> 
    <product> 
    <id/> 
    </product> 
</accessories> 
<product_bundle> 
    <product> 
    <id/> 
    <quantity/> 
    </product> 
</product_bundle> 
</associations> 
</product> 
</prestashop> 

감사합니다!

Iuri

답변

0

이 문제는 아마 PrestaShop 버전의 해당 버전의 버그했다. 최신 버전 (1.6.1.17)에서는 올바르게 작동합니다.