From 25bfb481074bf6a7e545e88a655a41ce99bf3744 Mon Sep 17 00:00:00 2001 From: mattab Date: Wed, 26 Mar 2014 23:12:45 +1300 Subject: Refs #4909 Only update the visitEcommerceStatus flag if it's different from current value. --- core/Tracker/Visit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index ca35af28ed..470ec3eb4c 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -944,7 +944,9 @@ class Visit implements VisitInterface // Ecommerce buyer status $visitEcommerceStatus = $this->goalManager->getBuyerType($this->visitorInfo['visit_goal_buyer']); - if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE) { + if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE + // only update if the value has changed (prevents overwriting the value in case a request has updated it in the meantime) + && $visitEcommerceStatus != $this->visitorInfo['visit_goal_buyer']) { $valuesToUpdate['visit_goal_buyer'] = $visitEcommerceStatus; } -- cgit v1.2.3