Skip to content

Commit

Permalink
Refs #4909 Only update the visitEcommerceStatus flag if it's not NONE.
Browse files Browse the repository at this point in the history
This will prevent some occurrences of this bug, but not the case where visitEcommerceStatus == abandonedCart
  • Loading branch information
mattab committed Mar 26, 2014
1 parent 1c70bff commit 5809c35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/Tracker/Visit.php
Expand Up @@ -942,7 +942,11 @@ protected function getExistingVisitFieldsToUpdate($action, $visitIsConverted)
}

// Ecommerce buyer status
$valuesToUpdate['visit_goal_buyer'] = $this->goalManager->getBuyerType($this->visitorInfo['visit_goal_buyer']);
$visitEcommerceStatus = $this->goalManager->getBuyerType($this->visitorInfo['visit_goal_buyer']);

if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE) {
$valuesToUpdate['visit_goal_buyer'] = $visitEcommerceStatus;
}

// Custom Variables overwrite previous values on each page view
$valuesToUpdate = array_merge($valuesToUpdate, $this->visitorCustomVariables);
Expand Down

0 comments on commit 5809c35

Please sign in to comment.