OK so looking at
$this->add_prod_to_prod(6753, 6744, 'X', 0);
if you're on 6753 you don't want to show 6744 if it's sold out, right? Then go to includes/modules/order_total/ot_better_together.php and modify the function get_xsell_info(). The block you want is on 676-682 of the latest update.
Before
Code:
if ($match == 1) {
$info['image'] = $second_image;
$info['link'] = $disc_href;
$info['ident'] = $li->ident2;
$info['name'] = $name;
$response_arr[] = $info;
}
add this block of code
Code:
// Don't display out of stock products for xsell if not purchaseable
if ( ($match == 1) &&
(($li->flavor == PROD_TO_PROD) || ($li->flavor == CAT_TO_PROD)) ) {
if ( (zen_get_products_stock($li->ident2) <= 0) &&
(STOCK_ALLOW_CHECKOUT == 'false') ) {
continue;
}
}
Bookmarks