Prestashop 添加产品错误:属性产品->link_rewrite 为空 [英] Prestashop add product error : Property Product->link_rewrite is empty

查看:31
本文介绍了Prestashop 添加产品错误:属性产品->link_rewrite 为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我正在尝试使用 REST api 将新产品添加到我的 prestashop 商店,但是当我发送我的 xml 请求时,我有以下响应:验证错误:属性产品->link_rewrite 为空"!!!这是我的 xml 请求:

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>

请我等待任何帮助

推荐答案

link_rewrite 元素也依赖于语言.尝试更换:

The link_rewrite element is also language dependent. Try replacing:

<link_rewrite>hello</link_rewrite>

与:

<link_rewrite>
    <language id="1">hello</language>
    <language id="2">hello</language>
</link_rewrite>

这篇关于Prestashop 添加产品错误:属性产品->link_rewrite 为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