Exemple #1
0
 public function prepareConfirmation()
 {
     global $messageStack, $template, $breadcrumb, $template_dir_select, $template_dir, $language_page_directory, $currencies, $order, $zco_notifier, $db, $current_page_base, $order_total_modules, $credit_covers;
     // error_reporting(E_ALL);
     // ini_set('display_errors', 'on');
     $_GET['main_page'] = $current_page_base = $current_page = FILENAME_CHECKOUT_CONFIRMATION;
     if ($_SESSION['cart']->count_contents() <= 0) {
         zen_redirect(zen_href_link(FILENAME_TIME_OUT));
     }
     if (!$_SESSION['customer_id']) {
         $_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
         zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
     } else {
         // validate customer
         if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
             $_SESSION['navigation']->set_snapshot();
             zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
         }
     }
     // avoid hack attempts during the checkout procedure by checking the internal cartID
     if (isset($_SESSION['cart']->cartID) && $_SESSION['cartID']) {
         if ($_SESSION['cart']->cartID != $_SESSION['cartID']) {
             zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
         }
     }
     // if no shipping method has been selected, redirect the customer to the shipping method selection page
     if (!isset($_SESSION['shipping'])) {
         zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
     }
     if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free' && $_SESSION['cart']->get_content_type() != 'virtual' && defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true' && defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER') && $_SESSION['cart']->show_total() < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
         zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
     }
     if (isset($_POST['payment'])) {
         $_SESSION['payment'] = $_POST['payment'];
     }
     $_SESSION['comments'] = $_POST['comments'];
     if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
         if (!isset($_POST['conditions']) || $_POST['conditions'] != '1') {
             $messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');
         }
     }
     // echo $messageStack->size('checkout_payment');
     // load the selected payment module
     require DIR_WS_CLASSES . 'payment.php';
     $payment_modules = new payment($_POST['payment']);
     $payment_modules->update_status();
     if (($_POST['payment'] == '' || !is_object($payment_modules->paymentClass)) && $credit_covers === FALSE) {
         $messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error');
     }
     $GLOBALS[$_POST['payment']] = $payment_modules->paymentClass;
     require DIR_WS_CLASSES . 'order.php';
     $order = new order();
     // load the selected shipping module
     require DIR_WS_CLASSES . 'shipping.php';
     $shipping_modules = new shipping($_SESSION['shipping']);
     require DIR_WS_CLASSES . 'order_total.php';
     $order_total_modules = new order_total();
     $order_total_modules->collect_posts();
     $order_total_modules->pre_confirmation_check();
     if (!isset($credit_covers)) {
         $credit_covers = FALSE;
     }
     // echo 'credit covers'.$credit_covers;
     if ($credit_covers) {
         unset($_SESSION['payment']);
         $_SESSION['payment'] = '';
     }
     // @debug echo ($credit_covers == true) ? 'TRUE' : 'FALSE';
     if (is_array($payment_modules->modules)) {
         $payment_modules->pre_confirmation_check();
     }
     if ($messageStack->size('checkout_payment') > 0) {
         zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
     }
     // Stock Check
     $flagAnyOutOfStock = false;
     $stock_check = array();
     if (STOCK_CHECK == 'true') {
         for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
             if ($stock_check[$i] = zen_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
                 $flagAnyOutOfStock = true;
             }
         }
         // Out of Stock
         if (STOCK_ALLOW_CHECKOUT != 'true' && $flagAnyOutOfStock == true) {
             zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
         }
     }
     // update customers_referral with $_SESSION['gv_id']
     if ($_SESSION['cc_id']) {
         $discount_coupon_query = "SELECT coupon_code\n                            FROM " . TABLE_COUPONS . "\n                            WHERE coupon_id = :couponID";
         $discount_coupon_query = $db->bindVars($discount_coupon_query, ':couponID', $_SESSION['cc_id'], 'integer');
         $discount_coupon = $db->Execute($discount_coupon_query);
         $customers_referral_query = "SELECT customers_referral\n                               FROM " . TABLE_CUSTOMERS . "\n                               WHERE customers_id = :customersID";
         $customers_referral_query = $db->bindVars($customers_referral_query, ':customersID', $_SESSION['customer_id'], 'integer');
         $customers_referral = $db->Execute($customers_referral_query);
         // only use discount coupon if set by coupon
         if ($customers_referral->fields['customers_referral'] == '' and CUSTOMERS_REFERRAL_STATUS == 1) {
             $sql = "UPDATE " . TABLE_CUSTOMERS . "\n            SET customers_referral = :customersReferral\n            WHERE customers_id = :customersID";
             $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
             $sql = $db->bindVars($sql, ':customersReferral', $discount_coupon->fields['coupon_code'], 'string');
             $db->Execute($sql);
         } else {
             // do not update referral was added before
         }
     }
     if (isset(${$_SESSION}['payment']->form_action_url)) {
         $form_action_url = ${$_SESSION}['payment']->form_action_url;
     } else {
         $form_action_url = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
     }
     // if shipping-edit button should be overridden, do so
     $editShippingButtonLink = zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL');
     if (method_exists(${$_SESSION}['payment'], 'alterShippingEditButton')) {
         $theLink = ${$_SESSION}['payment']->alterShippingEditButton();
         if ($theLink) {
             $editShippingButtonLink = $theLink;
         }
     }
     // deal with billing address edit button
     $flagDisablePaymentAddressChange = false;
     if (isset(${$_SESSION}['payment']->flagDisablePaymentAddressChange)) {
         $flagDisablePaymentAddressChange = ${$_SESSION}['payment']->flagDisablePaymentAddressChange;
     }
     $current_page_base = FILENAME_CHECKOUT_CONFIRMATION;
     require_once DIR_WS_LANGUAGES . $_SESSION['language'] . '.php';
     require_once DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
     require_once DIR_WS_MODULES . zen_get_module_directory('meta_tags.php');
     $breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
     $breadcrumb->add(NAVBAR_TITLE_2);
     $breadCrumbHtml = $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR);
     $body_code = DIR_FS_CATALOG . $template->get_template_dir('tpl_ajax_checkout_confirmation_default.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_ajax_checkout_confirmation_default.php';
     ob_start();
     require_once $body_code;
     $confirmationHtml = ob_get_clean();
     ob_flush();
     return array('breadCrumbHtml' => $breadCrumbHtml, 'confirmationHtml' => $confirmationHtml, 'pageTitle' => META_TAG_TITLE);
 }
    $dir->close();
}
if (sizeof($directory_array)) {
    sort($directory_array);
}
for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
    if (file_exists($extras_dir . $directory_array[$i])) {
        include $extras_dir . $directory_array[$i];
    }
}
// build show flags from product type layout settings
//  $flag_show_product_info_starting_at = zen_get_show_product_switch($_GET['products_id'], 'starting_at');
//  $flag_show_product_info_model = zen_get_show_product_switch($_GET['products_id'], 'model');
//  $flag_show_product_info_weight = zen_get_show_product_switch($_GET['products_id'], 'weight');
//  $flag_show_product_info_quantity = zen_get_show_product_switch($_GET['products_id'], 'quantity');
//  $flag_show_product_info_manufacturer = zen_get_show_product_switch($_GET['products_id'], 'manufacturer');
//  $flag_show_product_info_in_cart_qty = zen_get_show_product_switch($_GET['products_id'], 'in_cart_qty');
$flag_show_product_info_tell_a_friend = zen_get_show_product_switch($_GET['products_id'], 'tell_a_friend');
$flag_show_product_info_reviews = zen_get_show_product_switch($_GET['products_id'], 'reviews');
$flag_show_product_info_reviews_count = zen_get_show_product_switch($_GET['products_id'], 'reviews_count');
$flag_show_product_info_date_available = zen_get_show_product_switch($_GET['products_id'], 'date_available');
$flag_show_product_info_date_added = zen_get_show_product_switch($_GET['products_id'], 'date_added');
$flag_show_product_info_url = zen_get_show_product_switch($_GET['products_id'], 'url');
$flag_show_product_info_additional_images = zen_get_show_product_switch($_GET['products_id'], 'additional_images');
$flag_show_product_info_free_shipping = zen_get_show_product_switch($_GET['products_id'], 'always_free_shipping_image_switch');
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS);
$zco_notifier->notify('NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_DOCUMENT_GENERAL_INFO');
require $template->get_template_dir($tpl_page_body, DIR_WS_TEMPLATE, $current_page_base, 'templates') . $tpl_page_body;
//require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_ALSO_PURCHASED_PRODUCTS));
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_MAIN_TEMPLATE_VARS_END_DOCUMENT_GENERAL_INFO');
<?php

/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_downloads.php 6374 2007-05-25 20:24:42Z drbyte $
 */
/**
 * require the downloads module
 */
require DIR_WS_MODULES . zen_get_module_directory('downloads.php');
?>

<?php 
// download is available
if ($downloads->RecordCount() > 0) {
    ?>

<table border="0" width="100%" cellspacing="0" cellpadding="0"
	id="downloads">
	<caption>
		<h4><?php 
    echo HEADING_DOWNLOAD;
    ?>
</h4>
	</caption>
	<tr class="tableHeading">
<?php

/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_whats_new.php 2935 2006-02-01 11:12:40Z birdbrain $
 */
$zc_show_new_products = false;
include DIR_WS_MODULES . zen_get_module_directory(FILENAME_NEW_PRODUCTS);
?>

<!-- bof: whats_new -->
<?php 
if ($zc_show_new_products == true) {
    ?>
<div class="centerBoxWrapper" id="whatsNew">
<?php 
    require $template->get_template_dir('tpl_columnar_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_columnar_display.php';
    ?>
</div>
<?php 
}
?>
<!-- eof: whats_new -->
/**
 * Links Submit Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_links_submit_default.php 3.4.0 3/27/2008 Clyde Jones $
 */
?>
<div class="minframe fl">
<?php 
//require(DIR_WS_MODULES . zen_get_module_directory('sideboxes/box_contact_us.php'));
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/ezpages.php');
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/subscribe.php');
?>
</div>
<div class="right_big_con margin_t">
<?php 
echo '<h3 class="line_30px border_b">' . HEADING_TITLE . '</h3>';
echo zen_draw_form('submit_link', zen_href_link(FILENAME_LINKS_SUBMIT, 'action=send', 'SSL'), 'post', 'enctype="multipart/form-data"');
if (isset($_GET['action']) && $_GET['action'] == 'success') {
    ?>
	<div class="mainContent success"><?php 
    echo LINKS_SUCCESS;
    ?>
</div>
	<div class="buttonRow back"><?php 
    echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>';
    ?>
Exemple #6
0
<?php

/**
 * Override Template for common/tpl_main_page.php
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_main_page.php 3155 2006-03-10 23:19:39Z drbyte $
 */
?>

<body id="popupShippingEstimator">
<div class="shippingEstimatorWrapper biggerText">
<p><?php 
echo '<a href="javascript:window.close()">' . TEXT_CURRENT_CLOSE_WINDOW . '</a>';
?>
</p>
      <?php 
require DIR_WS_MODULES . zen_get_module_directory('shipping_estimator.php');
?>
<p><?php 
echo '<a href="javascript:window.close()">' . TEXT_CURRENT_CLOSE_WINDOW . '</a>';
?>
</p>
</div>
</body>
/**
 * Common Template
 *
 * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: html_header.php 15761 2010-03-31 19:31:27Z drbyte $
 */
/**
 * load the module for generating page meta-tags
 */
require DIR_WS_MODULES . zen_get_module_directory('meta_tags.php');
/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
echo HTML_PARAMS;
?>
>
<head>
<title><?php 
echo META_TAG_TITLE;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
<?php

/**
 * index category_row.php
 *
 * Prepares the content for displaying a category's sub-category listing in grid format.  
 * Once the data is prepared, it calls the standard tpl_list_box_content template for display.
 *
 * @package page
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_category_row.php 2986 2006-02-07 22:27:29Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('in_category_row.php');
require $template->get_template_dir('tpl_in_row_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_in_row_display.php';
echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL');
?>
">View Orders</a></li>
  <li><a href="<?php 
echo zen_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL');
?>
">Account Settings</a></li>
  <li><a href="<?php 
echo zen_href_link(FILENAME_MANAGER_ADDRESS, '', 'SSL');
?>
">Manage Address Book</a></li>
  </ul>
  </div>
</div>
<?
 require(DIR_WS_MODULES . zen_get_module_directory('sideboxes/'.$template_dir.'/account_order_search.php'));
?>
<div class="bg_box_gray margin_t allborder clear">
  <h3 class="in_1em line_30px">Need help</h3>
    <span class="pad_10px pad_t block">If you have questions or need help with your account, you may <a class="u" href="<?php 
echo zen_href_link(FILENAME_FAQS, '', 'SSL');
?>
">contact us</a> to assist you.  </span>
</div>
</div>
<div class="right_big_con margin_t line_30px">
<h2 class="border_b"><?php 
echo HEADING_TITLE;
?>
</h2>
Exemple #10
0
    ?>
<td id="navColumnTwo" class="columnRight" style="width: <?php 
    echo COLUMN_WIDTH_RIGHT;
    ?>
">
<?php 
    /**
     * prepares and displays right column sideboxes
     *
     */
    ?>
<div id="navColumnTwoWrapper" style="width: <?php 
    echo BOX_WIDTH_RIGHT;
    ?>
"><?php 
    require DIR_WS_MODULES . zen_get_module_directory('column_right.php');
    ?>
</div></td>
<?php 
}
?>
  </tr>
</table>

<?php 
/**
 * prepares and displays footer output
 *
 */
if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
    }
    if (sizeof($newArg) > 0) {
        return $cleanUrl . '?' . implode('&', $newArg);
    } else {
        return $cleanUrl;
    }
}
function postfixUrl()
{
    global $_SERVER;
    $posbool = strpos($_SERVER['REQUEST_URI'], '?');
    return is_int($posbool) ? substr($_SERVER['REQUEST_URI'], $posbool) : '';
}
echo '<div class="minframe fl">';
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/popular_searches.php');
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/' . $template_dir . '/customers_say.php');
echo '</div>';
?>


<div class="right_big_con margin_t">
<h2 class="border_b line_30px"><?php 
echo HEADING_TITLE;
?>
</h2>
<br class="clear" />

<?php 
if ($products_new_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
    ?>
<div class="pagebar border_b gray_bg"><span class="fl"><?php 
Exemple #12
0
function zen_rss_products($sql_products, $random)
{
    global $db, $currencies, $rss, $additionalURL;
    $imageSize = isset($_GET['imgsize']) ? $_GET['imgsize'] : RSS_DEFAULT_IMAGE_SIZE;
    //IFNULL(, 0)??????
    $sql_maxdate = "SELECT GREATEST(MAX(products_date_added), MAX(IFNULL(products_last_modified, 0))) as max_date\n                    FROM " . TABLE_PRODUCTS . "\n                    WHERE products_status = 1";
    $maxdate = $db->Execute($sql_maxdate);
    if (!$maxdate->EOF) {
        $rss->rss_feed_set('lastBuildDate', date('r', strtotime($maxdate->fields['max_date'])));
    }
    if ($random) {
        $products = zen_random_select($sql_products);
    } else {
        $products = $db->Execute($sql_products);
    }
    $cashTaxRate = array();
    while (!$products->EOF) {
        $info_page = zen_get_info_page($products->fields['products_id']);
        $xtags = array();
        if (RSS_PRODUCTS_PRICE == 'true' && $products->fields['price'] > 0) {
            if (!isset($cashTaxRate[$products->fields['products_tax_class_id']])) {
                $cashTaxRate[$products->fields['products_tax_class_id']] = zen_get_tax_rate($products->fields['products_tax_class_id']);
            }
            $xtags['g:price'] = number_format(zen_add_tax($products->fields['price'] * $currencies->get_value($_SESSION['currency']), $cashTaxRate[$products->fields['products_tax_class_id']]), $currencies->get_decimal_places($_SESSION['currency']), '.', '');
            //      $xtags['c:price_formatted type="string"'] = zen_get_products_display_price($products->fields['products_id']);
            //        $xtags['c:price_formatted type="string"'] = $currencies->display_price($products->fields['price'], $cashTaxRate[$products->fields['products_tax_class_id']]);
        }
        if (RSS_PRODUCTS_CURRENCY == 'true') {
            $xtags['g:currency'] = $_SESSION["currency"] == 'RUR' ? 'RUB' : $_SESSION["currency"];
        }
        if (RSS_PRODUCTS_ID == 'true') {
            $xtags['g:id'] = $products->fields['products_id'];
        }
        if (RSS_PRODUCTS_WEIGHT == 'true' && $products->fields['products_weight'] > 0) {
            $xtags['g:weight'] = $products->fields['products_weight'];
        }
        if (RSS_PRODUCTS_BRAND == 'true' && zen_not_null($products->fields['manufacturers_name'])) {
            $xtags['g:brand'] = $rss->_clear_string($products->fields['manufacturers_name']);
        }
        if (RSS_PRODUCTS_QUANTITY == 'true' && $products->fields['products_quantity'] > 0) {
            $xtags['g:quantity'] = $products->fields['products_quantity'];
        }
        if (RSS_PRODUCTS_MODEL == 'true' && zen_not_null($products->fields['products_model'])) {
            $xtags['g:model_number'] = $rss->_clear_string($products->fields['products_model']);
        }
        if (RSS_PRODUCTS_RATING == 'true' && zen_not_null($products->fields['reviews_rating'])) {
            $xtags['g:rating'] = $products->fields['reviews_rating'];
        }
        // rating - The rating of the item. Format: Text. XML example: <g:rating>4 stars</g:rating>
        /*
        image_link
        The URL of an associated image for the item. Use your full-sized images; do not use thumbnail images.
        If you do not have an image available, leave the attribute blank.
        Do not include logos or an image that says, "Image not available."
        Format:
        URL. (Must include the http:// portion.) Up to 10 URLs can be included.
        For XML, include each URL as a separate <image_link> attribute.
        XML example:
        <g:image_link>http://www.example.com/image1.jpg</g:image_link>
        <g:image_link>http://www.example.com/image2.jpg</g:image_link>
        */
        if (RSS_PRODUCTS_IMAGES == 'true' && zen_not_null($products->fields['products_image'])) {
            $products_image = ltrim($products->fields['products_image'], '/');
            require DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE);
            switch ($imageSize) {
                case 'small':
                    $xtags['g:image_link'][0] = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $rss->_clear_url($products_image);
                    break;
                case 'medium':
                    $xtags['g:image_link'][0] = HTTP_SERVER . DIR_WS_CATALOG . $rss->_clear_url($products_image_medium);
                    break;
                case 'large':
                default:
                    $xtags['g:image_link'][0] = HTTP_SERVER . DIR_WS_CATALOG . $rss->_clear_url($products_image_large);
                    break;
            }
            if (isset($_GET['products_id']) || isset($_GET['products_model'])) {
                require DIR_WS_MODULES . zen_get_module_directory('additional_images.php');
                $num_images = min(9, $num_images);
                for ($i = 0, $n = $num_images; $i < $n; $i++) {
                    $file = $images_array[$i];
                    $products_image_large = str_replace(DIR_WS_IMAGES, DIR_WS_IMAGES . 'large/', $products_image_directory) . str_replace($products_image_extension, '', $file) . IMAGE_SUFFIX_LARGE . $products_image_extension;
                    $flag_has_large = file_exists($products_image_large);
                    $products_image_large = $flag_has_large ? $products_image_large : $products_image_directory . $file;
                    $xtags['g:image_link'][] = HTTP_SERVER . DIR_WS_CATALOG . $rss->_clear_url($products_image_large);
                }
            }
        }
        $link = zen_href_link($info_page, 'products_id=' . $products->fields['products_id'] . $additionalURL, 'NONSSL', false);
        $products_description = $products->fields['products_description'];
        if (RSS_PRODUCTS_DESCRIPTION_IMAGE == 'true' && zen_not_null($products->fields['products_image'])) {
            $image_url = zen_image(DIR_WS_IMAGES . $products->fields['products_image'], $products->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'style="float: left; margin: 0px 8px 8px 0px;"');
            $image_url = str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, $image_url);
            $image_link = '<a href="' . $link . '">' . $image_url . '</a>';
            if (RSS_STRIP_TAGS == 'true') {
                $products_description = '<![CDATA[' . $image_link . ']]>' . $products_description;
            } else {
                $products_description = $image_link . $products_description;
            }
        }
        if (RSS_PRODUCTS_DESCRIPTION_BUYNOW == 'true') {
            /*
                    $buynow_link = '<br /><br />' . zen_draw_form('cart_quantity', $link . '&action=add_product', 'post', 'enctype="multipart/form-data" target="_blank"') . "\n";
            //        $buynow_link .= '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($products->fields['products_id'])) . '" maxlength="6" size="4" />' . zen_get_products_quantity_min_units_display((int)$products->fields['products_id']);
                    $buynow_link .= zen_draw_hidden_field('cart_quantity', zen_get_buy_now_qty($products->fields['products_id']));
                    $buynow_link .= zen_draw_hidden_field('products_id', (int)$products->fields['products_id']);
                    $buynow_link .= str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, zen_image_submit(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT));
                    $buynow_link .= '</form>';
            */
            $buynow_button = str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT));
            $buynow_button = preg_replace('@onmouseover="[^"]*"@i', '', $buynow_button);
            $buynow_button = preg_replace('@onmouseout="[^"]*"@i', '', $buynow_button);
            $buynow_button = str_replace(' >', '>', $buynow_button);
            //        $buynow_link = '<br /><br />' . '<a href="' . $link . '&action=buy_now' . '" target="_blank">' . $buynow_button . '</a>' . "\n";
            $buynow_link = '<br /><br />' . '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products->fields['products_id'] . '&action=buy_now' . $additionalURL, 'SSL', false) . '" target="_blank">' . $buynow_button . '</a>' . "\n";
            if (RSS_STRIP_TAGS == 'true') {
                $products_description .= "\n" . '<![CDATA[' . $buynow_link . ']]>';
            } else {
                $products_description .= "\n" . $buynow_link;
            }
        }
        if (RSS_BUYNOW_LINK == 'true') {
            /*
                    $buynow_link = '<br /><br />' . zen_draw_form('cart_quantity', $link . '&action=add_product', 'post', 'enctype="multipart/form-data" target="_blank"') . "\n";
            //        $buynow_link .= '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($products->fields['products_id'])) . '" maxlength="6" size="4" />' . zen_get_products_quantity_min_units_display((int)$products->fields['products_id']);
                    $buynow_link .= zen_draw_hidden_field('cart_quantity', zen_get_buy_now_qty($products->fields['products_id']));
                    $buynow_link .= zen_draw_hidden_field('products_id', (int)$products->fields['products_id']);
                    $buynow_link .= str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, zen_image_submit(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT));
                    $buynow_link .= '</form>';
            */
            $buynow_button = str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT));
            $buynow_button = preg_replace('@onmouseover="[^"]*"@i', '', $buynow_button);
            $buynow_button = preg_replace('@onmouseout="[^"]*"@i', '', $buynow_button);
            $buynow_button = str_replace(' >', '>', $buynow_button);
            //        $buynow_link = $link . '&action=buy_now';
            $buynow_link = zen_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products->fields['products_id'] . '&action=buy_now' . $additionalURL, 'SSL', false);
            $xtags['zencart:buynow_link'] = $buynow_link;
            $xtags['zencart:buynow_button'] = $buynow_button;
        }
        // TODO:
        // Attribute processing
        // Model, weight, brand & etc...
        $rss->rss_feed_item($products->fields['products_name'], $link, array('url' => $link, 'PermaLink' => true), date('r', strtotime($products->fields['products_date'])), $products_description, $rss->_clear_url($products->fields['products_image']), zen_href_link(FILENAME_PRODUCT_REVIEWS, 'products_id=' . $products->fields['products_id'] . $additionalURL, 'NONSSL', false), RSS_AUTHOR == '' ? STORE_OWNER_EMAIL_ADDRESS . " <" . STORE_OWNER . ">" : RSS_AUTHOR, false, false, $xtags);
        if ($random) {
            break;
        }
        $products->MoveNext();
    }
}
<?php

/**
 * Module Template:
 * Loaded by product-type template to display additional product images.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_additional_images.php 3215 2006-03-20 06:05:55Z birdbrain $
 */
require DIR_WS_MODULES . zen_get_module_directory('additional_images.php');
?>
 <?php 
if ($flag_show_product_info_additional_images != 0 && $num_images > 0) {
    ?>
<div id="productAdditionalImages">
<?php 
    require $template->get_template_dir('tpl_columnar_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_columnar_display.php';
    ?>
</div>
<?php 
}
?>
</fieldset>
<fieldset class="floatLeft">
    <legend><?php 
echo ENTRY_DATE_TO;
?>
</legend>
    <?php 
echo zen_draw_input_field('dto', $sData['dto'], 'onfocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"');
?>
</fieldset>
</fieldset>
<br class="clear" />
<br />


<div class="buttonRow fr"><?php 
echo zen_image_submit(BUTTON_IMAGE_SEARCH, BUTTON_SEARCH_ALT);
?>
</div>
<div class="buttonRow fl"><?php 
echo zen_back_link() . zen_image_button(BUTTON_BACK_ALT, BUTTON_BACK_ALT) . '</a>';
?>
</div>

</form>

</div>
<?php 
require DIR_WS_MODULES . zen_get_module_directory('sideboxes/recommendations.php');
Exemple #15
0
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_footer = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_footer.php 15511 2010-02-18 07:19:44Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('footer.php');
?>

<?php 
if (!isset($flag_disable_footer) || !$flag_disable_footer) {
    ?>

<!--bof-navigation display -->
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<li><?php 
    echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">';
    echo HEADER_TITLE_CATALOG;
    ?>
</a></li>
<?php

/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_featured_products.php 2935 2006-02-01 11:12:40Z birdbrain $
 */
$zc_show_featured = false;
include DIR_WS_MODULES . zen_get_module_directory(FILENAME_FEATURED_PRODUCTS_MODULE);
?>

<!-- bof: featured products  -->
<?php 
if ($zc_show_featured == true) {
    ?>
<div class="centerBoxWrapper" id="featuredProducts">
<?php 
    /**
     * require the list_box_content template to display the product
     */
    require $template->get_template_dir('tpl_columnar_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_columnar_display.php';
    ?>
</div>
<?php 
}
?>
<!-- eof: featured products  -->
<?php

/**
* Template designed by 12leaves.com
* 12leaves.com - Free ecommerce templates and design services
*
* Module Template
*
* @package templateSystem
* @author JunsGo@msn.com
* @copyright Copyright 2013 SL Development Team
* @copyright Portions Copyright 2003 osCommerce
*/
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORY_ICON_DISPLAY);
/*
 * <!--div align="<?php echo $align; ?>" id="categoryIcon" class="categoryIcon"><?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'], 'NONSSL') . '">' . $category_icon_display_image . $category_icon_display_name . '</a>'; ?></div-->
 */
<?php

/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
 */
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE);
?>
 
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript"><!--
document.write('<?php 
echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
');
//--></script>
<noscript>
<?php 
echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
</noscript>
</div>
Exemple #19
0
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Thu Mar 6 14:59:16 2014 -0500 Modified in v1.5.3 $
 */
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_LOGIN');
$zco_notifier->notify('NOTIFY_HEADER_START_EASY_SIGNUP');
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if ($session_started == false) {
    zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
}
// if the customer is logged in already, redirect them to the My account page
if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
    zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
include DIR_WS_MODULES . zen_get_module_directory('fec_create_account.php');
$flag_disable_left = FEC_LEFT_COLUMN_STATUS == 'false' ? true : false;
$flag_disable_right = FEC_RIGHT_COLUMN_STATUS == 'false' ? true : false;
$flag_disable_header = FEC_HEADER_STATUS == 'false' ? true : false;
$flag_disable_footer = FEC_FOOTER_STATUS == 'false' ? true : false;
$error = false;
if (isset($_GET['action']) && $_GET['action'] == 'process') {
    $email_address = zen_db_prepare_input($_POST['email_address']);
    $password = zen_db_prepare_input($_POST['password']);
    $loginAuthorized = false;
    /* Privacy-policy-read does not need to be checked during "login"
      if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
      if (!isset($_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {
        $error = true;
      $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
      }
<?php

/**
 * Module Template
 *
 * Template stub used to display Gift Certificates box
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_send_or_spend.php 2987 2006-02-07 22:30:30Z drbyte $
 */
include DIR_WS_MODULES . zen_get_module_directory('send_or_spend.php');
?>
<h2><?php 
echo BOX_HEADING_GIFT_VOUCHER;
?>
</h2>
    <p><?php 
echo TEXT_SEND_OR_SPEND;
?>
</p>
    <p><?php 
echo TEXT_BALANCE_IS . $customer_gv_balance;
?>
</p>
    <div class="buttonRow forward"><?php 
echo '<a href="' . zen_href_link(FILENAME_GV_SEND, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_SEND_A_GIFT_CERT, BUTTON_SEND_A_GIFT_CERT_ALT) . '</a>';
?>
</div>
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 3777 2006-06-15 07:03:03Z drbyte $
 */
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_LOGIN');
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if ($session_started == false) {
    zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
}
// if the customer is logged in already, redirect them to the My account page
if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
    zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
include DIR_WS_MODULES . zen_get_module_directory(FILENAME_CREATE_ACCOUNT);
$error = false;
if (isset($_GET['action']) && $_GET['action'] == 'process') {
    $email_address = zen_db_prepare_input($_POST['email_address']);
    $password = zen_db_prepare_input($_POST['password']);
    /* Privacy-policy-read does not need to be checked during "login"
      if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
      if (!isset($_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {
      $error = true;
      $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
      }
      }
      */
    // Check if email exists
    $check_customer_query = "SELECT customers_id, customers_firstname, customers_lastname, customers_password,\r\n                                    customers_email_address, customers_default_address_id,\r\n                                    customers_authorization, customers_referral\r\n                           FROM " . TABLE_CUSTOMERS . "\r\n                           WHERE customers_email_address = :email";
    $check_customer_query = $db->bindVars($check_customer_query, ':email', $email_address, 'string');
<?php

$show_categories_fixed = false;
require DIR_WS_MODULES . zen_get_module_directory('categories_left_fixed.php');
if ($show_categories_fixed) {
    ?>
     <div id="menu_btn" style="z-index: 200; float: left; position: relative;">
			<div class="absolute" id="litbCon1">	
			   <ul id="menu_index_top2">
				   <li id="litbBtn">	
				     <a href="<?php 
    echo zen_href_link(FILENAME_SITE_MAP);
    ?>
" target="_top">				 
					  <?php 
    echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'category_2.gif', '', 177, 31, ' class="align_top"');
    ?>
 
					 </a> 
				   </li>
			   </ul>
			</div>	
		    <div class="absolute" id="litbCon2" style="display: none">
			     <div id="left_menu2">            
					<ul id="menu_index_top2">
					  <li>
					   <a href="<?php 
    echo zen_href_link(FILENAME_SITE_MAP);
    ?>
" target="_top">
					   <?php 
/**
 * Page Template
 *
 * Displays EZ-Pages footer-bar content.<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_ezpages_bar_footer.php 3377 2006-04-05 04:43:11Z ajeh $
 */
/**
 * require code to show EZ-Pages list
 */
include DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_footer.php');
if (sizeof($var_linksList) >= 1) {
    ?>

<?php 
    for ($i = 1, $n = sizeof($var_linksList); $i <= $n; $i++) {
        ?>
<a href="<?php 
        echo $var_linksList[$i]['link'];
        ?>
"><?php 
        echo $var_linksList[$i]['name'];
        ?>
</a><?php 
        echo ($i < $n ? EZPAGES_SEPARATOR_FOOTER : '') . "";
    }
 /** Render the boxes to display on the empty cart page */
 public static function empty_cart_boxes()
 {
     global $db, $template, $current_page_base;
     $boxes = array('SHOW_SHOPPING_CART_EMPTY_FEATURED_PRODUCTS' => array('key' => 'SHOW_SHOPPING_CART_EMPTY_FEATURED_PRODUCTS', 'get_template' => true, 'template' => 'tpl_modules_featured_products'), 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS' => array('key' => 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS', 'get_template' => true, 'template' => 'tpl_modules_specials_default'), 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS' => array('key' => 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS', 'get_template' => true, 'template' => 'tpl_modules_whats_new'), 'SHOW_SHOPPING_CART_EMPTY_UPCOMING' => array('key' => 'SHOW_SHOPPING_CART_EMPTY_UPCOMING', 'get_template' => false, 'template' => DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)));
     $boxes_to_display = $db->Execute(SQL_SHOW_SHOPPING_CART_EMPTY);
     $cart_boxes = array();
     while (!$boxes_to_display->EOF) {
         $box_key = $boxes_to_display->fields['configuration_key'];
         if (array_key_exists($box_key, $boxes)) {
             $box = $boxes[$box_key];
             $template_file = $box['template'];
             if ($box['get_template']) {
                 $template_file .= '.php';
                 $template_file = $template->get_template_dir($template_file, DIR_WS_TEMPLATE, $current_page_base, 'templates') . "/{$template_file}";
             }
             $cart_boxes[] = $template_file;
         }
         $boxes_to_display->MoveNext();
     }
     return $cart_boxes;
 }
<?php

/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_product_listing.php 3241 2006-03-22 04:27:27Z ajeh $
 */
include DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING);
if ($linkMark = strpos($_SERVER['REQUEST_URI'], '?')) {
    $cleanUrl = substr($_SERVER['REQUEST_URI'], 0, $linkMark);
} else {
    $cleanUrl = $_SERVER['REQUEST_URI'];
}
function cleanSameArg($clean)
{
    global $_GET, $cleanUrl;
    $newArg = array();
    reset($_GET);
    while (list($key, $value) = each($_GET)) {
        if ($key != 'main_page' and $key != 'cPath' and $key != 'display' and $key != $clean) {
            $newArg[] = $key . '=' . $value;
        }
    }
    if (sizeof($newArg) > 0) {
        return $cleanUrl . '?' . implode('&', $newArg);
    } else {
        return $cleanUrl;
<?php

/**
 * products_all  header_php.php
 *
 * @package page
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 6912 2007-09-02 02:23:45Z drbyte $
 */
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
$breadcrumb->add(NAVBAR_TITLE);
// display order dropdown
$disp_order_default = PRODUCT_ALL_LIST_SORT_DEFAULT;
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER);
$products_all_array = array();
$products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,\n                                    p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,\n                                    p.product_is_always_free_shipping, p.products_qty_box_status,\n                                    p.master_categories_id\n                             FROM " . TABLE_PRODUCTS . " p\n                             LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                             WHERE p.products_status = 1\n                             AND p.products_id = pd.products_id\n                             AND pd.language_id = :languageID " . $order_by;
$products_all_query_raw = $db->bindVars($products_all_query_raw, ':languageID', $_SESSION['languages_id'], 'integer');
$products_all_split = new splitPageResults($products_all_query_raw, MAX_DISPLAY_PRODUCTS_ALL);
//check to see if we are in normal mode ... not showcase, not maintenance, etc
$show_submit = zen_run_normal();
// check whether to use multiple-add-to-cart, and whether top or bottom buttons are displayed
if (PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART > 0 and $show_submit == true and $products_all_split->number_of_rows > 0) {
    // check how many rows
    $check_products_all = $db->Execute($products_all_split->sql_query);
    $how_many = 0;
    while (!$check_products_all->EOF) {
        if (zen_has_product_attributes($check_products_all->fields['products_id'])) {
        } else {
            // needs a better check v1.3.1
Exemple #27
0
 * @version $Id: header_php.php 4793 2006-10-20 05:25:20Z ajeh $
 */
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_CHECKOUT_PAYMENT_ADDRESS');
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($_SESSION['cart']->count_contents() <= 0) {
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
}
// if the customer is not logged on, redirect them to the login page
if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
} else {
    // validate customer
    if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
        $_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_SHIPPING));
        zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
$addressType = "billto";
require DIR_WS_MODULES . zen_get_module_directory('checkout_new_address');
// if no billing destination address was selected, use their own address as default
if (!$_SESSION['billto']) {
    $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
}
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
$addresses_count = zen_count_customer_address_book_entries();
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_CHECKOUT_PAYMENT_ADDRESS');
<?php

/**
 * Module Template
 *
 * Displays content related to "also-purchased-products"
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_also_purchased_products.php 3206 2006-03-19 04:04:09Z birdbrain $
 */
$zc_show_also_purchased = false;
include DIR_WS_MODULES . zen_get_module_directory(FILENAME_ALSO_PURCHASED_PRODUCTS);
?>

<?php 
if ($zc_show_also_purchased == true) {
    ?>
<div class="centerBoxWrapper" id="alsoPurchased">
<?php 
    require $template->get_template_dir('tpl_columnar_display.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_columnar_display.php';
    ?>
</div>
<?php 
}
<?php

$anID = isset($_GET['anID']) ? $_GET['anID'] : '';
if (zen_not_null($anID) && is_numeric($anID)) {
    $announce_sql = 'select * from ' . TABLE_ANNOUNCEMENT . ' 
		               where id=' . (int) $anID . ' 
					   and   is_visible=1 
					   and   languages_id=' . (int) $_SESSION['languages_id'];
    $announce_db = $db->Execute($announce_sql);
    if ($announce_db->RecordCount() > 0) {
        $announce = array();
        while (!$announce_db->EOF) {
            $announce[] = array('title' => $announce_db->fields['title'], 'date_added' => $announce_db->fields['date_added'], 'ann_content' => $announce_db->fields['ann_content']);
            $announce_db->MoveNext();
        }
    } else {
        zen_redirect(FILENAME_DEFAULT);
    }
} else {
    zen_redirect(FILENAME_DEFAULT);
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
<?php

if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
$show_bottom_bestseller = false;
include DIR_WS_MODULES . zen_get_module_directory(FILENAME_BOTTOM_BESTSELLER);
if ($show_bottom_bestseller) {
    ?>
	  
     <h6><strong><?php 
    echo TEXT_CONTINUE_SHOPPING;
    ?>
</strong><?php 
    echo TEXT_TOP_SELLER;
    ?>
</h6>
	  <div class="wrapper">
		  <ul>
		      <?php 
    foreach ($bottom_bestsellers_list as $product) {
        ?>
					<li>
					  <a href="<?php 
        echo $product['products_url_link'];
        ?>
" title="<?php 
        echo $product['name'];
        ?>
">	   
						<?php