You could customize the FREE SHIPPING freeshipper and Flat Rate flat shipping modules ...
Let's assume the Tube Products are products_id 193, 194, 195 and 196 ...
Edit the file:
/includes/modules/shipping/flat.php
and add the code in red:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
// bof: show if products_id 193, 194, 195 or 196 are in the cart
if (!IS_ADMIN_FLAG) {
global $cart;
$chk_products_in_cart = 0;
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '192');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '193');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '194');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '195');
$full_count = $_SESSION['cart']->count_contents();
if ($chk_products_in_cart > 0 && $full_count == $chk_products_in_cart) {
$this->enabled = true;
} else {
$this->enabled = false;
}
}
// eof: show if products_id 193, 194, 195 or 196 are in the cart
if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
Then, customize the file:
/includes/modules/shipping/freeshipper.php
Code:
// enable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FREESHIPPER_STATUS == 'True') ? true : false);
}
// bof: do not show if products_id 193, 194, 195 or 196 are in the cart
if (!IS_ADMIN_FLAG) {
global $cart;
$chk_products_in_cart = 0;
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '192');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '193');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '194');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '195');
if ($chk_products_in_cart > 0) {
$this->enabled = false;
}
}
// eof: do not show if products_id 12, 22, 27 or 122 are in the cart
if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREESHIPPER_ZONE > 0) ) {
Now set the Flat Rate shipping rate to the cost for the Tube Products ...
If you want to use USPS so that you have the USPS shipping rate for 0.9 to obtain all of the methods, you could customize that for the file:
/includes/modules/shipping/usps.php
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
}
// bof: show if products_id 193, 194, 195 or 196 are in the cart
if (!IS_ADMIN_FLAG) {
global $cart;
$chk_products_in_cart = 0;
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '192');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '193');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '194');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '195');
if ($chk_products_in_cart > 0) {
$this->enabled = true;
}
}
// eof: adjust weight if products_id 193, 194, 195 or 196 are in the cart
if ($this->enabled) {
Then change the code:
Code:
// usps doesnt accept zero weight send 1 ounce (0.0625) minimum
$usps_shipping_weight = ($shipping_weight <= 0.0 ? 0.0625 : $shipping_weight);
// bof: show if products_id 193, 194, 195 or 196 are in the cart
if (!IS_ADMIN_FLAG) {
global $cart;
$chk_products_in_cart = 0;
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '192');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '193');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '194');
$chk_products_in_cart += $_SESSION['cart']->in_cart_check('products_id', '195');
if ($chk_products_in_cart > 0) {
if ($shipping_weight <= 0.0) {
$usps_shipping_weight = 0.9;
} else {
$usps_shipping_weight += 0.9;
}
}
}
// eof: adjust weight if products_id 193, 194, 195 or 196 are in the cart
$shipping_pounds = floor ($usps_shipping_weight);