Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FAST EASY CROSS-SELL - Help needed


angel68

Recommended Posts

I have installed Fast Easy Cross-Sell => http://www.oscommerce.com/community/contributions,4408

but have not been able to find a support link. Has anyone installed this? The contribution works fine except that the cross sell product appears twice in the Admin section when added (but appears once in the catalog) and if I click on the Delete button in the Admin to remove the extra listing, both the listings are removed at the same time. Any help appreciated.

Thanks.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...
Does anyone know how to set Fast Easy Cross-Sell with Simple Template System (STS)?

 

I figured it out:

 

Open:

catalog/includes/modules/sts_inc/product_info.php

 

Find:

 

$sts->stop_capture ('alsopurchased'); // Get the result to the main array

$template_pinfo['alsopurchased']= $sts->template['alsopurchased']; // Put it in the product info

 

Insert After:

 

// See if any "Cross Sell" items.

$sts->start_capture();

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_cross_sell(3600);

} else {

include(DIR_WS_MODULES . FILENAME_CROSS_SELL_PRODUCTS);

}

$sts->stop_capture ('crosssell'); // Get the result to the main array

$template_pinfo['crosssell']= $sts->template['crosssell']; // Put it in the product info

 

Now you can open the STS product template product_info.php.html and insert $crosssell$ as the placeholder for this contribution.

Link to comment
Share on other sites

  • 5 months later...

Hi,

 

Just installed the cross sell mod (1.1 20th July) and looks great.

One thing though, in admin when you view a products cross sold products it shows once for each language - so I get 4 products shown when I add 1.

 

It shows fine in the catalog, just duplicates in the admin - any ideas?

 

Does anyone else have this?

Link to comment
Share on other sites

.....

One thing though, in admin when you view a products cross sold products it shows once for each language - so I get 4 products shown when I add 1.

.......

 

Hi,

 

Please open admin/cross_sell.php

 

Search for function display_cross_sells($products_id, $products_model)

 

There must be SQL statement:

$cross_sell_sql = 'SELECT px.products_id, px.cross_sell_id, p.products_model, p.products_status, pd.products_name FROM ' . TABLE_PRODUCTS_CROSS_SELL . ' as px, ' . TABLE_PRODUCTS . ' as p, ' . TABLE_PRODUCTS_DESCRIPTION . ' as pd WHERE px.products_id = "' . $products_id . '" AND px.cross_sell_id = p.products_id AND p.products_id = pd.products_id';

 

 

Please add one condition into WHERE clause: ... AND pd.language_id = ' . $language . '

 

Or download the latest contribution I will post shortly

Link to comment
Share on other sites

Hi,

 

Please open admin/cross_sell.php

 

Search for function display_cross_sells($products_id, $products_model)

 

There must be SQL statement:

$cross_sell_sql = 'SELECT px.products_id, px.cross_sell_id, p.products_model, p.products_status, pd.products_name FROM ' . TABLE_PRODUCTS_CROSS_SELL . ' as px, ' . TABLE_PRODUCTS . ' as p, ' . TABLE_PRODUCTS_DESCRIPTION . ' as pd WHERE px.products_id = "' . $products_id . '" AND px.cross_sell_id = p.products_id AND p.products_id = pd.products_id';

Please add one condition into WHERE clause: ... AND pd.language_id = ' . $language . '

 

Or download the latest contribution I will post shortly

 

Hi,

 

I used this query, but just get an error. Could you show the full query?

$cross_sell_sql = 'SELECT px.products_id, px.cross_sell_id, p.products_model, pd.products_name FROM ' . TABLE_PRODUCTS_CROSS_SELL . ' as px, ' . TABLE_PRODUCTS . ' as p, ' . TABLE_PRODUCTS_DESCRIPTION . ' as pd WHERE px.products_id = "' . $products_id . '" AND pd.language_id = ' . $language . ' AND px.cross_sell_id = p.products_id AND p.products_id = pd.products_id';

 

Thanks

 

Floob.

Link to comment
Share on other sites

  • 4 years later...

Hi all

 

Just downloaded this addon yesterday, everything has installed fine, but as soon as i replace the code below, the product info pages simply will not display.

 

"catalog/product_info.php

 

FIND:

 

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

 

REPLACE WITH:

 

<?php

//*** <Cross-Sell Mod>

if ( (USE_CACHE == 'true') && !SID) {

echo tep_cache_cross_sell_products(3600);

echo '<br />';

//*** </Cross-Sell Mod>

echo tep_cache_also_purchased(3600);

} else {

//*** <Cross-Sell Mod>

include(DIR_WS_MODULES . FILENAME_CROSS_SELL_PRODUCTS);

echo '<br />';

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

//*** </Cross-Sell Mod>

}

}

?>"

 

The SQL installation is all done and no issue with that as far as am aware and all other files and code edits are done without problems, its just this one code change that causes problems.

 

I am using v2.3 of oscommerce - Any help would be greatly appreciated

Edited by Teaboy2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...