Jump to content

Customer message from contact form [no_sync]‏


Recommended Posts

Using PS 1.5.4.1 - whenever a customer submits a message through the contact form available at the bottom of the order history, the title in the email that the shop sends is

 

[correct name of shop] Customer message from contact form [no_sync]

 

What is causing the [no_sync] and how do I get rid of it?

Link to comment
Share on other sites

  • 3 months later...

I also have 3 Prestashop sites running version; PrestaShop™ 1.5.4.1 and all three of them give me the same subject line [no_sync] at the end of the line. This is an obvious variable that needs to be updated as the begging of the subject is always populated with the company name of each site: 

[my correct company name] Message from contact form [no_sync]

 

What is the other variable and where can it be set so that it does not look so amateur? 

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 2 weeks later...
  • 9 months later...

In my opinion [no_sync] is not a problem - it's a feedback. It only means that the selected customer service contact's messages are not saved to the database.

The real problem in my opinion is that when the contact is in fact set to save incoming messages from the contact form you still have [no_sync] in the title instead of #ct / #tc because (I believe) the email to CS contact's email is sent sooner than the database insertion actually happens.

 

That said I'd still like to have an on / off switch for this feedback.

Link to comment
Share on other sites

... actually no, it was not sent _sooner_ rather than _without testing_ :(

 

Prestashop 1.6.0.14 controllers/front/ContactController.php changing

 

if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]',
                            $var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''),
                                    $file_attachment)

 

to

 

if (!Mail::Send($this->context->language->id, 'contact', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Message from contact form').' #ct%1$s #tc%2$s', $ct->id, $ct->token) : Mail::l('Message from contact form').' [no_sync]'),
                            $var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''),
                                    $file_attachment)

 

gives the expected result: if CS contact is set to "save messages: yes" email contains ct / tc reference otherwise you'll be warned of "[no_sync]".

Having the referenco or not is a personal preference - I can argue both for and against it. So is the "[no_sync]" or the lack of it - for me the lack of ct / tc is the definition of not syncing, so I removed it from my copy of ContactController.php.

Should you find this fix correct and useful feel free to contribute it to github source.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

If you want to remove the [no_sync] and the "#ct? #tc??????" in mail subjects, go to controllers/front/ContactController.php and remove those from lines 194, 197 and 200 (including the dot "."), and controllers/admin/AdminCustomerThreadsController.php line 423.

 

This worked for me in PS V1.6.0.14 but not sure what deleting these values will do to PS?

Link to comment
Share on other sites

  • 10 months later...
  • 2 weeks later...

In PS 1.6.1.5 to remove [no_sync] just replace the line 189 \controllers\ContactController.php

if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]',

to

if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form'),

this worked for me.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

×
×
  • Create New...