Comments (10)
thank you @yohanespradono
did you experience it with 1.0.12 ?
thanks
Guy
from 3rd-party-integrations-magento-m2.
@eghanin yes, i also upgraded to 1.0.13 but still happens. I turned off realtime sync, and processed the particular customer (using like $customerRepo->save($customer)) and everything went through. then i turned on realtime sync, and the problem is still fixed for this customer because the API response $response['data'] is empty now.
I can't find the API response log.
Maybe $response['data']['current_value'] returned 2 and the code set
$statusToBeChanged = \Magento\Newsletter\Model\Subscriber::STATUS_UNSUBSCRIBED;
to 3
That's why $emarsysOptinValue != $magentoOptinValue to return true?
if ($emarsysOptinValue == 1) {
$statusToBeChanged = \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED;
} elseif ($emarsysOptinValue == 2) {
$statusToBeChanged = \Magento\Newsletter\Model\Subscriber::STATUS_UNSUBSCRIBED;
} else {
$statusToBeChanged = \Magento\Newsletter\Model\Subscriber::STATUS_UNSUBSCRIBED;
}
from 3rd-party-integrations-magento-m2.
OK i can reproduce this issue.
I made a change for this customer subscription from emarsys dashboard,
and now the API responses:
array(3) {
["replyCode"]=>
int(0)
["replyText"]=>
string(2) "OK"
["data"]=>
array(3) {
["old_value"]=>
string(1) "1"
["current_value"]=>
string(1) "2"
["time"]=>
string(19) "2017-10-30 04:17:13"
}
}
As i have guessed, because time (2017-10-30 04:17:13) > magento $magentoOptinChangeTime (null)
returns true and current_value (2) != magento value (3) returns true,
this causes the loop
Maybe we need to refactor this part
if ((($EmarsysOptinChangeTime == $magentoOptinChangeTime && self::OPTIN_PRIORITY =='Emarsys') || ($EmarsysOptinChangeTime >= $magentoOptinChangeTime)) && $emarsysOptinValue != $magentoOptinValue) {
from 3rd-party-integrations-magento-m2.
Thanks so much, we're going to look into this as soon as we can.
SO to summarise what you're experiencing.
If there is a change in emarsys side ( e.g. customer optin value changed, and is picked up by the optin sync back ). and in Magento the time of change is NULL, then the synchronisation is getting to a loop.
Is that a correct description ?
we will keep you posted here. and eventually suggest a patch for it.
from 3rd-party-integrations-magento-m2.
@eghanin exactly! i mean, from subscribe (value 1) to unsubscribe (value 2, from emarsys side) while subscribe status on magento is 3
from 3rd-party-integrations-magento-m2.
hello @yohanespradono, did you save mapping for customer? I've tried to reproduce this, but without luck.
from 3rd-party-integrations-magento-m2.
@romastepa i didn't. But i have Unique Field set to Email.
from 3rd-party-integrations-magento-m2.
@yohanespradono can you, plz, save mapping first (in admin Emarsys->Mappings->Customers for your store Update Schema -> Recommend Mapping) and try one more time.
from 3rd-party-integrations-magento-m2.
Hi @romastepa , sorry we already set this up. I just didn't remember it.
from 3rd-party-integrations-magento-m2.
We suffer this problem too.
System: Magento 2.2.6 , Emarsys 1.0.12
In Magento 2.1.10 with Emarsys 1.0.12 we do not have this problem.
Every hour three accounts are registered in table newsletter_subscriber.
in Emarsys admin we updated schemas and saved mappings in each store. Then the issue was gone.
I registered a new account and now that account are registered every hour.
I tried to:
update newsletter_subscriber set change_status_at = "2018-05-01 01:01:01" where change_status_at is NULL;
I had 22000 items that was NULL. But that made no difference. The issue still happens for the new account.
We can not go live with Magento 2.2.6 until this issue is fixed.
Any tips what I can do?
from 3rd-party-integrations-magento-m2.
Related Issues (20)
- Extenstion not working in magento2.2.5 throwing error on di compile HOT 1
- Redirect after performing an action to default store home page HOT 1
- Not all products in product export 1.0.12
- Emarsys payloads for orders shipments invoices and rma do not contain partial items for each call
- Duplicates in emarasys, eventhough email is selected as a key. HOT 2
- Web Extend quotes in categories causing error HOT 1
- Orders : Returns qty needs to be negative HOT 1
- support for magento 2.3 for 1.0.12
- Create tag for version 1.0.13
- Extra Slash in categories
- suggested Address doesn't work on Payment step HOT 1
- Product catalog export: failes when excluding categories HOT 1
- Smart insight / sales feed. Wrong header when choosing email as identifier HOT 1
- WebRecommender error when using Ajax HOT 1
- Scheduled jobs missed when the store's default timezone is not GMT
- Email subjects containing special characters are not decoded HOT 1
- Transaction Emails not working when exception on Order Place (checkout_payment_failed_template)
- Magento transaction emails do not work even if Emarsys transaction emails switched off HOT 1
- Missing Key_id HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3rd-party-integrations-magento-m2.