function messageStack()
 {
     global $messageToStack;
     $this->errors = array();
     if (smn_session_is_registered('messageToStack')) {
         for ($i = 0, $n = sizeof($messageToStack); $i < $n; $i++) {
             $this->add($messageToStack[$i]['text'], $messageToStack[$i]['type']);
         }
         smn_session_unregister('messageToStack');
     }
 }
 function reset($reset_database = false)
 {
     global $customer_id;
     $this->contents = array();
     $this->total = 0;
     $this->weight = 0;
     $this->content_type = false;
     if (smn_session_is_registered('customer_id') && $reset_database == true) {
         smn_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int) $customer_id . "'");
         smn_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int) $customer_id . "'");
     }
     unset($this->cartID);
     if (smn_session_is_registered('cartID')) {
         smn_session_unregister('cartID');
     }
 }
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n";
for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
}
if ($order->content_type != 'virtual') {
    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . smn_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
}
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . smn_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
if (is_object(${$payment})) {
    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
    $payment_class = ${$payment};
    $email_order .= $order->info['payment_method'] . "\n\n";
    if ($payment_class->email_footer) {
        $email_order .= $payment_class->email_footer . "\n\n";
    }
}
smn_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, $store->get_store_owner(), $store->get_store_owner_email_address());
// load the after_process function from the payment modules
$payment_modules->after_process();
// unregister session variables used during checkout
smn_session_unregister('sendto');
smn_session_unregister('billto');
smn_session_unregister('shipping');
smn_session_unregister('shipping_store');
smn_session_unregister('payment');
smn_session_unregister('comments');
if (smn_session_is_registered('credit_covers')) {
    smn_session_unregister('credit_covers');
}
$order_total_modules->clear_posts();
smn_redirect(smn_href_link(FILENAME_CHECKOUT_SUCCESS, 'orders_id=' . $insert_id, 'NONSSL'));
Example #4
0
 function apply_credit()
 {
     global $insert_id, $customer_id, $REMOTE_ADDR, $cc_id;
     if ($this->deduction != 0) {
         smn_db_query("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, redeem_date, redeem_ip, customer_id, order_id) values ('" . $cc_id . "', now(), '" . $REMOTE_ADDR . "', '" . $customer_id . "', '" . $insert_id . "')");
     }
     smn_session_unregister('cc_id');
 }
Example #5
0
<?php

