diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-03-26 14:12:45 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-03-26 14:12:45 +0400 |
commit | 25bfb481074bf6a7e545e88a655a41ce99bf3744 (patch) | |
tree | ef89f73beda4c1a6aaeda1f88365e86ec686257f | |
parent | 12d78a18b41e47f6ae4a72519ff7375cebb7dd35 (diff) |
Refs #4909 Only update the visitEcommerceStatus flag if it's different from current value.
-rw-r--r-- | core/Tracker/Visit.php | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |