I sure hope I'm not driving you crazy.....
Ok, I took that out of usps.php AND flat.php, and for now I'm working on Flat.
I feel like I'm onto something, but may have the parentheses wrong, something is wrong, but I'm starting to understand this a bit!
I realized I had to give flat.php more instructions so it will really know when to use it and when to not:
PHP Code:
global $cart;
// check for manufacturer id alchemy
if (IS_ADMIN_FLAG == false) {
$chk_manufacturer = $_SESSION['cart']->in_cart_check('manufacturers_id','1');
}
// disable if no alchemy products in cart
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('manufacturers_id','1') == 0)) {
// hide FLAT
$this->enabled = false;
}
// disable if there are weighted products
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_weight') > 0)) {
// hide FLAT
$this->enabled = false;
}
// enable if total product weight is 0 AND there are alchemy products
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_weight') == 0)) && (('manufacturers_id','1') > 0)) {
// show FLAT
$this->enabled = true;
}
Bookmarks