Describe the bug
I have an integration with a product datas import and dropship and they have an issue with sending via Webservices the Supplier ID (already created in the store) and the webservice sent succesfully the post, but in Prestashop the Supplier are not present.
All the other informations pushed worked (Product Title, summary, description, features, size, weight, etc). Only Supplier ID are not recorded.
They send the HTTP request has follow :
`
.....
`
The answer are "Success".
Edited by Khouloud
I tried with this script
<prestashop>
<product>
<id/>
<id_manufacturer>2</id_manufacturer>
<id_supplier xlink:href="http://prestashop.local/1767/api/suppliers/1">1</id_supplier>
<supplier_reference>testing</supplier_reference>
<state>1</state>
<id_category_default>2</id_category_default>
<active>1</active>
<advanced_stock_management>1</advanced_stock_management>
<associations>
<categories>
<category><id>2</id></category>
</categories>
</associations>
<reference>boom</reference>
<name>
<language id="1">product_success_add</language></name>
<price>100</price>
<id_shop_default>1</id_shop_default>
<low_stock_alert>0</low_stock_alert>
<link_rewrite>abc</link_rewrite>
<show_price>1</show_price>
<minimal_quantity>1</minimal_quantity>
<available_for_order>1</available_for_order>
</product>
</prestashop>
In the Table ps_product => ok

The table ps_product_supplier is empty

In the BO => Catalog => Product details page, the supplier is not setected

Screenshots
You can see the table of supplier, they are configured.

Additional information
PrestaShop version: 1.7.5.1
PHP version: 7.2.23
Hi @8ternity,
Thanks for your report.
I manage to reproduce the issue with PS1.7.6.1.
I used this script.
<html><head><title>pUT DATA</title></head><body>
<?php
// Here we define constants /!\ You need to replace this parameters
define('DEBUG', true);
ini_set('display_errors','on');
define('PS_SHOP_PATH', 'http://shop.com/1761/');
define('PS_WS_AUTH_KEY', 'Key');
require_once('PSWebServiceLibrary.php');
$psXML = <<<XML
<prestashop>
<product>
<id/>
<name>
<language id ="1">"product_WS"</language></name>
<price>100</price>
<id_shop_default>1</id_shop_default>
<id_manufacturer/>
<id_supplier>1</id_supplier>
<link_rewrite>test</link_rewrite>
<state>1</state>
</product>
</prestashop>
XML;
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$xml = new SimpleXMLElement($psXML);
$opt = array( 'resource' => 'products' );
$opt['postXml'] = $xml->asXML();
$xml = $webService->add( $opt );
?>
I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
@khouloudbelguith i will wait upon resolution, i have no experience on Smarty.
@khouloudbelguith Did you know what is the ETA for a Roadmap fix? I have integration company who ask me when it's will be fixed. Thanks.
@8ternity, no sorry.
Our product Team prioritizes issues to fix.
But PrestaShop is an open-source project, so it can be solved before if someone submits a pull request to solve it.
Thanks!
Hi!
Same issue for supplier_refrence as reported here: https://github.com/PrestaShop/PrestaShop/issues/20731
Thanks!
Should be fixed with this PR: https://github.com/PrestaShop/PrestaShop/pull/20736
Thanks @Max84