/*
  Copyright (c) 2002 - 2005 SystemsManager.Net

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
require 'includes/application_top.php';
//smn_session_destroy();
smn_session_unregister('store_id');
smn_session_unregister('switch_store_id');
smn_session_unregister('login_id');
smn_session_unregister('login_firstname');
smn_session_unregister('login_groups_id');
$ignoreHeader = true;
$ignoreColumn = true;
$ignoreFooter = true;
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
    }
    $filename = basename($PHP_SELF);
    if ($filename != FILENAME_DEFAULT && $filename != FILENAME_FORBIDEN && $filename != FILENAME_LOGOFF && $filename != FILENAME_ADMIN_ACCOUNT && $filename != FILENAME_POPUP_IMAGE && $filename != 'packingslip.php' && $filename != 'invoice.php') {
        $db_file_query = smn_db_query("select admin_files_name, admin_groups_id from " . TABLE_ADMIN_FILES . " where FIND_IN_SET( '" . $login_groups_id . "', admin_groups_id) and admin_files_name = '" . $filename . "'");
        if (!smn_db_num_rows($db_file_query)) {
            //smn_redirect(smn_href_link(FILENAME_FORBIDEN));
        } else {
            $db_file = smn_db_fetch_array($db_file_query);
        }
    }
}
// Check login and file access
if (basename($PHP_SELF) != FILENAME_LOGOFF && basename($PHP_SELF) != FILENAME_LOGIN && basename($PHP_SELF) != FILENAME_PASSWORD_FORGOTTEN) {
    if (!smn_session_is_registered('login_id')) {
        smn_session_unregister('store_id');
        smn_session_unregister('login_id');
        if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
            echo '{
                success: false,
                errorType: "login",
                errorMsg: "Your Login Session Has Expired, Use The Fields Below To Login."
            }';
            exit;
        }
        smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
    }
}
define('AFFILIATE_NOTIFY_AFTER_BILLING', 'true');
// Nofify affiliate if he got a new invoice
define('AFFILIATE_DELETE_ORDERS', 'false');
// Delete affiliate_sales if an order is deleted (Warning: Only not yet billed sales are deleted)
Example #7
0
 function before_process()
 {
     global $cart, $customer_id, $invoice, $order;
     if (ALLOW_STORE_PAYMENT == 'true') {
         $invoice_query = smn_db_query("select o.store_id from " . TABLE_ORDERS . " o where o.orders_id='" . $invoice . "'");
         while ($invoice = smn_db_fetch_array($invoice_query)) {
             $store_id = $invoice[store_id];
             for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
                 // PRODUCT LOOP STARTS HERE
                 unset($cart->contents[smn_get_prid($order->products[$i]['id'])]);
                 smn_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int) $customer_id . "' and products_id = '" . smn_get_prid($order->products[$i]['id']) . "' and store_id='" . $store_id . "'");
                 smn_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int) $customer_id . "' and products_id = '" . smn_get_prid($order->products[$i]['id']) . "' and store_id='" . $store_id . "'");
             }
         }
     } else {
         $cart->reset(true);
     }
     // unregister session variables used during checkout
     smn_session_unregister('sendto');
     smn_session_unregister('billto');
     smn_session_unregister('shipping');
     smn_session_unregister('payment');
     smn_session_unregister('comments');
     smn_session_unregister('cart_PayPal_IPN_ID');
     smn_redirect(smn_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'NONSSL'));
 }
                    $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
                    $quote[0]['methods'][0]['cost'] = '0';
                } else {
                    $quote = $shipping_modules->quote($method, $module);
                }
                if (isset($quote['error'])) {
                    smn_session_unregister('shipping');
                } else {
                    if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost'])) {
                        $shipping = array('id' => $shipping, 'title' => $free_shipping == true ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')', 'cost' => $quote[0]['methods'][0]['cost']);
                        /*Added the store id in the link FILENAME_CHECKOUT_PAYMENT by Cimi on June 12,2007*/
                        smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, 'ID=' . $_REQUEST['ID'], 'NONSSL'));
                    }
                }
            } else {
                smn_session_unregister('shipping');
            }
        }
    } else {
        $shipping = false;
        /*Added the store id in the link FILENAME_CHECKOUT_PAYMENT by Cimi on June 12,2007*/
        smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, 'ID=' . $_REQUEST['ID'], 'NONSSL'));
    }
}
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!smn_session_is_registered('shipping') || smn_session_is_registered('shipping') && $shipping == false && smn_count_shipping_modules() > 1) {
                    $reset_payment = true;
                }
            }
        } else {
            smn_session_register('billto');
        }
        $billto = $_POST['address'];
        $check_address_query = smn_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "' and address_book_id = '" . $billto . "'");
        $check_address = smn_db_fetch_array($check_address_query);
        if ($check_address['total'] == '1') {
            if ($reset_payment == true) {
                smn_session_unregister('payment');
            }
            smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
        } else {
            smn_session_unregister('billto');
        }
        // no addresses to select from - customer decided to keep the current assigned address
    } else {
        if (!smn_session_is_registered('billto')) {
            smn_session_register('billto');
        }
        $billto = $customer_default_address_id;
        smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
    }
}
// if no billing destination address was selected, use their own address as default
if (!smn_session_is_registered('billto')) {
    $billto = $customer_default_address_id;
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
Example #10
0
    // check if coupon exist
    if (smn_db_num_rows($gv_query) > 0) {
        $coupon = smn_db_fetch_array($gv_query);
        // check if coupon_id exist and coupon not redeemed
        if ($coupon['coupon_id'] > 0 && $coupon['redeemed'] == 'false') {
            smn_session_unregister('floating_gv_code');
            $gv_query = smn_db_query("insert into  " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $customer_id . "', now(),'" . $REMOTE_ADDR . "')");
            $gv_update = smn_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $coupon['coupon_id'] . "'");
            smn_gv_account_update($customer_id, $coupon['coupon_id']);
        }
    }
}
//**********
/*******************************************************
****  create_account.php  ***********************************
*******************************************************/
if (smn_session_is_registered('floating_gv_code')) {
    $gv_query = smn_db_query("SELECT c.coupon_id, c.coupon_amount, IF(rt.coupon_id>0, 'true', 'false') AS redeemed FROM " . TABLE_COUPONS . " c LEFT JOIN " . TABLE_COUPON_REDEEM_TRACK . " rt USING(coupon_id), " . TABLE_COUPON_EMAIL_TRACK . " et WHERE c.coupon_code = '" . $floating_gv_code . "' AND c.coupon_id = et.coupon_id");
    // check if coupon exist
    if (smn_db_num_rows($gv_query) > 0) {
        $coupon = smn_db_fetch_array($gv_query);
        // check if coupon_id exist and coupon not redeemed
        if ($coupon['coupon_id'] > 0 && $coupon['redeemed'] == 'false') {
            smn_session_unregister('floating_gv_code');
            $gv_query = smn_db_query("insert into  " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $customer_id . "', now(),'" . $REMOTE_ADDR . "')");
            $gv_update = smn_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $coupon['coupon_id'] . "'");
            smn_gv_account_update($customer_id, $coupon['coupon_id']);
        }
    }
}
$breadcrumb->add(NAVBAR_TITLE);
Example #11
0
 function clear_posts()
 {
     global $_POST, $_VARS;
     if (MODULE_ORDER_TOTAL_INSTALLED) {
         $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);
         reset($this->modules);
         while (list(, $value) = each($this->modules)) {
             $class = substr($value, 0, strrpos($value, '.'));
             if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
                 $post_var = 'c' . $GLOBALS[$class]->code;
                 if (smn_session_is_registered($post_var)) {
                     smn_session_unregister($post_var);
                 }
             }
         }
     }
 }
