Quote Originally Posted by bonnit View Post
hi, i've recently installed ultimate cross sell, couldn't get the other mod working
I've installed ultimate_cross_sell too, but i've many problems to replace it with the original cross sell.

in

includes/modules/tabbed_products_pro.php

i've replaced:

PHP Code:
//Check if CrossSell contrib is installed and enabled to create its tab data
      
if (file_exists(DIR_WS_MODULES 'xsell_products.php') or file_exists(DIR_WS_MODULES $template_dir '/' 'xsell_products.php')) {
            
$bCrossSell_Tab strpos($proddata"<!--#CrossSell#-->");
            if (
$bGblCrossSell_Tab == true && $IgnoreGlobals === false) {
                
$bCrossSell_Tab 1;
            }
        } else {
            
$bCrossSell_Tab 0;
        } 
with

PHP Code:
//Check if CrossSell contrib is installed and enabled to create its tab data
//        if (file_exists(DIR_WS_MODULES . 'xsell_products.php') or file_exists(DIR_WS_MODULES . $template_dir . '/' . 'xsell_products.php')) { 
      
if (file_exists(DIR_WS_MODULES 'ultimate_cross_sell_products.php') or file_exists(DIR_WS_MODULES $template_dir '/' 'ultimate_cross_sell_products.php')) {
            
$bCrossSell_Tab strpos($proddata"<!--#CrossSell#-->");
            if (
$bGblCrossSell_Tab == true && $IgnoreGlobals === false) {
                
$bCrossSell_Tab 1;
            }
        } else {
            
$bCrossSell_Tab 0;
        } 
and

PHP Code:
if ($bCrossSell_Tab != 0) {
                
$xsell_query $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
                                     from " 
TABLE_PRODUCTS_XSELL " xp, " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd
                                     where xp.products_id = '" 
$_GET['products_id'] . "'
                                      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
                                     order by xp.sort_order asc limit " 
MAX_DISPLAY_XSELL);
                
$num_products_xsell $xsell_query->RecordCount();

          if (
$num_products_xsell != 0) {
                    
$tabstrip .= "\n" '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cross_sell_tab_name.'</span></a></li>' "\n";
                    
$g++;
                }
            } 
with

PHP Code:
if ($bCrossSell_Tab != 0) {
            
/*    $xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
                                     from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                     where xp.products_id = '" . $_GET['products_id'] . "'
                                      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
                                     order by xp.sort_order asc limit " . MAX_DISPLAY_XSELL);
                $num_products_xsell = $xsell_query->RecordCount();      */
          
        
  
$cross_sell_sort_by CROSS_SELL_SORT_ORDER $mxsell=="sort_order"?" order by xp.sort_order asc "" order by rand() ";
  
$cross_sell_query $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
  from " 
TABLE_PRODUCTS_CROSS_SELL $cross_sell " xp, " .
  
TABLE_PRODUCTS " p, " .
  
TABLE_PRODUCTS_DESCRIPTION " pd
  where xp.products_id = '" 
$_GET['products_id'] . "'
  and xp.cross_sell_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 " constant(MAX_DISPLAY_CROSS_SELL $cross_sell) );    
  
$num_ultimate_cross_sell $cross_sell_query->RecordCount();
                  
        
//        if ($num_products_xsell != 0) {
          
if ($num_ultimate_cross_sell != 0) {
                    
$tabstrip .= "\n" '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cross_sell_tab_name.'</span></a></li>' "\n";
                    
$g++;
                }
            } 
at last

PHP Code:
// Pre-load Cross Sell
        
if ($bCrossSell_Tab != && $num_products_xsell != 0) {
                
ob_start();
'tpl_modules_xsell_products.php');
          require(
$template->get_template_dir('tpl_modules_xsell_products.php'DIR_WS_TEMPLATE$current_page_base,'templates'). '/' 'tpl_modules_xsell_products.php'); 'tpl_modules_ultimate_cross_sell_products.php'); 
with

PHP Code:
// Pre-load Cross Sell
         // if ($bCrossSell_Tab != 0 && $num_products_xsell != 0) {
        
if ($bCrossSell_Tab != && $num_ultimate_cross_sell != 0) {
                
ob_start();
        
//    require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php');
          
require($template->get_template_dir('tpl_modules_ultimate_cross_sell_products.php'DIR_WS_TEMPLATE$current_page_base,'templates'). '/' 'tpl_modules_ultimate_cross_sell_products.php'); 
I've no php errors but tpl_product_info_display page is "empty", any help?