Page 1 of 1

incorrect mail message in admin marketing mail OC3x

Posted: Sun Oct 29, 2017 11:39 pm
by raptorheli
incorrect mail message in admin marketing mail
Got this message when sending mail to customers from admin area admin/marketing/mail

Your message has been successfully sent to 0 of 0 recipients! should be 1 of 1 recipients when 1 customer is added to the list
Is this a bug in OC3?


Raptorheli

Re: incorrect mail message in admin marketing mail OC3x

Posted: Mon Oct 30, 2017 12:02 am
by straightlight
A bit odd, indeed. In admin/controller/marketing/contact.php file,

find:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), $start, $email_total);
replace with:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), $start, sizeof($emails));
As for the $start variable, see if the following fix resolves the issue for the paging class: https://github.com/opencart/opencart/pull/5232 by replacing the file from your system/library/pagination.php file . Then, send another marketing email contact message to see if that rectifies the issue.

Re: incorrect mail message in admin marketing mail OC3x

Posted: Mon Oct 30, 2017 2:46 am
by raptorheli
did the corrections as straightlight described , now everything is working fine
straightlight you are the expert :-)

Message is now correct (copy screen shot from admin)
Your message has been successfully sent to 0 of 1 recipients!

Thanks

Raptorheli

Re: incorrect mail message in admin marketing mail OC3x

Posted: Mon Oct 30, 2017 3:36 am
by straightlight
Then, the official fix should be this one:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), sizeof($emails), sizeof($emails));

Re: incorrect mail message in admin marketing mail OC3x

Posted: Sat Mar 14, 2020 6:58 pm
by gerstavros
why isn't this already fixed in latest version?

Re: incorrect mail message in admin marketing mail OC3x

Posted: Sat Mar 14, 2020 7:24 pm
by straightlight
gerstavros wrote:
Sat Mar 14, 2020 6:58 pm
why isn't this already fixed in latest version?
If this issue is still on-going on the master branch from Opencart Github, you could report it in their issues tab.

Re: incorrect mail message in admin marketing mail OC3x

Posted: Sun Sep 20, 2020 7:28 pm
by straightlight
Fixed on the master since recently.

Re: incorrect mail message in admin marketing mail OC3x

Posted: Sun Feb 07, 2021 2:26 am
by vladimir.efimenko
straightlight wrote:
Mon Oct 30, 2017 3:36 am
Then, the official fix should be this one:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), sizeof($emails), sizeof($emails));
Sorry, but should not it be like this instead:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), sizeof($emails),$email_total);

Re: incorrect mail message in admin marketing mail OC3x

Posted: Sun Feb 07, 2021 11:34 am
by straightlight
vladimir.efimenko wrote:
Sun Feb 07, 2021 2:26 am
straightlight wrote:
Mon Oct 30, 2017 3:36 am
Then, the official fix should be this one:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), sizeof($emails), sizeof($emails));
Sorry, but should not it be like this instead:

Code: Select all

$json['success'] = sprintf($this->language->get('text_sent'), sizeof($emails),$email_total);
No. This issue has already been fixed on the master branch.