</td>
                    </tr>
                    <tr>
                      <td class="dataTableContent"><nobr><?php 
    echo TEXT_INFO_PASSWORD_CONFIRM;
    ?>
&nbsp;&nbsp;&nbsp;</nobr></td>
                      <td class="dataTableContent"><?php 
    echo smn_draw_password_field('admin_password_confirm');
    ?>
</td>
                    </tr>
<?php 
} else {
    if (smn_session_is_registered('confirm_account')) {
        smn_session_unregister('confirm_account');
    }
    ?>
                        
                    <tr>
                      <td class="dataTableContent"><nobr><?php 
    echo TEXT_INFO_FULLNAME;
    ?>
&nbsp;&nbsp;&nbsp;</nobr></td>
                      <td class="dataTableContent"><?php 
    echo $myAccount['admin_firstname'] . ' ' . $myAccount['admin_lastname'];
    ?>
</td>
                    </tr>
                    <tr>
                      <td class="dataTableContent"><nobr><?php 
Example #13
0
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
$breadcrumb->add(NAVBAR_TITLE);
if (smn_session_is_registered('customer_store_id')) {
    smn_session_unregister('customer_store_id');
}
smn_session_unregister('customer_id');
smn_session_unregister('customer_default_address_id');
smn_session_unregister('customer_first_name');
smn_session_unregister('customer_country_id');
smn_session_unregister('customer_zone_id');
smn_session_unregister('affiliate_ref');
smn_session_unregister('affiliate_clickthroughs_id');
smn_session_unregister('affiliate_id');
smn_session_unregister('affiliate_email');
smn_session_unregister('affiliate_name');
smn_session_unregister('comments');
smn_session_unregister('gv_id');
smn_session_unregister('cc_id');
$cart->reset();
smn_redirect(smn_href_link(FILENAME_DEFAULT, 'ID=' . $store_id, 'NONSSL'));
</td>
      </tr>
      <tr>
        <td><?php 
    echo $messageStack->output('create_store_account_success');
    ?>
</td>
      </tr>
      <tr>
        <td><?php 
    echo smn_draw_separator('pixel_trans.gif', '100%', '10');
    ?>
</td>
      </tr>
<?php 
    smn_session_unregister('error_text');
}
// systemsmanager end
?>
      <tr>
      <td valign="top" class="main"><div align="center" class="pageHeading"><?php 
