Hi mc
Thanks for your reply and help.
If I can explain what I'm trying to achieve here: Ok the two categories I would like the mileage shipping assigned to with are ids 78 and 60. category id 57 normal shipping applies.
I have the following code in mileageship.php:
Code:
// bof enable only for certain category in cart
if (IS_ADMIN_FLAG == false) {
if (($_SESSION['cart']->in_cart_check('master_categories_id','78') > 0) || ($_SESSION['cart']->in_cart_check('master_categories_id','60') > 0))
{
$this->enabled = true;
} else {
$this->enabled = false;
}
}
// eof enable only for certain category in cart
The other module I have is perweightunit.php and for this I have the code as:
Code:
// bof disable only for certain category in cart
if (IS_ADMIN_FLAG == false) {
if (($_SESSION['cart']->in_cart_check('master_categories_id','78') > 0) || ($_SESSION['cart']->in_cart_check('master_categories_id','60') > 0))
{
$this->enabled = false;
} else {
$this->enabled = true;
}
}
// eof disable only for certain category in cart
So when I make a purchase from the product in category id 57 category it shows the normal £20 shipping :
Attachment 17504
The product in category id 78 shows the per mileage delivery (as its meant to):
Attachment 17505
However for the product in category id 60 (bench module) instead of getting the per mileage delivery, I get the £20 unit price popping up:
We are nearly there, I just need to get these two categories using the mileage shipping
Bookmarks