We often run store wide sales but have to exclude certain products or categories. We have the xcart Special Offers module installed so I modified it to exclude the products that we don't want to have the sale applied to.
To do this open modules\Special_Offers\func.php and search for "case 'D':" and change it to:
Quote:
case 'D': # discount
if ($product_checked) {
if($product["discount_avail"] =="Y"){
if ($bonus['amount_type'] == '%') {
$discount = $product['price'] * $bonus['amount_min'] / 100.00;
$limit = price_format($bonus['amount_max']);
}
else {
$discount = price_format($bonus['amount_min']);
$limit = price_format($product['price'] * $bonus['amount_max'] / 100.00);
}
if ($discount > $limit && $limit !== '0.00') {
$discount = $limit;
}
if ($discount > $product['price']) {
$discount = $product['price'];
}
$apply['discount'] = max($apply['discount'], $discount);
}
}
|
Now any product that you want to exclude from a site wide sale in Special Offers just uncheck the "Apply Global Discounts" box in the Product Admin page.
If you have a ton of products from one company that you want to exclude and have access to php_myadim you can run the following script to update them (just add whatever your table prefix is and put in the company name
Quote:
update products set discount_avail = "N" where companyname = ""
|