Hamendra Sunthwal Posted August 20, 2020 Share Posted August 20, 2020 I am applying customer object into looping to get customer details & send email does loading customer object create issues in performance ? foreach($get_order_id as $order_parameters){ $order_parameters['id_customer']; $customer = new Customer((int)$order_parameters['id_customer']); $templateVars = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer_parameters['lastname'], '{order_name}' => $order_parameters['reference'], '{orderstatename}' => $orderStatename, ); Mail::Send ( (int) $order_parameters['id_lang'], 'order_status_changed', $orderStatename, $templateVars, $customer->email, $customer->firstname. ' ' . $customer->lastname, null, 'Scody', null, null, _PS_MODULE_DIR_.$this->module_name.'privateshop/mails/', null, (int) $this->context->shop->id, null, null ); } 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