Jump to content

Piqueras94

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Piqueras94

  1. Buenos días. Estoy intentando actualizar el stock de las combinaciones de productos utilizando la api de Prestashop. He estado viendo en foros que se realiza una modificación en la sección "stock_available" del xml del producto. El problema que tengo es que no aparece el ID de la combinación para modificar el stock. Añado la estructura de un producto de ejemplo. Gracias. <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[271]]></id> <id_manufacturer xlink:href="https://xxxxx.com/api/manufacturers/15"><![CDATA[15]]></id_manufacturer> <id_supplier><![CDATA[0]]></id_supplier> <id_category_default xlink:href="https://xxxxx.com/api/categories/2"><![CDATA[2]]></id_category_default> <new></new> <cache_default_attribute><![CDATA[510]]></cache_default_attribute> <id_default_image notFilterable="true"></id_default_image> <id_default_combination xlink:href="https://xxxxx.com/api/combinations/510" notFilterable="true"><![CDATA[510]]></id_default_combination> <id_tax_rules_group xlink:href="https://xxxxx.com/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group> <position_in_category notFilterable="true"><![CDATA[143]]></position_in_category> <manufacturer_name notFilterable="true"><![CDATA[Spiuk]]></manufacturer_name> <quantity notFilterable="true"><![CDATA[0]]></quantity> <type notFilterable="true"><![CDATA[simple]]></type> <id_shop_default><![CDATA[1]]></id_shop_default> <reference><![CDATA[MCANA173]]></reference> <supplier_reference></supplier_reference> <location></location> <width><![CDATA[0.000000]]></width> <height><![CDATA[0.000000]]></height> <depth><![CDATA[0.000000]]></depth> <weight><![CDATA[0.000000]]></weight> <quantity_discount><![CDATA[0]]></quantity_discount> <ean13></ean13> <isbn></isbn> <upc></upc> <cache_is_pack><![CDATA[0]]></cache_is_pack> <cache_has_attachments><![CDATA[0]]></cache_has_attachments> <is_virtual><![CDATA[0]]></is_virtual> <state><![CDATA[1]]></state> <additional_delivery_times><![CDATA[1]]></additional_delivery_times> <delivery_in_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_in_stock> <delivery_out_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_out_stock> <on_sale><![CDATA[0]]></on_sale> <online_only><![CDATA[0]]></online_only> <ecotax><![CDATA[0.000000]]></ecotax> <minimal_quantity><![CDATA[1]]></minimal_quantity> <low_stock_threshold><![CDATA[0]]></low_stock_threshold> <low_stock_alert><![CDATA[0]]></low_stock_alert> <price><![CDATA[0.000000]]></price> <wholesale_price><![CDATA[0.000000]]></wholesale_price> <unity></unity> <unit_price_ratio><![CDATA[0.000000]]></unit_price_ratio> <additional_shipping_cost><![CDATA[0.00]]></additional_shipping_cost> <customizable><![CDATA[0]]></customizable> <text_fields><![CDATA[0]]></text_fields> <uploadable_files><![CDATA[0]]></uploadable_files> <active><![CDATA[1]]></active> <redirect_type><![CDATA[301-category]]></redirect_type> <id_type_redirected><![CDATA[0]]></id_type_redirected> <available_for_order><![CDATA[1]]></available_for_order> <available_date><![CDATA[0000-00-00]]></available_date> <show_condition><![CDATA[0]]></show_condition> <condition><![CDATA[new]]></condition> <show_price><![CDATA[1]]></show_price> <indexed><![CDATA[1]]></indexed> <visibility><![CDATA[both]]></visibility> <advanced_stock_management><![CDATA[0]]></advanced_stock_management> <date_add><![CDATA[2020-12-17 10:43:34]]></date_add> <date_upd><![CDATA[2020-12-29 13:43:22]]></date_upd> <pack_stock_type><![CDATA[3]]></pack_stock_type> <meta_description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_description> <meta_keywords><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_keywords> <meta_title><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_title> <link_rewrite><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language></link_rewrite> <name><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language></name> <description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description> <description_short><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description_short> <available_now><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_now> <available_later><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_later> <associations> <categories nodeType="category" api="categories"> <category xlink:href="https://xxxxx.com/api/categories/2"> <id><![CDATA[2]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/116"> <id><![CDATA[116]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/148"> <id><![CDATA[148]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/152"> <id><![CDATA[152]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/170"> <id><![CDATA[170]]></id> </category> </categories> <images nodeType="image" api="images"/> <combinations nodeType="combination" api="combinations"> <combination xlink:href="https://xxxxx.com/api/combinations/510"> <id><![CDATA[510]]></id> </combination> </combinations> <product_option_values nodeType="product_option_value" api="product_option_values"> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/1"> <id><![CDATA[1]]></id> </product_option_value> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/117"> <id><![CDATA[117]]></id> </product_option_value> </product_option_values> <product_features nodeType="product_feature" api="product_features"> <product_feature xlink:href="https://xxxxx.com/api/product_features/1"> <id><![CDATA[1]]></id> <id_feature_value xlink:href="https://xxxxx.com/api/product_feature_values/1"><![CDATA[1]]></id_feature_value> </product_feature> </product_features> <tags nodeType="tag" api="tags"/> <stock_availables nodeType="stock_available" api="stock_availables"> <stock_available xlink:href="https://xxxxx.com/api/stock_availables/913"> <id><![CDATA[913]]></id> <id_product_attribute><![CDATA[0]]></id_product_attribute> </stock_available> </stock_availables> <accessories nodeType="product" api="products"/> <product_bundle nodeType="product" api="products"/> </associations> </product> </prestashop>
  2. Good morning. I am trying to update the stock of the product combinations using the Prestashop api. I've been seeing in forums that an addition is made in the "stock_available" section of the products xml. The problem I have is that the ID of the combination to modify the stock does not appear. I add the structure of an example product. Thank you. <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[271]]></id> <id_manufacturer xlink:href="https://xxxxx.com/api/manufacturers/15"><![CDATA[15]]></id_manufacturer> <id_supplier><![CDATA[0]]></id_supplier> <id_category_default xlink:href="https://xxxxx.com/api/categories/2"><![CDATA[2]]></id_category_default> <new></new> <cache_default_attribute><![CDATA[510]]></cache_default_attribute> <id_default_image notFilterable="true"></id_default_image> <id_default_combination xlink:href="https://xxxxx.com/api/combinations/510" notFilterable="true"><![CDATA[510]]></id_default_combination> <id_tax_rules_group xlink:href="https://xxxxx.com/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group> <position_in_category notFilterable="true"><![CDATA[143]]></position_in_category> <manufacturer_name notFilterable="true"><![CDATA[Spiuk]]></manufacturer_name> <quantity notFilterable="true"><![CDATA[0]]></quantity> <type notFilterable="true"><![CDATA[simple]]></type> <id_shop_default><![CDATA[1]]></id_shop_default> <reference><![CDATA[MCANA173]]></reference> <supplier_reference></supplier_reference> <location></location> <width><![CDATA[0.000000]]></width> <height><![CDATA[0.000000]]></height> <depth><![CDATA[0.000000]]></depth> <weight><![CDATA[0.000000]]></weight> <quantity_discount><![CDATA[0]]></quantity_discount> <ean13></ean13> <isbn></isbn> <upc></upc> <cache_is_pack><![CDATA[0]]></cache_is_pack> <cache_has_attachments><![CDATA[0]]></cache_has_attachments> <is_virtual><![CDATA[0]]></is_virtual> <state><![CDATA[1]]></state> <additional_delivery_times><![CDATA[1]]></additional_delivery_times> <delivery_in_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_in_stock> <delivery_out_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_out_stock> <on_sale><![CDATA[0]]></on_sale> <online_only><![CDATA[0]]></online_only> <ecotax><![CDATA[0.000000]]></ecotax> <minimal_quantity><![CDATA[1]]></minimal_quantity> <low_stock_threshold><![CDATA[0]]></low_stock_threshold> <low_stock_alert><![CDATA[0]]></low_stock_alert> <price><![CDATA[0.000000]]></price> <wholesale_price><![CDATA[0.000000]]></wholesale_price> <unity></unity> <unit_price_ratio><![CDATA[0.000000]]></unit_price_ratio> <additional_shipping_cost><![CDATA[0.00]]></additional_shipping_cost> <customizable><![CDATA[0]]></customizable> <text_fields><![CDATA[0]]></text_fields> <uploadable_files><![CDATA[0]]></uploadable_files> <active><![CDATA[1]]></active> <redirect_type><![CDATA[301-category]]></redirect_type> <id_type_redirected><![CDATA[0]]></id_type_redirected> <available_for_order><![CDATA[1]]></available_for_order> <available_date><![CDATA[0000-00-00]]></available_date> <show_condition><![CDATA[0]]></show_condition> <condition><![CDATA[new]]></condition> <show_price><![CDATA[1]]></show_price> <indexed><![CDATA[1]]></indexed> <visibility><![CDATA[both]]></visibility> <advanced_stock_management><![CDATA[0]]></advanced_stock_management> <date_add><![CDATA[2020-12-17 10:43:34]]></date_add> <date_upd><![CDATA[2020-12-29 13:43:22]]></date_upd> <pack_stock_type><![CDATA[3]]></pack_stock_type> <meta_description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_description> <meta_keywords><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_keywords> <meta_title><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_title> <link_rewrite><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language></link_rewrite> <name><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language></name> <description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description> <description_short><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description_short> <available_now><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_now> <available_later><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_later> <associations> <categories nodeType="category" api="categories"> <category xlink:href="https://xxxxx.com/api/categories/2"> <id><![CDATA[2]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/116"> <id><![CDATA[116]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/148"> <id><![CDATA[148]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/152"> <id><![CDATA[152]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/170"> <id><![CDATA[170]]></id> </category> </categories> <images nodeType="image" api="images"/> <combinations nodeType="combination" api="combinations"> <combination xlink:href="https://xxxxx.com/api/combinations/510"> <id><![CDATA[510]]></id> </combination> </combinations> <product_option_values nodeType="product_option_value" api="product_option_values"> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/1"> <id><![CDATA[1]]></id> </product_option_value> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/117"> <id><![CDATA[117]]></id> </product_option_value> </product_option_values> <product_features nodeType="product_feature" api="product_features"> <product_feature xlink:href="https://xxxxx.com/api/product_features/1"> <id><![CDATA[1]]></id> <id_feature_value xlink:href="https://xxxxx.com/api/product_feature_values/1"><![CDATA[1]]></id_feature_value> </product_feature> </product_features> <tags nodeType="tag" api="tags"/> <stock_availables nodeType="stock_available" api="stock_availables"> <stock_available xlink:href="https://xxxxx.com/api/stock_availables/913"> <id><![CDATA[913]]></id> <id_product_attribute><![CDATA[0]]></id_product_attribute> </stock_available> </stock_availables> <accessories nodeType="product" api="products"/> <product_bundle nodeType="product" api="products"/> </associations> </product> </prestashop>
  3. Hola gloomoc, Tengo el mismo problema que tú. ¿Has conseguido solucionar este problema? Gracias.
×
×
  • Create New...