EnJofre Posted April 13, 2023 Share Posted April 13, 2023 If hay send this XML, Prestashop returns an error. <position><![CDATA[1]]></position> <name> <language id="2"><![CDATA[Modelo]]></language> </name> <public_name> <language id="2"><![CDATA[Modelo]]></language> </public_name> <associations> <product_option_values nodeType="product_option_value" api="product_option_values"></product_option_values> </associations> </product_option> </prestashop> 14:46:57 FALLO. sResp= <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![CDATA[84]]></code> <message><![CDATA[Validation error: "Property Attribute->name is empty."]]></message> </error> </errors> </prestashop> But if i send this XML, the answer is Ok. The difference is the language but i don't know what i'm missing. <prestashop xmlns:xlink="https://www.w3.org/1999/xlink"> <product_option> <is_color_group><![CDATA[0]]></is_color_group> <group_type><![CDATA[select]]></group_type> <position><![CDATA[1]]></position> <name> <language id="1"><![CDATA[Modelo]]></language> </name> <public_name> <language id="1"><![CDATA[Modelo]]></language> </public_name> <associations> <product_option_values nodeType="product_option_value" api="product_option_values"></product_option_values> </associations> </product_option> </prestashop> Saludos Link to comment Share on other sites More sharing options...
ExpertoPrestaShop Posted April 14, 2023 Share Posted April 14, 2023 The required multi-lang fields on PS entities need to set the value at least in the default shop language. So if the default language ID is 1, that XML will work and in the other case don't because value for the name field on language 1 is missing. Link to comment Share on other sites More sharing options...
EnJofre Posted April 14, 2023 Author Share Posted April 14, 2023 Thank you!!! I'll Try. 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