Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.1-develop] Send email to subscribers only when are new #11316

Merged
merged 4 commits into from
Nov 7, 2017

Conversation

osrecio
Copy link
Member

@osrecio osrecio commented Oct 9, 2017

Only send email/confirmation email of subscription to newsletter only when subscriber is new in newsletter

Description

Check if is necessary send email to a customer that is subscribed to newsletter. If this customer was subscribed previously not necessary send email.

Fixed Issues (if relevant)

  1. Newsletter subscription #5439: Newsletter subscription

Manual testing scenarios

  1. Subscribe an email not subscribed previously (e.g: test@test.com)
  2. this email will receive a confirmation email of subscription
  3. Subscribe the same email (test@test.com)
  4. this email NOT will recieve a confirmation email of subscription

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@okorshenko
Copy link
Contributor

See comments in #11317

@osrecio
Copy link
Member Author

osrecio commented Oct 20, 2017

All tests passed :)

@osrecio osrecio changed the title [Fix:5439] Send email to subscribers only when are new 2.1 [Backport 2.1-develop] Send email to subscribers only when are new Oct 20, 2017
@okorshenko okorshenko added 2.2.x bug report Component: Customer Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Oct 25, 2017
@okorshenko
Copy link
Contributor

okorshenko commented Oct 26, 2017

Hi @osrecio
We got a response from QA department:

Bug is not fixed. When customer is Login and subscribed to the newsletter from Account Dashboard page, message is present: "Thank you for your subscription", but letter is not send for mail (from all pages). When customer is logged in and subscribed to the newslette from Home Page, page is reload but no any message show. When customer is Sign Out and subscribes to the newsletter from Home Page, page is reload but no any message show. When customer is Sign Out and subscribes to the newsletter from Create New Customer Account page, message with error is present "There was a problem with the subscription: This email address is already assigned to another user."

Could you please double check the fix

@osrecio
Copy link
Member Author

osrecio commented Oct 27, 2017

I will check it with comments of your QA team

@osrecio
Copy link
Member Author

osrecio commented Oct 27, 2017

Hi @okorshenko ,

The PR is based to one customer suscribed to newsletter not recieve tons of email of confirm_email_template.

Answering to QA team:

When customer is Login and subscribed to the newsletter from Account Dashboard page, message is present: "Thank you for your subscription", but letter is not send for mail (from all pages)

Yes this funcionality is correct because the customer is previously subscrided and email was sent (the first time).

When customer is logged in and subscribed to the newslette from Home Page, page is reload but no any message show

The file that manage the message is NewAction.php it these lines in that case function suscribe return STATUS_SUBSCRIBED and enter in else then the message would have to show (I tested and message was: There was a problem with the subscription: This email address is already subscribed.).

When customer is Sign Out and subscribes to the newsletter from Home Page, page is reload but no any message show

I tested In fresh 2.1 and in this case the error message shown is : There was a problem with the subscription: This email address is already subscribed.

When customer is Sign Out and subscribes to the newsletter from Create New Customer Account page, message with error is present "There was a problem with the subscription: This email address is already assigned to another user."

Yes that casuistry is correct no? (is the same as the previous case), The email oscar@gmail.com is subscribed and the function: validateEmailAvailable check that email was not available. But in this PR I don't touch the funcionality of controller

I hope that I explained each case correctly and clear. Maybe I missed something.

@okorshenko okorshenko modified the milestones: October 2017, November 2017 Nov 1, 2017
@magento-team magento-team merged commit 30d5f42 into magento:2.1-develop Nov 7, 2017
magento-team pushed a commit that referenced this pull request Nov 7, 2017
[EngCom] Public Pull Requests - 2.1-develop
 - MAGETWO-83320: #7903 correct the position of the datepicker when you scroll #12045
 - MAGETWO-83319: [backport 2.1] Magento 2 Store Code validation regex: doesn't support uppercase letters in store code #12040
 - MAGETWO-82948: fix #8846 [Backport 2.1-develop]: avoid duplicated attribute option values #11786
 - MAGETWO-81328: [Fix:5439] Send email to subscribers only when are new 2.1 #11316
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants