Mainak Sreemany Posted March 10, 2020 Share Posted March 10, 2020 Hello Experts, I am sending this packet to Prestashop to update products. The update is working but as I am not sending the description and images in this xml packet, the existing description and images are getting deleted from Prestashop for those products. Please guide me I am in the middle of a project and unable to find any solution. <prestashop> <product> <id>2031</id> <id_shop_default>1</id_shop_default> <name> <language id="2">INSYNC3</language> </name> <price>30</price> <reference>TEST003</reference> <active>1</active> <id_tax_rules_group>14</id_tax_rules_group> <width>0</width> <height>0</height> <depth>0</depth> <weight>29</weight> <on_sale>0</on_sale> <online_only>0</online_only> <text_fields>0</text_fields> <available_for_order>1</available_for_order> <condition>used</condition> <show_price>1</show_price> <link_rewrite> <language id="2"/> </link_rewrite> <id_category_default>2</id_category_default> <state>1</state> <low_stock_alert>1</low_stock_alert> </product> </prestashop> Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2020 Share Posted March 10, 2020 You have to put code here to update your products. Otherwise there is no help. If you are using an update module, contact the module developer. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 11, 2020 Share Posted March 11, 2020 Hi, You need to send the all the fields otherwise system will delete the same. To to the same, First fetch the data of the product using GET API & pass the same in your request so that original data will not be deleted for the images/description etc. Link to comment Share on other sites More sharing options...
Guest Posted March 12, 2020 Share Posted March 12, 2020 $product = new Product (id); $product->update (); // updated only new data not $product->add(); // replace all product data Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now