Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml Prestashop添加产品错误:属性产品->;链接“”重写为空_Xml_Api_Prestashop_Prestashop 1.6 - Fatal编程技术网

Xml Prestashop添加产品错误:属性产品->;链接“”重写为空

Xml Prestashop添加产品错误:属性产品->;链接“”重写为空,xml,api,prestashop,prestashop-1.6,Xml,Api,Prestashop,Prestashop 1.6,我使用ERP执行与PrestaShop的集成,但当我同步产品时,它返回一个错误,我无法找到问题。我是否忘记了产品的某些功能,或者可能是代码中的一些问题?我使用的是1.6.1.23版,我的ERP叫做Bling。我试着和他们联系,但他们告诉我这是因为普雷斯塔索普的回归 已发送XML: <prestashop> <product> <id /> <id_manufacturer>0</id_manufacturer>

我使用ERP执行与PrestaShop的集成,但当我同步产品时,它返回一个错误,我无法找到问题。我是否忘记了产品的某些功能,或者可能是代码中的一些问题?我使用的是1.6.1.23版,我的ERP叫做Bling。我试着和他们联系,但他们告诉我这是因为普雷斯塔索普的回归

已发送XML:

<prestashop>
<product>
    <id />
    <id_manufacturer>0</id_manufacturer>
    <id_supplier>0</id_supplier>
    <id_category_default></id_category_default>
    <new />
    <cache_default_attribute>0</cache_default_attribute>
    <id_default_combination />
    <id_tax_rules_group>1</id_tax_rules_group>
    <type>simple</type>
    <id_shop_default>1</id_shop_default>
    <reference><![CDATA[20072]]></reference>
    <supplier_reference />
    <location />
    <width>0.00</width>
    <height>0.00</height>
    <depth>0.00</depth>
    <weight>0.000000</weight>
    <quantity_discount>0</quantity_discount>
    <ean13></ean13>
    <upc></upc>
    <cache_is_pack>0</cache_is_pack>
    <pack_stock_type></pack_stock_type>
    <cache_has_attachments>0</cache_has_attachments>
    <is_virtual>0</is_virtual>
    <on_sale>0</on_sale>
    <online_only>0</online_only>
    <ecotax>0.00</ecotax>
    <minimal_quantity>1</minimal_quantity>
    <price>59.90000</price>
    <wholesale_price>59.90</wholesale_price>
    <unity>PC</unity>
    <unit_price_ratio>0.00</unit_price_ratio>
    <additional_shipping_cost>0.00</additional_shipping_cost>
    <customizable>0</customizable>
    <text_fields>0</text_fields>
    <uploadable_files>0</uploadable_files>
    <active>1</active>
    <redirect_type>404</redirect_type>
    <id_product_redirected>0</id_product_redirected>
    <available_for_order>1</available_for_order>
    <available_date>0000-00-00</available_date>
    <condition>new</condition>
    <show_price>1</show_price>
    <indexed>1</indexed>
    <visibility>both</visibility>
    <state></state>
    <advanced_stock_management>0</advanced_stock_management>
    <date_add>2019-05-10 16:13:11</date_add>
    <date_upd>2019-05-10 16:13:11</date_upd>
    <meta_description>
        <language id="2"><![CDATA[]]></language>
    </meta_description>
    <meta_keywords>
        <language id="2"><![CDATA[]]></language>
    </meta_keywords>
    <meta_title>
        <language id="2"><![CDATA[]]></language>
    </meta_title>
    <link_rewrite>
        <language id="2">BLUSA_REALIST_MALH_9120072</language>
    </link_rewrite>
    <name>
        <language id="2"><![CDATA[BLUSA REALIST MALH 9120072]]></language>
    </name>
    <description>
        <language id="2"><![CDATA[]]></language>
    </description>
    <description_short>
        <language id="2"><![CDATA[]]></language>
    </description_short>
    <available_now>
        <language id="2"></language>
    </available_now>
    <available_later>
        <language id="2"></language>
    </available_later>
    <associations>
        <stock_availables>
            <stock_available>
                <id />
                <id_product_attribute />
            </stock_available>
        </stock_availables>
    </associations>
    <low_stock_alert>0</low_stock_alert>
</product>

0
0
0
1.
简单的
1.
0
0
0
0
0
0
0
0
0
0
0
1.
59.90000
59.90
个人计算机
0
0
0
0
0
1.
404
0
1.
0000-00-00
新的
1.
1.
二者都
0
2019-05-10 16:13:11
2019-05-10 16:13:11
现实主义者马吕·马吕9120072
0

返回:


验证错误:“Property Product->link\u rewrite为空”

这可以通过确保包含每个激活语言的所有翻译来解决,例如:

<link_rewrite>
    <language id="1">test-url-in-english</language>
    <language id="2">test-url-in-spanish</language>
</link_rewrite>

英语测试网址
西班牙语测试url
或者,您也可以禁用不使用的语言


我希望这有帮助

您的商店当前启用了多少种语言?你能尝试添加缺少的(ID 1?)吗。另外,您没有使用CDATA来重写链接,这是自愿的吗?起初我以为这是的复制品,但您的问题似乎有所不同。@BrunoLeveque当我检查时,我发现我有两种活动语言:id1 pt和id2 pt br。我只是将pt-br作为默认值,并通过仅获取id2 pt-br来删除pt-pt。当我再次同步时,他接受并导入了产品。谢谢你的提示!我很高兴能帮上忙!我还将此作为答案发布,以便您可以关闭此问题,希望它也能帮助其他人!