echo SUCCESS_HEADING_TITLE;
?>
</td>
      </tr>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
Example #15
0
}
if (isset($_GET['action']) && $_GET['action'] == 'process') {
    $email_address = smn_db_prepare_input($_POST['email_address']);
    $password = smn_db_prepare_input($_POST['password']);
    // Check if email exists
    $check_admin_query = smn_db_query("select store_id, admin_id as login_id, admin_groups_id as login_groups_id, admin_firstname as login_firstname, admin_email_address as login_email_address, admin_password as login_password, admin_modified as login_modified, admin_logdate as login_logdate, admin_lognum as login_lognum from " . TABLE_ADMIN . " where admin_email_address = '" . smn_db_input($email_address) . "'");
    if (!smn_db_num_rows($check_admin_query)) {
        $login = '******';
    } else {
        $check_admin = smn_db_fetch_array($check_admin_query);
        // Check that password is good
        if (!smn_validate_password($password, $check_admin['login_password'])) {
            $login = '******';
        } else {
            if (smn_session_is_registered('password_forgotten')) {
                smn_session_unregister('password_forgotten');
            }
            $login_id = $check_admin['login_id'];
            $store_id = $check_admin['store_id'];
            $login_groups_id = $check_admin['login_groups_id'];
            $login_firstname = $check_admin['login_firstname'];
            $login_email_address = $check_admin['login_email_address'];
            $login_logdate = $check_admin['login_logdate'];
            $login_lognum = $check_admin['login_lognum'];
            $login_modified = $check_admin['login_modified'];
            smn_session_register('login_id');
            smn_session_register('store_id');
            smn_session_register('login_groups_id');
            smn_session_register('login_first_name');
            //$date_now = date('Ymd');
            smn_db_query("update " . TABLE_ADMIN . " set admin_logdate = now(), admin_lognum = admin_lognum+1 where admin_id = '" . $login_id . "'");
}
require DIR_WS_CLASSES . 'shipping.php';
$shipping_modules = new shipping($shipping);
// if no billing destination address was selected, use the customers own address as default
if (!smn_session_is_registered('billto')) {
    smn_session_register('billto');
    $billto = $customer_default_address_id;
} else {
    // verify the selected billing address
    if (is_array($billto) && empty($billto) || is_numeric($billto)) {
        $check_address_query = smn_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $billto . "'");
        $check_address = smn_db_fetch_array($check_address_query);
        if ($check_address['total'] != '1') {
            $billto = $customer_default_address_id;
            if (smn_session_is_registered('payment')) {
                smn_session_unregister('payment');
            }
        }
    }
}
require DIR_WS_CLASSES . 'order.php';
$order = new order();
require DIR_WS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$order_total_modules->clear_posts();
if (!smn_session_is_registered('comments')) {
    smn_session_register('comments');
}
if (isset($HTTP_POST_VARS['comments']) && smn_not_null($HTTP_POST_VARS['comments'])) {
    $comments = smn_db_prepare_input($HTTP_POST_VARS['comments']);
}
Example #17
0
<?php

/*
  Copyright (c) 2002 - 2006 SystemsManager.Net

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
$switch_store = 'TRUE';
smn_session_unregister('switch_store_id');
smn_session_register('switch_store_id');
$switch_store_id = intval($_GET['newID']);
if ($store_id == 1) {
    smn_redirect(smn_href_link(FILENAME_GOTO_STORE, 'newID=' . $switch_store_id));
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_THANK_YOU));
                                foreach ($quotes_store[$k1][$store_list[$k]]['methods'] as $key1 => $value1) {
                                    if (array_search($quote[0]['methods'][0]['id'], $value1)) {
                                        $k2 = $key1;
                                    }
                                }
                                $shipping_cost_store = $quotes_store[$k1][$store_list[$k]]['methods'][$k2]['cost'];
                                $shipping_store[$store_list[$k]] = array('id' => $_POST['shipping'], 'title' => $free_shipping == true ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')', 'cost' => $shipping_cost_store);
                            }
                        }
                        smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
                    }
                }
            } else {
                smn_session_unregister('shipping');
                /*Unregister the session shipping_store,By Cimi*/
                smn_session_unregister('shipping_store');
            }
        }
    } else {
        $shipping = false;
        smn_redirect(smn_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
    }
}
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!smn_session_is_registered('shipping') || smn_session_is_registered('shipping') && $shipping == false && smn_count_shipping_modules() > 1) {
    $shipping = $shipping_modules->cheapest();
                    $reset_shipping = true;
                }
            }
        } else {
            smn_session_register('sendto');
        }
        $sendto = $_POST['address'];
        $check_address_query = smn_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $sendto . "'");
        $check_address = smn_db_fetch_array($check_address_query);
        if ($check_address['total'] == '1') {
            if ($reset_shipping == true) {
                smn_session_unregister('shipping');
            }
            smn_redirect(smn_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
        } else {
            smn_session_unregister('sendto');
        }
    } else {
        if (!smn_session_is_registered('sendto')) {
            smn_session_register('sendto');
        }
        $sendto = $customer_default_address_id;
        smn_redirect(smn_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
    }
}
// if no shipping destination address was selected, use their own address as default
if (!smn_session_is_registered('sendto')) {
    $sendto = $customer_default_address_id;
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'NONSSL'));
    for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
        $boxContent .= '<tr><td align="right" valign="top" class="infoBoxContents">';
        if (smn_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
            $boxContent .= '<span class="newItemInCart">';
        } else {
            $boxContent .= '<span class="infoBoxContents">';
        }
        $boxContent .= $products[$i]['quantity'] . '&nbsp;x&nbsp;</span></td><td valign="top" class="infoBoxContents"><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $products[$i]['store_id'] . '&products_id=' . $products[$i]['id']) . '">';
        if (smn_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
            $boxContent .= '<span class="newItemInCart">';
        } else {
            $boxContent .= '<span class="infoBoxContents">';
        }
        $boxContent .= $products[$i]['name'] . '</span></a></td></tr>';
        if (smn_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
            smn_session_unregister('new_products_id_in_cart');
        }
    }
    $boxContent .= '</table>';
} else {
    $boxContent .= BOX_SHOPPING_CART_EMPTY;
}
if ($cart->count_contents() > 0) {
    $boxContent .= smn_draw_separator();
    $boxContent .= '<div align="right">' . $currencies->format($cart->show_total()) . '</div>';
    $boxContent .= '<div align="left"><a href="' . smn_href_link(FILENAME_CHECKOUT_SELECT, 'ID=' . $store_id) . '">' . smn_image(TEMPLATE_IMAGES . 'table_background_cart.gif', HEADER_TITLE_CHECKOUT) . '</a></div>';
}
if (smn_session_is_registered('customer_id')) {
    $gv_query = smn_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
    $gv_result = smn_db_fetch_array($gv_query);
    if ($gv_result['amount'] > 0) {