Page 1 of 2 12 LastLast
Results 1 to 10 of 2247

Hybrid View

  1. #1
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    i just give up trying to get this to work with the fluorspar template.
    i am going to use the template that came with the software.. and that is working so far..
    thank you Doc byte with the multi-site update.. i used that one and so far so good. thank you for all your work.
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  2. #2
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    hi you all, I am back..
    I tried to add new pictures to my categories and here is what happens,.. when i put in the new pictures in and saved it.. the <--heras, Kandi---> disappears.. and when I went to the multi site tool the heras, kandi is missing also..


    here is the debug

    28-Apr-2021 02:34:21 UTC] Request URI: /shop/angRy-SZm-trusT/index.php?cmd=multisite&action=categories_sites, IP address: 24.113.216.190
    #1 sizeof() called at [/angRy-SZm-trusT/multisite.php:209]
    #2 require(/angRy-SZm-trusT/multisite.php) called at [/angRy-SZm-trusT/index.php:11]
    --> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /angRy-SZm-trusT/multisite.php on line 209.



    (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((

    <?php
    /**
    * Multisite for Zen-Cart
    *
    * This file should be in includes/admin/multisite.php
    *
    */
    require('includes/application_top.php');

    $action = (isset($_GET['action']) ? $_GET['action'] : '');
    /**
    * Save cats/sites
    */
    if (isset($action) && ($action == 'categories_sites') && isset($_GET['mode']) && ($_GET['mode'] == 'save')) {
    if (isset($_GET['site'])) {
    $site_param = '&site=' . $_GET['site'];
    } else {
    $site_param = '';
    }
    if (isset($_POST['site'])) {
    foreach ($_POST['site'] as $multisite_cat_id => $multisite_sites) {
    $multisite_query = $db->Execute("SELECT categories_description, language_id
    FROM " . TABLE_CATEGORIES_DESCRIPTION . " cd
    WHERE categories_id = " . (int)$multisite_cat_id);
    foreach ($multisite_query as $site) {
    $multisite_cat_desc = preg_replace('/<!--(.|\s)*?-->/', '', $site['categories_description']);
    while ($multisite_cat_desc['0'] == "\n") {
    $multisite_cat_desc = substr($multisite_cat_desc, 1);
    }
    if ($multisite_sites != '') {
    $multisite_cat_desc = "<!--$multisite_sites-->\n$multisite_cat_desc";
    }
    //echo $multisite_cat_id.' -> '.$multisite_cat_desc."\n";
    $sql = "UPDATE " . TABLE_CATEGORIES_DESCRIPTION . "
    SET categories_description = :multisiteCategoriesDescription
    WHERE language_id = " . (int)$site['language_id'] . "
    AND categories_id = " . (int)$multisite_cat_id;
    $sql = $db->bindVars($sql, ':multisiteCategoriesDescription', $multisite_cat_desc, 'string');
    $db->Execute($sql);
    }
    }
    }
    zen_redirect(zen_href_link(FILENAME_MULTISITE, 'action=' . $_GET['action'] . $site_param));
    exit;
    }
    ?>

    <!doctype html>
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta charset="<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <link rel="stylesheet" href="includes/stylesheet.css">
    <link rel="stylesheet" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
    <script src="includes/menu.js"></script>
    <script src="includes/general.js"></script>
    <script type="text/javascript">
    function init() {
    cssjsmenu('navbar');
    if (document.getElementById)
    {
    var kill = document.getElementById('hoverJS');
    kill.disabled = true;
    }
    }

    function add_to_all_cats() {
    var new_site = $('#txt_site').val();
    if (new_site != '') {
    var form_elements = document.forms["save_multisite"].elements;
    for (var element_id in form_elements) {
    if ((form_elements[element_id].name) && (form_elements[element_id].name.substr(0, 5) == " site[")) {
    if (form_elements[element_id].value == '') {
    form_elements[element_id].value = new_site;
    } else {
    var split_sites = form_elements[element_id ].value.split("-");
    var found = false;
    for (var i in split_sites) {
    if (split_sites[i] == new_site) {
    found = true;
    }
    }
    if (!found) {
    split_sites[split_sites.length] = new_site;
    }
    split_sites.sort();
    form_elements[element_id].value = split_sites.join('-');
    }
    }
    }
    $('#txt_site').val('');
    }
    }
    function remove_from_all_cats() {
    var rmv_site = $('#txt_site').val();
    if (rmv_site != '') {
    var form_elements = document.forms['save_multisite'].elements;
    for (var element_id in form_elements) {
    if ((form_elements[element_id].name) && (form_elements[element_id].name.substr(0, 5) == 'site[')) {
    var split_sites = form_elements[element_id].value.split("-");
    var split_result = new Array();
    var j = 0;
    for (var i in split_sites) {
    if (split_sites[i] != rmv_site) {
    split_result[j] = split_sites[i];
    j++;
    }
    }
    split_result.sort();
    form_elements[element_id].value = split_result.join('-');
    }
    }
    $('#txt_site').val('');
    }
    }
    </script>
    </head>
    <body onLoad="init()">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->

    <!-- body //-->
    <div class="container-fluid">
    <!-- body_text //-->
    <h1><?php echo MULTISITE_TITLE; ?></h1>
    <?php
    //Display menu ...
    ?>
    <div class="row text-center">
    <a href="<?php echo zen_href_link(FILENAME_MULTISITE, 'action=display_config'); ?>" class="btn btn-default" role="button"><?php echo MULTISITE_CONFIG_LINK; ?></a> - <a href="<?php echo zen_href_link(FILENAME_MULTISITE, 'action=categories_sites'); ?>" class="btn btn-default" role="button"><?php echo MULTISITE_RELATIONS_LINK; ?></a>
    </div>
    <?php
    if (isset($action)) {
    switch ($action) {
    case 'display_config':
    ?>
    <div class="row text-center">
    <?php echo MULTISITE_CONFIG_TEXT; ?><br><br>
    <textarea name="code" class="php form-control" cols="100" rows="40" style="width:90%;">
    <?php
    $config_query = $db->Execute("SELECT cg.configuration_group_title,c.configuration_key,c.configuration_value,c.configu ration_title
    FROM " . TABLE_CONFIGURATION . " c
    LEFT JOIN " . TABLE_CONFIGURATION_GROUP . " cg ON c.configuration_group_id = cg.configuration_group_id
    ORDER BY cg.sort_order, c.sort_order");
    $current_group_title = '';
    foreach ($config_query as $config) {
    if ($config['configuration_group_title'] != $current_group_title) {
    $current_group_title = $config['configuration_group_title'];
    echo "\n/**\n";
    echo " * $current_group_title\n";
    echo " */\n";
    }
    echo "define('" . ($config['configuration_key'] . "','" . $config['configuration_value'] . "'); //" . str_replace("\n", ' ', $config['configuration_title']) . "\n");
    }
    ?>
    </textarea>
    </div>
    <?php
    break;
    case 'categories_sites':
    if (!isset($_GET['mode']) || ($_GET['mode'] != 'save')) {
    ?>
    <div class="row">
    <div class="text-center">
    <h4><?php echo MULTISITE_CATEGORIE_TITLE; ?></h4>
    <p><?php echo MULTISITE_CATEGORIE_TEXT; ?></p>
    </div>
    <?php echo zen_draw_label(MULTISITE_CATEGORIE_ADD_LABEL, 'txt_site', ' class="control-label col-sm-3"'); ?>
    <div class="col-sm-9 col-md-6">
    <?php echo zen_draw_input_field('txt_site', '', 'id="txt_site" size="32" class="form-control"'); ?>
    </div>
    <div class="col-sm-offset-3 col-sm-9 col-md-6 text-right" style="margin-top: 5px;">
    <button type="button" onclick="add_to_all_cats()" class="btn btn-default"><?php echo MULTISITE_BUTTON_ADD_ALL; ?></button>
    <button type="button" onclick="remove_from_all_cats()" class="btn btn-default"><?php echo MULTISITE_BUTTON_REMOVE_ALL; ?></button>
    <span class="help-block"><?php echo MULTISITE_CATEGORIE_REMINDER_TEXT; ?></span>
    </div>
    <?php
    $multisite_category_tree = zen_get_category_tree();
    //print_r($multisite_category_tree);exit;
    $multisite_list = array();
    if (isset($_GET['site'])) {
    $filter = ' AND cd.categories_description LIKE "%-' . $_GET['site'] . '-%" ';
    $site_param = '&amp;site=' . $_GET['site'];
    } else {
    $filter = '';
    $site_param = '';
    }
    $total_cats = sizeof($multisite_category_tree) - '1';
    foreach ($multisite_category_tree as $multisite_key => $multisite_category) {
    if ($multisite_category['id'] == '0') {
    unset($multisite_category_tree[$multisite_key]); //remove the top category
    } else {
    $multisite_query = $db->Execute("SELECT cd.categories_description,c.categories_status
    FROM " . TABLE_CATEGORIES_DESCRIPTION . " cd
    INNER JOIN " . TABLE_CATEGORIES . " c ON cd.categories_id = c.categories_id
    WHERE c.categories_id = " . $multisite_category['id'] . "
    " . $filter);
    $sites = array();
    if ($multisite_query->EOF) {
    unset($multisite_category_tree[$multisite_key]);
    } else {
    foreach ($multisite_query as $item) {
    $multisite_cat_desc = $item['categories_description'];
    preg_match_all('/<!--(.|\s)*?-->/', $multisite_cat_desc, $multisite_comments, PREG_PATTERN_ORDER);
    $multisite_cat_sites = array();
    foreach ($multisite_comments['0'] as $multisite_comment) {
    this is line 209 -----> $multisite_comment = preg_replace('/\s\s+|/', '', $multisite_comment);
    $multisite_cat_sites[] = substr($multisite_comment, 4, sizeof($multisite_comment) - 4); //remove html comment
    }
    //Add to the list of all sites
    $multisite_cat_sites = implode('-', $multisite_cat_sites);
    $new_sites = explode('-', $multisite_cat_sites);
    foreach ($new_sites as $site) {
    if ($site != '') {
    $sites[$site] = '1';
    }
    }
    }
    //print_r($sites);exit;
    ksort($sites);
    $multisite_cat_sites = array();
    foreach ($sites as $site => $value) {
    $multisite_cat_sites[] = $site;
    }
    $multisite_category_tree[$multisite_key]['sites'] = implode('-', $multisite_cat_sites);
    $multisite_category_tree[$multisite_key]['status'] = $multisite_query->fields['categories_status'];
    $multisite_category_tree[$multisite_key]['cPath_parent'] = MultisiteGetcPath($multisite_category['id']);
    if ($multisite_category_tree[$multisite_key]['cPath_parent'] == '0') {
    $multisite_category_tree[$multisite_key]['cPath'] = $multisite_category['id'];
    } else {
    $multisite_category_tree[$multisite_key]['cPath'] = $multisite_category_tree[$multisite_key]['cPath_parent'] . '_' . $multisite_category['id'];
    }
    foreach ($sites as $site => $value) {
    if (!isset($multisite_list[$site])) {
    $multisite_list[$site] = '1';
    } else {
    $multisite_list[$site] ++;
    }
    }
    }
    }
    }
    arsort($multisite_list);
    $display_sites = array();
    $display_sites[] = '<a href="' . zen_href_link(FILENAME_MULTISITE, 'action=' . $action) . '" class="btn btn-default btn-sm" role="button">' . MULTISITE_CATEGORIE_ALL_TEXT . '</a> (' . $total_cats . ')';
    foreach ($multisite_list as $site => $cat_number) {
    $display_sites[] = '<a href="' . zen_href_link(FILENAME_MULTISITE, 'action=' . $action . '&site=' . $site) . '" class="btn btn-default btn-sm" role="button">' . $site . '</a> (' . $cat_number . ')';
    }
    ?>
    <div class="col-sm-12 text-center">
    <?php
    echo implode(' - ', $display_sites) . "<br><br>\n";
    ?>
    </div>
    <div class="col-sm-12">
    <?php echo zen_draw_form('save_multisite', FILENAME_MULTISITE, 'action=' . $action . '&mode=save' . $site_param, 'post', 'enctype="multipart/form-data" class="form-horizontal"'); ?>
    <div class="form-group text-right">
    <button type="submit" class="btn btn-primary"><?php echo IMAGE_SAVE; ?></button>
    </div>
    <table class="table table-striped">
    <thead>
    <tr>
    <th><?php echo TABLE_HEADING_MULTISITE_CATEGORIE; ?></th>
    <th><?php echo TABLE_HEADING_MULTISITE_SITE; ?></th>
    <th><?php echo TABLE_HEADING_ACTION; ?></th>
    </tr>
    </thead>
    <tbody>
    <?php
    foreach ($multisite_category_tree as $multisite_category) {
    ?>
    <tr>
    <td>
    <a href="<?php echo zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $multisite_category['cPath']); ?>">
    <?php echo str_replace(' ', '&nbsp;', str_replace('&nbsp;&nbsp;&nbsp;', '_&nbsp;', $multisite_category['text'])); ?>
    </a>
    </td>
    <td>
    <?php echo zen_draw_input_field('site[' . $multisite_category['id'] . ']', $multisite_category['sites'], 'class="form-control"'); ?>
    </td>
    <td>

    <?php
    if ($multisite_category['status'] == '1') {
    ?>
    <a target="_blank" href="<?php echo zen_href_link(FILENAME_CATEGORIES, 'action=setflag_categories&flag=0&cID=' . $multisite_category['id'] . '&cPath=' . $multisite_category['cPath_parent']); ?>'"><?php echo zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON); ?></a>
    <?php
    } else {
    ?>
    <a target="_blank" href="<?php echo zen_href_link(FILENAME_CATEGORIES, 'action=setflag_categories&flag=1&cID=' . $multisite_category['id'] . '&cPath=' . $multisite_category['cPath_parent']); ?>"><?php echo zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF); ?></a>
    <?php
    }
    ?>
    &nbsp;<a href="<?php echo zen_href_link(FILENAME_CATEGORIES, 'action=edit_category&cPath=' . $multisite_category['cPath_parent'] . '&cID=' . $multisite_category['id']); ?>">
    <?php echo zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT); ?></a>
    </td>
    </tr>
    <?php
    }
    ?>
    </tbody>
    </table>
    <div class="form-group">
    <button type="submit" class="btn btn-primary"><?php echo IMAGE_SAVE; ?></button>
    </div>
    <?php echo '</form>'; ?>
    </div>
    <?php
    }
    ?>
    </div>
    <?php
    break;
    }
    }
    ?>
    <!-- body_text_eof //-->
    </div>
    <!-- body_eof //-->

    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    </body>
    </html>
    <?php
    require(DIR_WS_INCLUDES . 'application_bottom.php');
    )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))))))))
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  3. #3
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: MultiSite Module Support Thread

    I just tried on my test site, and can not replicate your error.
    In your post you say
    Code:
    <--heras, Kandi--->
    , this should be
    Code:
    <!--heras-Kandi--->
    Maybe that's where things go wrong?

  4. #4
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    you would not be able to because it is on the admin side. when I go to add a new photo for the categories.. the<!--heras-Kandi---> disappears.. and no photo will show.
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  5. #5
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    i made a small recording to show what is going on.https://youtu.be/g6-eAeYXIww
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  6. #6
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: MultiSite Module Support Thread

    Have tried using the plain text option, instead of ckEditor?

  7. #7
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    i have the lastest multi site
    and 157b running on my site need help fixing

    and i got this debugg error
    [11-Jun-2021 22:58:30 UTC] Request URI: /index.php?main_page=index&cPath=21_30, IP address: 66.249.65.243
    #1 include() called at [/includes/templates/kandi/templates/tpl_modules_product_listing.php:10]
    #2 require(/includes/templates/kandi/templates/tpl_modules_product_listing.php) called at [/includes/templates/kandi/templates/tpl_index_product_list.php:109]
    #3 require(/includes/templates/kandi/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:240]
    #4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/kandi/common/tpl_main_page.php:181]
    #5 require(/includes/templates/kandi/common/tpl_main_page.php) called at [/index.php:94]
    --> PHP Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /includes/modules/kandi/product_listing.php on line 145.




    and here it the modules/kandi/product_listing.php on line 145
    <?php
    /**
    * product_listing module
    *
    * @copyright Copyright 2003-2020 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: DrByte 2020 May 16 Modified in v1.5.7 $
    */
    if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
    }
    $show_submit = zen_run_normal();
    // bof multi site module
    $listing_split = new splitPageResults(cat_filter($listing_sql), MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
    // eof multi site module
    $zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows);
    $how_many = 0;

    $list_box_contents[0] = array('params' => 'class="productListing-rowheading"');

    $zc_col_count_description = 0;
    $lc_align = '';
    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
    switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_text = TABLE_HEADING_MODEL;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_text = TABLE_HEADING_PRODUCTS;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $lc_text = TABLE_HEADING_MANUFACTURER;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_text = TABLE_HEADING_PRICE;
    $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_text = TABLE_HEADING_QUANTITY;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_text = TABLE_HEADING_WEIGHT;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_text = TABLE_HEADING_IMAGE;
    $lc_align = 'center';
    $zc_col_count_description++;
    break;
    }

    if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
    $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
    }



    $list_box_contents[0][$col] = array('align' => $lc_align,
    'params' => 'class="productListing-heading"',
    'text' => $lc_text );
    }

    if ($listing_split->number_of_rows > 0) {
    $rows = 0;
    $listing = $db->Execute($listing_split->sql_query);
    $extra_row = 0;
    while (!$listing->EOF) {
    $rows++;

    if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
    $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
    } else {
    $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
    }

    $cur_row = sizeof($list_box_contents) - 1;

    $linkCpath = $listing->fields['master_categories_id'];
    if (!empty($_GET['cPath'])) $linkCpath = $_GET['cPath'];
    if (!empty($_GET['manufacturers_id']) && !empty($_GET['filter_id'])) $linkCpath = $_GET['filter_id'];

    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
    $lc_align = '';
    switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_align = '';
    $lc_text = $listing->fields['products_model'];
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_align = '';
    $lc_text = '<h3 class="itemTitle">
    <a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>
    </h3>
    <div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listi ng->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $lc_align = '';
    $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    $lc_align = 'right';
    $lc_text = $lc_price;

    // more info in place of buy now
    $lc_button = '';
    if (zen_requires_attribute_selection($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
    $lc_button = '<a class="list-more" href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
    } else {
    if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
    if (
    // not a hide qty box product
    $listing->fields['products_qty_box_status'] != 0 &&
    // product type can be added to cart
    zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
    &&
    // product is not call for price
    $listing->fields['product_is_call'] == 0
    &&
    // product is in stock or customers may add it to cart anyway
    ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
    $how_many++;
    }
    // hide quantity box
    if ($listing->fields['products_qty_box_status'] == 0) {
    $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
    } else {
    $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . '<input type="text" name="products_id[' . $listing->fields['products_id'] . ']" value="0" size="4" aria-label="' . ARIA_QTY_ADD_TO_CART . '">';
    }
    } else {
    // qty box with add to cart button
    if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
    $lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" aria-label="' . ARIA_QTY_ADD_TO_CART . '"><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
    } else { <----- line 145
    $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
    }
    }
    }

    $zco_notifier->notify('NOTIFY_MODULES_PRODUCT_LISTING_PRODUCTS_BUTTON', array(), $listing->fields, $lc_button);

    $the_button = $lc_button;
    $products_link = '<a class="" href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
    $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
    $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_align = 'right';
    $lc_text = $listing->fields['products_quantity'];
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_align = 'right';
    $lc_text = $listing->fields['products_weight'];
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_align = 'center';
    if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
    $lc_text = '';
    } else {
    $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($linkCpath) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
    }
    break;
    }

    $list_box_contents[$rows][$col] = array('align' => $lc_align,
    'params' => 'class="productListing-data"',
    'text' => $lc_text);
    }

    $listing->MoveNext();
    }
    $error_categories = false;
    } else {
    $list_box_contents = array();

    $list_box_contents[0] = array('params' => 'class="productListing-odd"');
    $list_box_contents[0][] = array('params' => 'class="productListing-data"',
    'text' => TEXT_NO_PRODUCTS);

    $error_categories = true;
    }

    if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) {
    $show_top_submit_button = true;
    } else {
    $show_top_submit_button = false;
    }
    if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) {
    $show_bottom_submit_button = true;
    } else {
    $show_bottom_submit_button = false;
    }

    $zco_notifier->notify('NOTIFY_PRODUCT_LISTING_END', $current_page_base, $list_box_contents, $listing_split, $show_top_submit_button, $show_bottom_submit_button, $show_submit, $how_many);

    if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) {
    // bof: multiple products
    echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product', $request_type), 'post', 'enctype="multipart/form-data"');
    }
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  8. #8
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    This is the debug file
    Code:
    [23-Jun-2021 04:42:30 UTC] Request URI: /index.php?main_page=index&cPath=21_30, IP address: 24.113.223.101
    #1 include() called at [/includes/templates/kandi/templates/tpl_modules_product_listing.php:10]
    #2 require(/includes/templates/kandi/templates/tpl_modules_product_listing.php) called at [/includes/templates/kandi/templates/tpl_index_product_list.php:109]
    #3 require(/includes/templates/kandi/templates/tpl_index_product_list.php) called at [/includes/modules/pages/index/main_template_vars.php:240]
    #4 require(/includes/modules/pages/index/main_template_vars.php) called at [/includes/templates/kandi/common/tpl_main_page.php:181]
    #5 require(/includes/templates/kandi/common/tpl_main_page.php) called at [/index.php:94]
    --> PHP Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /includes/modules/kandi/product_listing.php on line 145.
    and this is line 145.. for the life of me i don't know where to put the ()

    Code:
     $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
    thank you in advanced
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  9. #9
    Join Date
    Sep 2010
    Posts
    13
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    this is probly the lamest question but.. How do i Triger the diff sites? I have followed the instructions (I think) I have 2 domains the initial install on 1 and the other to Triger the second store. I have done a domain redirect but all that comes up is the first store. how do i set up domain 2 to triger site 2?

  10. #10
    Join Date
    Mar 2004
    Posts
    210
    Plugin Contributions
    0

    Default Re: MultiSite Module Support Thread

    Quote Originally Posted by MrAliKorn View Post
    this is probly the lamest question but.. How do i Triger the diff sites? I have followed the instructions (I think) I have 2 domains the initial install on 1 and the other to Triger the second store. I have done a domain redirect but all that comes up is the first store. how do i set up domain 2 to triger site 2?
    ok whos your hosting company.. I need to know this to help you. do you have cpanel? the place you uploaded your store
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 WorldPay Module version 3.0 - Support thread
    By countrycharm in forum Addon Payment Modules
    Replies: 116
    Last Post: 31 Dec 2025, 11:36 AM
  2. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  3. WorldPay Module version 2.0 - Support thread
    By philip_clarke in forum Addon Payment Modules
    Replies: 729
    Last Post: 4 Nov 2017, 08:23 AM
  4. PC Configurator Module [Support Thread]
    By lebrand2006 in forum All Other Contributions/Addons
    Replies: 254
    Last Post: 22 Aug 2012, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg