You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Orders containing only products priced at 0.00 are not syncing to Dotdigital due to a filtering issue in the Magento-Dotdigital connector. This issue affects over 26,000 orders in our system and disrupts order reporting and automation workflows.
Steps to Reproduce
Create an order in Magento containing only products with a price of 0.00.
Observe the payload sent to Dotdigital.
The order_total field is missing from the payload.
The order is not properly synced to Dotdigital.
Root Cause Analysis
The issue originates from the array_filter() function used in Dotdigitalgroup/Email/Model/Connector/Order.php, specifically in the expose() method.
PHP’s array_filter() function removes values considered "empty", which includes 0.00, leading to unintended data loss.
This results in valid zero-total orders not being recognized or processed by Dotdigital.
Current Implementation:
returnarray_filter($properties);
Impact
Orders with 0.00 total are valid business cases and should be properly synced.
Lack of proper syncing distorts order data in Dotdigital, impacting reporting and automation.
Affects compliance, analytics, and customer engagement workflows.
Proposed Fix
Modify the array_filter() call to only remove null values, ensuring 0.00 remains in the payload:
returnarray_filter($properties, function ($value) {
return !is_null($value);
});
@julianchristmas Hey - do you fancy creating a PR? Just fork this repo, and PR from your fork into the dotmailer:develop branch. If you can confirm what PHP version you are running that would be handy.
Issue Summary
Orders containing only products priced at 0.00 are not syncing to Dotdigital due to a filtering issue in the Magento-Dotdigital connector. This issue affects over 26,000 orders in our system and disrupts order reporting and automation workflows.
Steps to Reproduce
order_total
field is missing from the payload.Root Cause Analysis
array_filter()
function used inDotdigitalgroup/Email/Model/Connector/Order.php
, specifically in theexpose()
method.array_filter()
function removes values considered "empty", which includes0.00
, leading to unintended data loss.Current Implementation:
Impact
Proposed Fix
Modify the array_filter() call to only remove null values, ensuring 0.00 remains in the payload:
Version information
Magento Version: 1.9
Dotdigital Extension Version: 6.2.29
The text was updated successfully, but these errors were encountered: