$smarty = new Smarty();
$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->compile_dir = 'tools/smarty/templates_c/';
$smarty->config_dir = 'tools/smarty/configs/';
$smarty->cache_dir = 'tools/smarty/cache/';
/*
 * MAILER
 */
include_once "tools/mailer/send-email.inc.php";
$cart = new cart($db_conn, PREV, false, 1, $_SESSION['lang']['id'], $lang['prev'], DIR);
$ord = new ordini($db_conn, $_SESSION['lang']['id']);
$curr_page = "preventivo_riepilogo";
if (isset($_SESSION['prev_sended']) && $cart->get_quantity() > 0) {
    $clt = $ord->verifica_ordine($_SESSION['prev_sended']);
    if (!empty($clt)) {
        $spesa = $cart->print_cart('print');
        $nome = ucwords($clt->fields['nome']) . ' ' . ucwords($clt->fields['cognome']);
        $tel = $clt->fields['tel'];
        $mail = $clt->fields['email'];
        /*
         * INVIO MAIL ----------------------------------------------------------------------------
         */
        //Variabili Smarty
        $smarty->assign('table_prod', $spesa);
        $smarty->assign('nome', $nome);
        $smarty->assign('tel', $tel);
        $smarty->assign('email', $mail);
        $smarty->assign('nazione', $clt->fields['nazione']);
        $smarty->assign('cap', $clt->fields['cap']);
예제 #2
0
$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->compile_dir = 'tools/smarty/templates_c/';
$smarty->config_dir = 'tools/smarty/configs/';
$smarty->cache_dir = 'tools/smarty/cache/';
/*
 * MAILER
 */
include_once "tools/mailer/configSMTP.php";
require_once "tools/mailer/mailer.php";
$cart = new cart($db_conn, CART, true, 1, $_SESSION['lang']['id'], $lang['prev'], DIR);
$ord = new ordini($db_conn, $_SESSION['lang']['id']);
$curr_page = "carrello_riepilogo";
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);