Think I posted this in the wrong section.
Anyway, I have figured out a solution which appears to work.
In the relevant postage section (rm2ndlargeletter.php) I added the following lines:
Code:
Just after the global $order, $total_weight ;
$query = 'SELECT products_options_value_id FROM customers_basket_attributes WHERE products_options_value_id >= 74';
$this->prod_attrib = mysql_query($query);
and further down after } // end of looping through
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_type','2') > 0))
{
$this->enabled = false;
return ;
}
elseif(mysql_num_rows($this->prod_attrib)!=0){
$this->enabled = false;
}else{
// Enable option otherwise
$this->enabled = true;
}
return ;
That takes into account the product type of 2, then does a query on the basket to see if there are any items with the attributes of >73 which for me means gift boxes. If so, de-activates this shipping method.
The same code needs inserting into the rm2ndpacket.php but changing the false to true and the true to false.
Similare is done for signed for and 1st class.
Maybe not the best way to do it but then, I am no PHP programmer :).
Thought I would share that incase anyone could use it or improve on it.
Bookmarks