if (isset($_SESSION['cart_sended']) && $cart->get_quantity() > 0) { $clt = $ord->verifica_ordine($_SESSION['cart_sended']); if (!empty($clt)) { $spesa = $cart->print_cart('print', 'table-prod-cart'); $nome = ucwords($clt->fields['nome']) . ' ' . ucwords($clt->fields['cognome']); $tel = $clt->fields['tel']; $mail = $clt->fields['email']; /* * INVIO MAIL ---------------------------------------------------------------------------- */ //Variabili Smarty $pagamento = $lang['prev']['payments'][$clt->fields['pagamento']]; //$mp = sprintf($pagamento['info'],$cart->getTotal()); $mp = $pagamento['label']; $smarty->assign('table_prod', $spesa); $smarty->assign('totale', number_format($cart->getTotal(), 2, ',', '.')); $smarty->assign('spedizione', 0); $smarty->assign('pagamento', $mp); $smarty->assign('promozioni', $lang['prev']['promotions']); $smarty->assignByRef("dati", $clt); $smarty->assign('dir', DIR2); //MAIL A CLIENTE $msg = $smarty->fetch('mail/' . $_SESSION['lang']['label'] . '/clt-ordine.html'); //messaggio cliente $mailer = new mailer(HOST, PORT, USER, PASS, NAME); $mailer->inviaMail($clt->fields['email'], "Ordine concluso - Ceramiche Sofia", $msg); $mailer->logoutSMTP(); //MAIL A NEGOZIO $msg2 = $smarty->fetch('mail/' . $_SESSION['lang']['label'] . '/info-ordine.html'); //messaggio negozio $mailer = new mailer(HOST, PORT, USER, PASS, NAME);