aquilaziale Posted June 12, 2012 Share Posted June 12, 2012 Hello, Is it possible to have the customer email in order-confirmation.php ? I need it for an affiliate tracking. I used the module "affiliatetracking_0.2", that give me the orderId, the total paid, . . . but not the customer email. So, I checked the module and I saw these line : public function hookOrderConfirmation($params) { global $smarty; $order = $params['objOrder']; $currency = $params['currencyObj']; $smarty->assign(array( 'orderId' => $order->id, 'total' => $order->total_paid - $order->total_shipping, 'totalPaid' => $order->total_paid, 'totalProducts' => $order->total_products, 'totalCommision' => $order->total_products * 10 / 100, 'currency' => $currency->iso_code )); And I tried to add this one : 'email' => $customer->email but it doesn't work. Could you help me ? Thank you very much. Link to comment Share on other sites More sharing options...
bellini13 Posted June 13, 2012 Share Posted June 13, 2012 (edited) try adding this line as well $customer = new Customer($order->id_customer); so it should look like... public function hookOrderConfirmation($params) { global $smarty; $order = $params['objOrder']; $customer = new Customer($order->id_customer); $currency = $params['currencyObj']; $smarty->assign(array( 'orderId' => $order->id, 'total' => $order->total_paid - $order->total_shipping, 'totalPaid' => $order->total_paid, 'totalProducts' => $order->total_products, 'totalCommision' => $order->total_products * 10 / 100, 'currency' => $currency->iso_code, 'email' => $customer->email )); then you need to also edit the themes template file to show the email address Edited June 13, 2012 by bellini13 (see edit history) Link to comment Share on other sites More sharing options...
aquilaziale Posted June 14, 2012 Author Share Posted June 14, 2012 Hello, thank you very much. It works . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now