Jump to content

Update product by webservice reset value of "position_in_category"


Giuseppe L.

Recommended Posts

Hi at all,
I try to update product, by webservice with this xml.

In the sample i set position_in_category = 5 but wrong.

 

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<product>
<id><![CDATA[621]]></id>
<id_manufacturer><![CDATA[0]]></id_manufacturer>
<id_supplier><![CDATA[0]]></id_supplier>
<id_category_default xlink:href="http://www.mywebsite.com/api/categories/50"><![CDATA[50]]></id_category_default>
<new/>
<cache_default_attribute><![CDATA[0]]></cache_default_attribute>
<id_default_image xlink:href="http://www.mywebsite.com/api/images/products/621/1494" notFilterable="true"><![CDATA[1494]]></id_default_image>
<id_default_combination notFilterable="true"/>
<id_tax_rules_group xlink:href="http://www.mywebsite.com/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group>
<position_in_category notFilterable="true">5</position_in_category>
<type notFilterable="true"><![CDATA[simple]]></type>
<id_shop_default><![CDATA[1]]></id_shop_default>
<reference><![CDATA[284832]]></reference>
<supplier_reference/>
<location/>
<width><![CDATA[0.000000]]></width>
<height><![CDATA[0.000000]]></height>
<depth><![CDATA[0.000000]]></depth>
<weight>0.000</weight>
<quantity_discount><![CDATA[0]]></quantity_discount>
<ean13>7981577716960</ean13>
<upc/>
<cache_is_pack><![CDATA[0]]></cache_is_pack>
<cache_has_attachments><![CDATA[0]]></cache_has_attachments>
<is_virtual><![CDATA[0]]></is_virtual>
<on_sale><![CDATA[0]]></on_sale>
<online_only><![CDATA[0]]></online_only>
<ecotax><![CDATA[0.000000]]></ecotax>
<minimal_quantity><![CDATA[0]]></minimal_quantity>
<price>4.918</price>
<wholesale_price><![CDATA[0.000000]]></wholesale_price>
<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[404]]></redirect_type>
<id_product_redirected><![CDATA[0]]></id_product_redirected>
<available_for_order><![CDATA[1]]></available_for_order>
<available_date><![CDATA[0000-00-00]]></available_date>
<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[2015-06-10 17:46:45]]></date_add>
<date_upd><![CDATA[2015-10-03 06:59:20]]></date_upd>
<meta_description><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[]]></language></meta_description>
<meta_keywords><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[]]></language></meta_keywords>
<meta_title><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[]]></language></meta_title>
<link_rewrite><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[gancio-c6011]]></language></link_rewrite>
<name><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1">Gancio C6011</language></name>
<description><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[<h2>Clamp leggero in alluminio per Truss, design Slim:</h2>
<h3><br />Certificazione stampigliata su Ogni Esemplare!</h3>
<p><br />SWL (Safe working load): 100kg<br />Perno M10 incluso<br />Compatibile con tubi di diametro 48-51mm<br />Costruito in alluminio ad alta resistenza</p>]]></language></description>
<description_short><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[<div class="Prodotto">
<h1 class="nomeProdotto" style="text-align:center;">Gancio per americana tipo Aliscaff</h1>
<div class="DescrizioneProdotto">
<p style="text-align:center;">certificato stampigliato su ogni cancio</p>
</div>
</div>
<p> </p>]]></language></description_short>
<available_now><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[]]></language></available_now>
<available_later><language id="1" xlink:href="http://www.mywebsite.com/api/languages/1"><![CDATA[]]></language></available_later>
<associations>
<categories nodeType="category" api="categories">
<id><![CDATA[50]]></id>
</category>
</categories>
<images nodeType="image" api="images">
<id><![CDATA[1494]]></id>
</image>
<id><![CDATA[1495]]></id>
</image>
<id><![CDATA[1496]]></id>
</image>
</images>
<combinations nodeType="combination" api="combinations"/>
<product_option_values nodeType="product_option_value" api="product_option_values"/>
<product_features nodeType="product_feature" api="product_features"/>
<tags nodeType="tag" api="tags"/>
<stock_availables nodeType="stock_available" api="stock_availables">
<id><![CDATA[5721]]></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>

 

When i check position into backend .I show 0 into position order

Where i wrong?

 

Thanks

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...