You can customize the Free Shipping Options freeoptions by customizing the code around line 77 ...
/includes/modules/shipping/freeoptions.php
For example, if you wanted products_id 6 and 12 to not be used in the calculation you can use the code in RED:
Code:
//bof: reduce price for products_id 6 and 12
// disabled if nothing validates for total, weight or item
if ($this->enabled) {
global $cart;
$products = $_SESSION['cart']->get_products();
//echo '<pre>'; echo var_dump($products); echo '</pre>' . '<br><br>';
$reduce_price = 0;
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
//echo 'Products ID: ' . $products[$i]['id'] . ' Price: ' . $products[$i]['final_price'] * $products[$i]['quantity'] . ' name: ' . $products[$i]['name'] . ' categories_id: ' . $products[$i]['category'] . ' categories_name: ' . zen_get_categories_name($products[$i]['category']) . '<br>';
if ($products[$i]['id'] == 6 || $products[$i]['id'] == 12) {
$reduce_price += ($products[$i]['final_price'] * $products[$i]['quantity']);
}
}
//echo 'Reduce Price: ' . $reduce_price . '<br>';
if ($this->ck_freeoptions_total) {
switch (true) {
case ((MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN !='' and MODULE_SHIPPING_FREEOPTIONS_TOTAL_MAX !='')):
// free shipping total should not need adjusting
// if (($_SESSION['cart']->show_total() - $reduce_price - $_SESSION['cart']->free_shipping_prices()) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN and ($_SESSION['cart']->show_total() - $reduce_price - $_SESSION['cart']->free_shipping_prices()) <= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MAX) {
if (($_SESSION['cart']->show_total() - $reduce_price) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN and ($_SESSION['cart']->show_total() - $reduce_price) <= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MAX) {
$this->ck_freeoptions_total = true;
} else {
$this->ck_freeoptions_total = false;
}
break;
case ((MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN !='')):
// if (($_SESSION['cart']->show_total() - $reduce_price - $_SESSION['cart']->free_shipping_prices()) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) {
if (($_SESSION['cart']->show_total() - $reduce_price) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) {
$this->ck_freeoptions_total = true;
} else {
$this->ck_freeoptions_total = false;
}
break;
case ((MODULE_SHIPPING_FREEOPTIONS_TOTAL_MAX !='')):
// if (($_SESSION['cart']->show_total() - $reduce_price - $_SESSION['cart']->free_shipping_prices()) <= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MAX) {
if (($_SESSION['cart']->show_total() - $reduce_price) <= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MAX) {
$this->ck_freeoptions_total = true;
} else {
$this->ck_freeoptions_total = false;
}
break;
}
}
//eof: reduce price for products_id 6 and 12