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

fix callbacks for user updates #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KacperMekarski
Copy link
Contributor

@KacperMekarski KacperMekarski commented Dec 2, 2021

This PR fixes updating user. Most of user data which is sent to mailchimp comes from his bill address, due to that user update request should be sent also when his bill address is updated.

This PR also reduces amount of requests to mailchimp when user is updated. User update request will be sent only when one of attributes which is sent to mailchimp is changed (see User Presenter).

Also, this PR fixes updating user email. The issue is that we create mailchimp user id based on his email (here). So when user email is changed, his uniqe id also changes and spree_mailchimp_ecommerce is unable to find the existing user in mailchimp. I created a solution for that in app/jobs/spree_mailchimp_ecommerce/update_user_job.rb.
I could fix a way of creating mailchimp user id, but then existing mailchimp databases would have duplicated users.

@KacperMekarski KacperMekarski marked this pull request as ready for review December 3, 2021 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant