示例#1
0
 function payment($module = '')
 {
     global $PHP_SELF, $language, $credit_covers, $messageStack;
     if (defined('MODULE_PAYMENT_INSTALLED') && zen_not_null(MODULE_PAYMENT_INSTALLED)) {
         $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             // Free Payment Only shows
             if (zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') and ($_SESSION['cart']->show_total() == 0 and $_SESSION['shipping']['cost'] == 0)) {
                 $this->selected_module = $module;
                 if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger.php')) {
                     $include_modules[] = array('class' => 'freecharger', 'file' => 'freecharger.php');
                 }
             } else {
                 // All Other Payment Modules show
                 while (list(, $value) = each($this->modules)) {
                     // double check that the module really exists before adding to the array
                     if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . $value)) {
                         $class = substr($value, 0, strrpos($value, '.'));
                         // Don't show Free Payment Module
                         if ($class != 'freecharger') {
                             $include_modules[] = array('class' => $class, 'file' => $value);
                         }
                     }
                 }
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $include_modules[$i]['file']);
             $lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', $include_modules[$i]['file'], 'false');
             if (@file_exists($lang_file)) {
                 include_once $lang_file;
             } else {
                 if (IS_ADMIN_FLAG === false) {
                     $messageStack->add(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 } else {
                     $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
                 }
             }
             include_once DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         // $_POST['payment'] value which will be empty (no radio button selection possible)
         if (zen_count_payment_modules() == 1 && (!isset($_SESSION['payment']) || isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) {
             if (!$credit_covers) {
                 $_SESSION['payment'] = $include_modules[0]['class'];
             }
         }
         if (zen_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
 function __construct($module = '')
 {
     global $payment, $gBitCustomer;
     if (defined('MODULE_PAYMENT_INSTALLED') && zen_not_null(MODULE_PAYMENT_INSTALLED)) {
         $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         $include_modules = array();
         if (zen_not_null($module) && in_array($module . '.' . substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             // Free Payment Only shows
             if (zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') and ($gBitCustomer->mCart->show_total() == 0 and $gBitCustomer->mCart->show_weight() == 0)) {
                 $this->selected_module = $module;
                 if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger.php')) {
                     $include_modules[] = array('class' => 'freecharger', 'file' => 'freecharger.php');
                 }
             } else {
                 // All Other Payment Modules show
                 while (list(, $value) = each($this->modules)) {
                     // double check that the module really exists before adding to the array
                     if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . $value)) {
                         $class = substr($value, 0, strrpos($value, '.'));
                         // Don't show Free Payment Module
                         if ($class != 'freecharger') {
                             $include_modules[] = array('class' => $class, 'file' => $value);
                         }
                     }
                 }
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             $langFile = zen_get_file_directory(DIR_WS_LANGUAGES . $gBitCustomer->getLanguage() . '/modules/payment/', $include_modules[$i]['file'], 'false');
             if (file_exists($langFile)) {
                 include $langFile;
             }
             include DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         // $_POST['payment'] value which will be empty (no radio button selection possible)
         if (zen_count_payment_modules() == 1 && (!isset($_SESSION['payment']) || isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) {
             $_SESSION['payment'] = $include_modules[0]['class'];
         }
         if (zen_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
示例#3
0
    require_once DIR_FS_CATALOG . 'includes/classes/dbencdata.php';
}
$set = isset($_GET['set']) ? $_GET['set'] : (isset($_POST['set']) ? $_POST['set'] : '');
$is_ssl_protected = substr(HTTP_SERVER, 0, 5) == 'https' ? TRUE : FALSE;
if (zen_not_null($set)) {
    switch ($set) {
        case 'shipping':
            $module_type = 'shipping';
            $module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
            $module_key = 'MODULE_SHIPPING_INSTALLED';
            define('HEADING_TITLE', HEADING_TITLE_MODULES_SHIPPING);
            $shipping_errors = '';
            if (zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == 'NONE' or zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == '') {
                $shipping_errors .= '<br />' . ERROR_SHIPPING_ORIGIN_ZIP;
            }
            if (zen_get_configuration_key_value('ORDER_WEIGHT_ZERO_STATUS') == '1' and !defined('MODULE_SHIPPING_FREESHIPPER_STATUS')) {
                $shipping_errors .= '<br />' . ERROR_ORDER_WEIGHT_ZERO_STATUS;
            }
            if (defined('MODULE_SHIPPING_USPS_STATUS') and (MODULE_SHIPPING_USPS_USERID == 'NONE' or MODULE_SHIPPING_USPS_SERVER == 'test')) {
                $shipping_errors .= '<br />' . ERROR_USPS_STATUS;
            }
            if ($shipping_errors != '') {
                $messageStack->add(ERROR_SHIPPING_CONFIGURATION . $shipping_errors, 'caution');
            }
            break;
        case 'ordertotal':
            $module_type = 'order_total';
            $module_directory = DIR_FS_CATALOG_MODULES . 'order_total/';
            $module_key = 'MODULE_ORDER_TOTAL_INSTALLED';
            define('HEADING_TITLE', HEADING_TITLE_MODULES_ORDER_TOTAL);
            break;
/**
 * Module Template
 *
 * Loaded automatically by index.php?main_page=products_new.<br />
 * Displays listing of New Products
 *
 * @package templateSystem
 * @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: tpl_modules_products_new_listing.php 6096 2007-04-01 00:43:21Z ajeh $
 */
?>

<?php 
$group_id = zen_get_configuration_key_value('PRODUCT_NEW_LIST_GROUP_ID');
if ($products_new_split->number_of_rows > 0) {
    $products_new = $db->Execute($products_new_split->sql_query);
    while (!$products_new->EOF) {
        if (PRODUCT_NEW_LIST_IMAGE != '0') {
            if ($products_new->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
                $display_products_image = str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_IMAGE, 3, 1));
            } else {
                $display_products_image = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $products_new->fields['products_image'], $products_new->fields['products_name'], 128, 128) . '</a>' . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_IMAGE, 3, 1));
            }
        } else {
            $display_products_image = '';
        }
        if (PRODUCT_NEW_LIST_NAME != '0') {
            $display_products_name = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '"><strong>' . $products_new->fields['products_name'] . '</strong></a>' . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_NAME, 3, 1));
        } else {
示例#5
0
$zv_db_patch_ok = true;
// we start with true
if (WARN_DATABASE_VERSION_PROBLEM != 'false') {
    $result = $db->Execute("SELECT project_version_major, project_version_minor FROM " . TABLE_PROJECT_VERSION . " WHERE project_version_key = 'Zen-Cart Database'");
    $zv_db_patch_level_found = $result->fields['project_version_major'] . '.' . $result->fields['project_version_minor'];
    $zv_db_patch_level_expected = EXPECTED_DATABASE_VERSION_MAJOR . '.' . EXPECTED_DATABASE_VERSION_MINOR;
    if ($zv_db_patch_level_expected == '.' || $zv_db_patch_level_found < $zv_db_patch_level_expected) {
        $zv_db_patch_ok = false;
        $messageStack->add(WARNING_DATABASE_VERSION_OUT_OF_DATE, 'warning');
    }
}
// Check that shipping/payment modules have been defined
if (zen_get_configuration_key_value('MODULE_PAYMENT_INSTALLED') == '') {
    $messageStack->add(ERROR_PAYMENT_MODULES_NOT_DEFINED, 'caution');
}
if (zen_get_configuration_key_value('MODULE_SHIPPING_INSTALLED') == '') {
    $messageStack->add(ERROR_SHIPPING_MODULES_NOT_DEFINED, 'caution');
}
// if welcome email coupon is set and <= 21 days warn shop owner
if (NEW_SIGNUP_DISCOUNT_COUPON > 0) {
    $zc_welcome_check = $db->Execute("SELECT coupon_expire_date from " . TABLE_COUPONS . " WHERE coupon_id=" . (int) NEW_SIGNUP_DISCOUNT_COUPON);
    $zc_current_date = date('Y-m-d');
    $zc_days_to_expire = zen_date_diff($zc_current_date, $zc_welcome_check->fields['coupon_expire_date']);
    if ($zc_days_to_expire <= 21) {
        $zc_caution_warning = $zc_days_to_expire <= 5 ? 'warning' : 'caution';
        $messageStack->add(sprintf(WARNING_WELCOME_DISCOUNT_COUPON_EXPIRES_IN, $zc_days_to_expire), $zc_caution_warning);
    }
}
// Alerts for EZ-Pages
if (EZPAGES_STATUS_HEADER == '2' and strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])) {
    $messageStack->add(TEXT_EZPAGES_STATUS_HEADER_ADMIN, 'caution');
示例#6
0
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
    $messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');
}
// check if a default language is set
if (!defined('DEFAULT_LANGUAGE') || DEFAULT_LANGUAGE == '') {
    $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
}
if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) {
    $messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning');
}
// set demo message
if (zen_get_configuration_key_value('ADMIN_DEMO') == '1') {
    if (zen_admin_demo()) {
        $messageStack->add(ADMIN_DEMO_ACTIVE, 'warning');
    } else {
        $messageStack->add(ADMIN_DEMO_ACTIVE_EXCLUSION, 'warning');
    }
}
// check if email subsystem has been disabled
if (SEND_EMAILS != 'true') {
    $messageStack->add(WARNING_EMAIL_SYSTEM_DISABLED, 'error');
}
// this will let the admin know that the website is DOWN FOR MAINTENANCE to the public
if (DOWN_FOR_MAINTENANCE == 'true') {
    $messageStack->add(WARNING_ADMIN_DOWN_FOR_MAINTENANCE, 'caution');
}
// include the password crypto functions
示例#7
0
        // ----------------------------------------------------------------------------------------------------------------------------------------------------------------
        $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_ADMIN . '</b>');
        $contents = array('form' => zen_draw_form('edit_admin', FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
        $contents[] = array('text' => TEXT_EDIT_INTRO);
        $contents[] = array('text' => '<br><b>' . $adminInfo->admin_id . '</b>&nbsp;-&nbsp;' . $adminInfo->admin_name . '</b>');
        $contents[] = array('text' => '
<br>
' . TEXT_ADMINS_NAME . '<br>' . zen_draw_input_field('admin_name', $adminInfo->admin_name, zen_set_field_length(TABLE_ADMIN, 'admin_name', $max = 30)));
        $contents[] = array('text' => '
<br>
' . TEXT_ADMINS_EMAIL . '<br>' . zen_draw_input_field('admin_email', $adminInfo->admin_email, zen_set_field_length(TABLE_ADMIN, 'admin_email', $max = 30)));
        $admin_current = $db->Execute("select admin_level from " . TABLE_ADMIN . " where admin_id='" . $_SESSION['admin_id'] . "'");
        if ($admin_current->fields['admin_level'] == '1') {
            $contents[] = array('text' => '<br>' . TEXT_ADMIN_LEVEL_INSTRUCTIONS);
            $contents[] = array('text' => '<strong>' . TEXT_ADMINS_LEVEL . '</strong><br>' . zen_draw_input_field('admin_level', $adminInfo->admin_level, zen_set_field_length(TABLE_ADMIN, 'admin_level')));
            $demo_status = zen_get_configuration_key_value('ADMIN_DEMO');
            switch ($demo_status) {
                case '0':
                    $on_status = false;
                    $off_status = true;
                    break;
                case '1':
                    $on_status = true;
                    $off_status = false;
                    break;
                default:
                    $on_status = false;
                    $off_status = true;
                    break;
            }
            $contents[] = array('text' => '<br>' . TEXT_ADMIN_DEMO);
     $products_price = zen_get_products_display_price($specials->fields['products_id']);
     $specials->fields['products_name'] = zen_get_products_name($specials->fields['products_id']);
     $list_box_contents[$row][$col] = array('params' => 'class="specialsListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => '<a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . (($specials->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : zen_image(DIR_WS_IMAGES . $specials->fields['products_image'], $specials->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>') . '<br /><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . $specials->fields['products_name'] . '</a><br />' . $products_price);
     $col++;
     if ($col > SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS - 1) {
         $col = 0;
         $row++;
     }
     $specials->MoveNext();
 }
 //===========  bof SNAF (set up for product listing)
 $use_product_listing = false;
 if (zen_get_configuration_key_value('USE_PRODUCT_LISTING_FOR_SPECIALS') == 'True') {
     $use_product_listing = true;
     $snaf_listing_split = $specials_split;
     if (zen_get_configuration_key_value('USE_PRODUCT_LISTING_FILTER_FOR_SPECIALS') == 'True') {
         $show_product_listing_filter = true;
     } else {
         $show_product_listing_filter = false;
     }
     if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') {
         // include the language file for the headings
         $category_depth = 'products';
         if (file_exists(DIR_WS_LANGUAGES . $_SESSION['language'] . '/index.php')) {
             require DIR_WS_LANGUAGES . $_SESSION['language'] . '/index.php';
         } else {
             require DIR_WS_LANGUAGES . 'english/index.php';
         }
     }
     // create column list
     $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);
                             $tell_a_friend_email_error .= "Please make each email address unique.<br>";
                             $un_bool = false;
                         }
                         $tell_a_friend_email_error .= "{$email}, is already in use.<br>";
                         $tell_a_friend_email[$key] = "";
                         $bool = false;
                     }
                 }
             }
         }
     }
     $_SESSION["tell_a_friend_email"] = "";
     $_SESSION["tell_a_friend_email"] = $tell_a_friend_email;
     $_SESSION["tell_a_friend_email_f_name"] = $_POST["tell_a_friend_email_f_name"];
     $_SESSION["tell_a_friend_email_l_name"] = $_POST["tell_a_friend_email_l_name"];
     if (count($tell_a_friend_email) < zen_get_configuration_key_value("MODULE_SHIPPING_TELL_A_FRIEND_NO_OF_EMAILS")) {
         $tell_a_friend_email_error .= "Please fill all the email fields.<br>";
         $bool = false;
     }
     if ($tell_a_friend_email_error != '') {
         $messageStack->add_session('checkout_shipping', $tell_a_friend_email_error, 'error');
         $_SESSION['shipping'] = $shipping_modules->cheapest();
         zen_redirect(zen_href_link(FILENAME_CHECKOUT, '', 'SSL'));
     }
     if ($bool) {
         $quote = $shipping_modules->quote($method, $module);
     }
     //eof tell a freand
 } else {
     // avoid incorrect calculations during redirect
     $shipping_modules = new shipping();
示例#10
0
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: faq_manager.php 001 2005-03-27 dave@open-operations.com
//
?>
<div class="margin_t">
<?php 
$group_id = zen_get_configuration_key_value('FAQ_LISTS_GROUP_ID_ALL');
if ($faqs_all_split->number_of_rows > 0) {
    $faqs_all = $db->Execute($faqs_all_split->sql_query);
    $category_displayed = '';
    while (!$faqs_all->EOF) {
        $fcPath = zen_get_faq_path($faqs_all->fields['faqs_id']);
        if (FAQ_ALL_DISPLAY_CATEGORY != '0' && $category_displayed != $faqs_all->fields['faq_categories_name']) {
            $category_displayed = $faqs_all->fields['faq_categories_name'];
            echo '<h3>' . $category_displayed . '</h3>';
        }
        echo '<div class="margin_t">';
        if (FAQ_ALL_LIST_NAME != '0') {
            $display_faqs_name = '<a class="u" href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . $faqs_all->fields['faqs_name'] . '</a>' . str_repeat('<br clear="all" />', substr(FAQ_ALL_LIST_NAME, 3, 1));
        } else {
            $display_faqs_name = '';
        }
示例#11
0
//  Path: /admin/phreebooks.php
//
// This file is a modified version of modules.php. Changes could have been made to modules.php to add the
// phreebooks module but this way is less disruptive when ZenCart is upgraded.
require 'includes/application_top.php';
$set = isset($_GET['set']) ? $_GET['set'] : '';
if (zen_not_null($set)) {
    switch ($set) {
        case 'phreebooks':
        default:
            $module_type = 'phreebooks';
            $module_directory = DIR_FS_CATALOG_MODULES . 'phreebooks/';
            $module_key = 'MODULE_PHREEBOOKS_INSTALLED';
            define('HEADING_TITLE', HEADING_TITLE_MODULES_PHREEBOOKS);
            $shipping_errors = '';
            if (zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == 'NONE' or zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == '') {
                $shipping_errors .= '<br />' . ERROR_SHIPPING_ORIGIN_ZIP;
            }
            if ($shipping_errors != '') {
                $messageStack->add(SHIPPING_ERROR_CONFIGURATION . $shipping_errors, 'caution');
            }
            break;
    }
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (zen_not_null($action)) {
    switch ($action) {
        case 'save':
            while (list($key, $value) = each($_POST['configuration'])) {
                $db->Execute("update " . TABLE_CONFIGURATION . "\r\n                        set configuration_value = '" . $value . "'\r\n                        where configuration_key = '" . $key . "'");
            }
 * @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: tpl_modules_specials_listing.php 6096 2007-04-01 00:43:21Z ajeh $
 */
?>
 <?php 
if (isset($_GET['view']) && $_GET['view'] == 'rows' || PRODUCT_LISTING_LAYOUT_STYLE == 'rows' && !isset($_GET['view'])) {
    echo '<div id="product-area" class="section offer products-container portrait product-list" data-layout="list">';
} else {
    echo '<div id="product-area" class="section offer products-container portrait product-grid" data-layout="grid">';
}
?>
<div class="row" style=" transform: ">
<?php 
$group_id = zen_get_configuration_key_value('PRODUCT_SPECIALS_GROUP_ID');
if ($specials_split->number_of_rows > 0) {
    $specials = $db->Execute($specials_split->sql_query);
    while (!$specials->EOF) {
        $products_name = $specials->fields['products_name'];
        //$products_name = ltrim(substr($products_name, 0, 25) . '');
        $products_description_full = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($specials->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);
        //To Display Product Desc
        $products_description_list = ltrim(substr($products_description_full, 0, 250) . '');
        //Trims and Limits the desc
        $moreinfo = '<a class="more_info_text" href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($specials->fields['master_categories_id']) . '&products_id=' . $specials->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        if (PRODUCT_SPECIALS_IMAGE != '0') {
            if ($specials->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
                $display_products_image = str_repeat('', substr(PRODUCT_SPECIALS_IMAGE, 3, 1));
            } else {
                $product_img_src = mb_getbaseimg_effects($specials->fields['products_image']);
示例#13
0
        $show_top_submit_button = true;
    } else {
        $show_top_submit_button = false;
    }
    if ($how_many > 0 and $show_submit == true and $featured_products_split->number_of_rows > 0 and PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART >= 2) {
        $show_bottom_submit_button = true;
    } else {
        $show_bottom_submit_button = false;
    }
}
//===========  bof SNAF (set up for product listing)
$use_product_listing = false;
if (zen_get_configuration_key_value('USE_PRODUCT_LISTING_FOR_FEATURED_PRODUCTS') == 'True') {
    $use_product_listing = true;
    $snaf_listing_split = $featured_products_split;
    if (zen_get_configuration_key_value('USE_PRODUCT_LISTING_FILTER_FOR_FEATURED_PRODUCTS') == 'True') {
        $show_product_listing_filter = true;
    } else {
        $show_product_listing_filter = false;
    }
    if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') {
        // include the language file for the headings
        $category_depth = 'products';
        if (file_exists(DIR_WS_LANGUAGES . $_SESSION['language'] . '/index.php')) {
            require DIR_WS_LANGUAGES . $_SESSION['language'] . '/index.php';
        } else {
            require DIR_WS_LANGUAGES . 'english/index.php';
        }
    }
    // create column list
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);