Page 43 of 48 FirstFirst ... 334142434445 ... LastLast
Results 421 to 430 of 476
  1. #421
    Join Date
    May 2009
    Posts
    1,238
    Plugin Contributions
    2

    Default Re: Multi Cross Sell mod [Support thread]

    Thank you.

  2. #422
    Join Date
    May 2009
    Posts
    1,238
    Plugin Contributions
    2

    Default Re: Multi Cross Sell mod [Support thread]

    Since I was translating this to Italian, I thought to edit YOUR_RENAMED_ADMIN/multi_xsell.php in order to make it easy for people to localize it by adding the defines.
    I attach a copy for you, if you think could be worth for the next update; in case double check the files - they do work on my Zen Cart.
    Attached Files Attached Files

  3. #423
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Multi Cross Sell mod [Support thread]

    Quote Originally Posted by keneso View Post
    Since I was translating this to Italian, I thought to edit YOUR_RENAMED_ADMIN/multi_xsell.php in order to make it easy for people to localize it by adding the defines.
    I attach a copy for you, if you think could be worth for the next update; in case double check the files - they do work on my Zen Cart.
    Thank You,
    I am working on a new version and will check out your suggestions.
    In the meantime it should help others that use more than one language.

  4. #424
    Join Date
    May 2009
    Posts
    1,238
    Plugin Contributions
    2

    Default Re: Multi Cross Sell mod [Support thread]

    In thes setup using this I have a superuser (administrator), and a second user profile, for the latter I have enabled the access to catalog>>cross sell, and configuration>>cross sell settings, but when trying to access catalog>>cross sell I get the following:
    "Sorry, your security clearance does not allow you to access this resource.
    Please contact your site administrator if you believe this to be incorrect.
    Sorry for any inconvenience."
    No problem in accessing configuration>>cross sell settings

    Thank you.

  5. #425
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Multi Cross Sell mod [Support thread]

    Quote Originally Posted by keneso View Post
    In thes setup using this I have a superuser (administrator), and a second user profile, for the latter I have enabled the access to catalog>>cross sell, and configuration>>cross sell settings, but when trying to access catalog>>cross sell I get the following:
    "Sorry, your security clearance does not allow you to access this resource.
    Please contact your site administrator if you believe this to be incorrect.
    Sorry for any inconvenience."
    No problem in accessing configuration>>cross sell settings

    Thank you.
    Also a bug (sort of) 1.5 changed the way some files are defined
    see post# 338

  6. #426
    Join Date
    May 2009
    Posts
    1,238
    Plugin Contributions
    2

    Default Re: Multi Cross Sell mod [Support thread]

    Thank you, I appreciate your patience.

  7. #427
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Multi Cross Sell mod [Support thread]

    I know a few people have asked how to get the cross sells to show in the shopping cart, so I thought I'd post a solution. I didn't write this from scratch, just made a few changes to an old mod (Upsells/Cross Sells in Shopping Cart). I've only tested this on v1.5.1.

    Create a new file: includes/modules/YOUR_TEMPLATE/cart_upsell.php with this code:
    <?php

    if (!defined('MAX_DISPLAY_XSELL')) define('MAX_DISPLAY_XSELL',6);
    if (!defined('MIN_DISPLAY_XSELL')) define('MIN_DISPLAY_XSELL',1);
    if (!defined('SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS')) define('SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS',3);

    if ($_SESSION['cart']->contents) {
    $i = 0;
    foreach($_SESSION['cart']->contents as $id => $qty) {
    $prod[$i] = zen_get_prid($id);
    $i++;
    }
    $cross_sell = 1;

    //check if cross_sell module installed
    if (@file_exists(DIR_WS_MODULES . zen_get_module_directory('multi_xsell_products.php'))) {
    $c = MAX_DISPLAY_XSELL;
    $num = round($c/sizeof($prod));
    $extra = $num + 1;
    $max = $c;
    for ($i = 0; $i < sizeof($prod); $i++) {
    if ($i < sizeof($prod) - 1) {
    $cross_sell_sort_by = XSELL_SORT_ORDER . $mxsell=="sort_order"?" order by xp.sort_order asc ": " order by rand() ";
    $cross_sell_query_raw .= "(select p.products_id, p.products_image
    from " . TABLE_PRODUCTS_MXSELL . $cross_sell . " xp, " .
    TABLE_PRODUCTS . " p, " .
    TABLE_PRODUCTS_DESCRIPTION . " pd
    where xp.products_id = '" . $prod[$i] . "'
    and xp.xsell_id = p.products_id
    and p.products_id = pd.products_id
    and pd.language_id = '" . $_SESSION['languages_id'] . "'
    and p.products_status = 1 " .
    $cross_sell_sort_by." limit " . MAX_DISPLAY_XSELL . ") UNION ";
    $c -= $num;
    } else {
    $c += 2;
    $cross_sell_sort_by = XSELL_SORT_ORDER . $mxsell=="sort_order"?" order by xp.sort_order asc ": " order by rand() ";
    $cross_sell_query_raw .= "(select p.products_id, p.products_image
    from " . TABLE_PRODUCTS_MXSELL . $cross_sell . " xp, " .
    TABLE_PRODUCTS . " p, " .
    TABLE_PRODUCTS_DESCRIPTION . " pd
    where xp.products_id = '" . $prod[$i] . "'
    and xp.xsell_id = p.products_id
    and p.products_id = pd.products_id
    and pd.language_id = '" . $_SESSION['languages_id'] . "'
    and p.products_status = 1 " .
    $cross_sell_sort_by." limit " . MAX_DISPLAY_XSELL . ")";
    }
    }

    $cross_sell_query = $db->Execute($cross_sell_query_raw);
    $db->Execute("create temporary table cross_sell ( products_id int(11), products_image varchar(64) )");
    while (!$cross_sell_query->EOF) {
    $db->Execute("insert into cross_sell values('" . $cross_sell_query->fields['products_id'] . "', '" . $cross_sell_query->fields['products_image'] . "')");
    $cross_sell_query->MoveNext();
    }
    for ($i = 0; $i < sizeof($prod); $i++) {
    $db->Execute("delete from cross_sell where products_id = '" . $prod[$i] . "'");
    }
    $cross_sell_query_final = "select * from cross_sell limit " . $max;
    $cross_sell_final = $db->Execute($cross_sell_query_final);
    $db->Execute("drop table cross_sell");
    $num_products_cross_sell = $cross_sell_final->RecordCount();
    if ($num_products_cross_sell >= MIN_DISPLAY_XSELL) {
    $row = 0;
    $col = 0;
    $list_box_contents = array();
    $title = '';

    if ($num_products_cross_sell < SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS==0) {
    $col_width = floor(100/$num_products_cross_sell);
    } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS);
    }
    while (!$cross_sell_final->EOF) {

    if (zen_has_product_attributes($cross_sell_final->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
    $lc_button = '<br /><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), '&products_id=' . $cross_sell_final->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a><br />';
    } else {
    $lc_button = '<br /><a href="' . zen_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' . $cross_sell_final->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>';
    }
    $cross_sell_final->fields['products_name'] = zen_get_products_name($cross_sell_final->fields['products_id']);
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsCrossSell centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => '<div class="listingProductImage" style="margin-top: 5px; margin-bottom: 5px;"><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), 'products_id=' . $cross_sell_final->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $cross_sell_final->fields['products_image'], $cross_sell_final->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>'. (constant(CROSS_SELL.$cross_sell._DISPLAY_NAME)=='true'? '<div class="itemTitle"><h4 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), 'products_id=' . $cross_sell_final->fields['products_id']) . '">' . $cross_sell_final->fields['products_name'] . '</a></h4></div>':'').(constant(CROSS_SELL.$cross_sell._DISPLAY_MODEL)=='true'? '<div class="itemModel"><h4 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), 'products_id=' . $cross_sell_final->fields['products_id']) . '">' . zen_products_lookup($cross_sell_final->fields['products_id'], 'products_model') . '</a></h4></div>':'').(constant(CROSS_SELL.$cross_sell._DISPLAY_PRICE)=='true'? '<div class="price">'.zen_get_products_display_price($cross_sell_final->fields['products_id']).'</div>':'') .(constant(CROSS_SELL.$cross_sell._DISPLAY_BUY_NOW)=='true'? '<div class="listingBuyNowButton">'.$lc_button.'</div>':'') );
    $col ++;
    if ($col > 2) {
    $col = 0;
    $row ++;
    }
    $cross_sell_final->MoveNext();
    }

    $cross_sell_data = $list_box_contents;
    ?>
    <br class="clearBoth">
    <div class="centerBoxWrapper" id="crossSell">

    <?php
    require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
    ?>
    </div>


    <?php
    }
    }
    }
    ?>
    Add this to your includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart.php file wherever you want the cross sells to show up:

    <?php require(DIR_WS_MODULES . zen_get_module_directory('cart_upsell.php')); ?>
    That's it!
    Last edited by Danielle; 28 Jan 2014 at 08:18 AM.
    Danielle

  8. #428
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Re: Multi Cross Sell mod [Support thread]

    What a great day. I've been searching for this fix for so long.
    Completely appreciate you taking the time to post this solution.
    (Might be good to pack for the Plugins section)

    Any idea how I might add a line of text above the xsells on the shopping cart page, that says "We thought you might like to add..."?
    I'm concerned people might think they're checking out with the item I'm recommending, instead of what they added to cart.
    Or even a horizontal rule to separate...

    Again, much appreciated!

  9. #429
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Multi Cross Sell mod [Support thread]

    Sure, just put this in the shopping_cart.tpl file:

    <h2>You May Also Like...</h2>
    <hr/>
    <?php require(DIR_WS_MODULES . zen_get_module_directory('cart_upsell.php')); ?>
    That's not the cleanest way to do it, but it will work for now. When I have a chance I will package it up as a mod and add language definitions, etc.

    Quote Originally Posted by mcpisik View Post
    What a great day. I've been searching for this fix for so long.
    Completely appreciate you taking the time to post this solution.
    (Might be good to pack for the Plugins section)

    Any idea how I might add a line of text above the xsells on the shopping cart page, that says "We thought you might like to add..."?
    I'm concerned people might think they're checking out with the item I'm recommending, instead of what they added to cart.
    Or even a horizontal rule to separate...

    Again, much appreciated!
    Danielle

  10. #430
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Re: Multi Cross Sell mod [Support thread]

    Brilliant :)

 

 
Page 43 of 48 FirstFirst ... 334142434445 ... LastLast

Similar Threads

  1. Cross Sell Advanced [Support Thread]
    By DivaVocals in forum Addon Admin Tools
    Replies: 162
    Last Post: 28 Jan 2025, 01:37 PM
  2. Ultimate Cross Sell [Support Thread]
    By ultimate_zc in forum All Other Contributions/Addons
    Replies: 239
    Last Post: 17 May 2015, 03:25 AM
  3. Just another Cross-Sell mod (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 702
    Last Post: 3 Nov 2012, 04:30 AM
  4. Multi cross sell mod
    By bonsey61 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 9 Oct 2010, 08:12 PM
  5. support for Cart Upsell/Cross Sell Mod
    By wagnerguy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 5 May 2009, 01:18 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR