hello i'm tring to add new product to my prestashop store using REST api , but when i send my xml request i have this response: Validation error: "Property Product->link_rewrite is empty" !!! this is my xml request :
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/>
<new/>
<cache_default_attribute/>
<id_default_image/>
<id_default_combination/>
<id_tax_rules_group/>
<type/>
<id_shop_default/>
<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>1000</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/>
<available_date/>
<condition/>
<show_price/>
<indexed/>
<visibility/>
<advanced_stock_management/>
<date_add/>
<date_upd/>
<meta_description><language id="1"/><language id="2"/></meta_description>
<meta_keywords><language id="1"/><language id="2"/></meta_keywords>
<meta_title><language id="1"/><language id="2"/></meta_title>
<link_rewrite>hello</link_rewrite>
<name>test name</name>
<description>test description</description>
<available_now><language id="1"/><language id="2"/></available_now>
<available_later><language id="1"/><language id="2"/></available_later>
<associations></associations>
</product>
</prestashop>
please i'm waiting for any help
I got the solution. Go to classes >> controller >> AdminController.php
See the function copyFromPost
Find,
Replace with,
The
link_rewrite
element is also language dependent. Try replacing:with: