Jump to content

Facing issue while updating products in Prestashop


Mainak Sreemany

Recommended Posts

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

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

$product = new Product (id);

$product->update ();

// updated only new data

not

$product->add();

// replace all product data

Link to comment
Share on other sites

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...