/includes/init_includes/init_cart_handler.php has this:
Code:
if (DISPLAY_CART == 'true') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
} else {
$goto = $_GET['main_page'];
if ($_GET['action'] == 'buy_now') {
$parameters = array('action', 'products_id');
} else {
$parameters = array('action', 'pid', 'main_page');
}
}
If you change it to the following, you can probably accomplish what you're after:
Code:
$prod_type = 0;
$sql = "select products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$_GET['products_id'] . "'";
$zp_type = $db->Execute($sql);
if ($zp_type->RecordCount() != 0) {
$prod_type = $zp_type->fields['products_type'];
}
if (DISPLAY_CART == 'true' || in_array($prod_type, array(1, 2, 3))) {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
} else {
$goto = $_GET['main_page'];
if ($_GET['action'] == 'buy_now') {
$parameters = array('action', 'products_id');
} else {
$parameters = array('action', 'pid', 'main_page');
}
}
where 1,2,3 is a comma-separated list of product-type numbers for which you want it to go to the shopping cart even though the admin setting is set at false.
Bookmarks