Skip to content

Commit

Permalink
Update OrderConfDataRetriever.php
Browse files Browse the repository at this point in the history
Added aditional data source for customer data on purchase event
  • Loading branch information
JohanWebsmid authored Aug 23, 2024
1 parent f33906b commit 8afad77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tracking/DataRetrievers/OrderConfDataRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function getBaseData()
$idLang = $context->language->id;

$totalTax = (float)$baseOrder->total_paid_tax_incl - (float)$baseOrder->total_paid_tax_excl;
$orderCustomer = $context->smarty->tpl_vars['order_customer']->value;
$orderCustomer = ( empty($context->smarty->tpl_vars['order_customer']) ) ? $context->smarty->tpl_vars['customer']->value : $context->smarty->tpl_vars['order_customer']->value;

$hashedEmail = hash('sha256', strtolower(trim($orderCustomer['email'])));
$hashedPhone = hash('sha256', strtolower(trim($baseAddress->phone)));
Expand Down Expand Up @@ -88,4 +88,4 @@ public function getBaseData()

return $rawData;
}
}
}

0 comments on commit 8afad77

Please sign in to comment.