Prestashop: Customer service and webservice interction

Created on 15 May 2019  路  7Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
When I create a customer_message in a customer_thread from the webservice, it does not send a mail to the customer.

To Reproduce
Steps to reproduce the behavior:

  1. Create a customer_thread (sending a message with a client account)
  2. Answer to that thread using the webservice
  3. Check the email

Additionnal information
PrestaShop version: 1.7.5.1
PHP version: 5.6

1.7.5.1 1.7.5.2 1.7.6.0 Bug Customer service Email Minor To Do WS

All 7 comments

Hi @Don-Leopardo,

Could you please provide me the exact script did you use to Create a customer_thread throw WS to check it.
Thanks!

Hi @khouloudbelguith
Sorry, I did not create a customer_thread with WS. I just create a customer_message. The customer_thread was created by the client sending a message, i just answered it via a post to customer_messages.

@Don-Leopardo, thanks for your feedback.
To answer the customer, did you used any script?
What is the exact xml sent?
Thanks!

@khouloudbelguith this is the xml that i'm sending:
Captura de pantalla 2019-05-15 a la(s) 13 28 08
The "closed" tags are empty.

Hi @Don-Leopardo,

Thanks for your feedback.
I manage to reproduce the issue with PS1.7.5.2 & PS1.7.6.0beta1
I used this script

<?php
/**
 * Created by PhpStorm.
 * User: khouloud.belguith
 * Date: 16/05/19
 * Time: 10:15
 */

ini_set('display_errors','on');
// Here we define constants /!\ You need to replace this parameters
define('DEBUG', true); // Debug mode
//                      !! BACHA, nezapomenout p艡enastavit i DTB u obr谩zk暖 dole !!!
define('PS_SHOP_PATH', 'shop.com'); // Root path of your PrestaShop store
define('PS_WS_AUTH_KEY', 'Key'); // Auth key (Get it in your Back Office)
require_once('./PSWebServiceLibrary.php');

$psXML = <<<XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
 <customer_message>
   <id />
   <id_employee>1</id_employee>
   <id_customer_thread>1</id_customer_thread>
   <ip_address>2130706433</ip_address>
   <email>[email protected]</email>
   <message>message
   </message>
 </customer_message>
</prestashop>
XML;
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$xml = new SimpleXMLElement($psXML);
var_dump($xml->asXML());
$opt = array( 'resource' => 'customer_messages' );
$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!

I'd like to fix it but I don't know anything about php, so I'll wait for you guys to solve it. I'm doing an integration with an open source ERP using python.
Thank you for the attention and I'll be waithing.

+

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vincent-dp picture vincent-dp  路  3Comments

matks picture matks  路  3Comments

khouloudbelguith picture khouloudbelguith  路  3Comments

sandra2n picture sandra2n  路  3Comments

zuk3975 picture zuk3975  路  3Comments