Post by raptorheli » Sun Oct 29, 2017 11:39 pm

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

New member

Posts

Joined
Tue Mar 05, 2013 1:35 pm

Post by straightlight » Mon Oct 30, 2017 12:02 am

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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by raptorheli » Mon Oct 30, 2017 2:46 am

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

New member

Posts

Joined
Tue Mar 05, 2013 1:35 pm

Post by straightlight » 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));

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gerstavros » Sat Mar 14, 2020 6:58 pm

why isn't this already fixed in latest version?

New member

Posts

Joined
Mon Apr 04, 2016 12:44 am

Post by straightlight » Sat Mar 14, 2020 7:24 pm

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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sun Sep 20, 2020 7:28 pm

Fixed on the master since recently.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by vladimir.efimenko » 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);


Posts

Joined
Thu Dec 31, 2020 11:31 pm

Post by straightlight » Sun Feb 07, 2021 11:34 am

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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 95 guests