OK, here is some bs for you.
What it does:
If everything in the cart is from the category where your items that can be shipped via media mail are, the media mail option will be shown.
If there are any items from other categories, the media mail option is NOT shown.
Please make the edits carefully.
To the top of your usps.php file, add:
Code:
// Kiddos media mail hack
$show_mediaMail = TRUE; // assume media mail is OK
if (!defined('IS_ADMIN_FLAG'))
{
$s_cart = $_SESSION['cart']->get_products();
// now look for reasons to not use media mail
foreach($s_cart as $cartitem)
{
if($cartitem['category'] != '2') // change "2" to your media mail OK category
{
$show_mediaMail = FALSE;
}
}
}
Now find a line that says:
Code:
function usps() {
global $order, $db, $template, $current_page_base
and change it to:
Code:
function usps() {
global $order, $db, $template, $current_page_base, $show_mediaMail;
then find:
Code:
$this->types = array('EXPRESS' => 'Express Mail',
'FIRST CLASS' => 'First-Class Mail',
'PRIORITY' => 'Priority Mail',
'PARCEL' => 'Parcel Post',
'MEDIA' => 'Media Mail',
'BPM' => 'Bound Printed Matter',
'LIBRARY' => 'Library'
);
and REPLACE it with:
Code:
if($show_mediaMail)
{
$this->types = array('EXPRESS' => 'Express Mail',
'FIRST CLASS' => 'First-Class Mail',
'PRIORITY' => 'Priority Mail',
'PARCEL' => 'Parcel Post',
'MEDIA' => 'Media Mail',
'BPM' => 'Bound Printed Matter',
'LIBRARY' => 'Library'
);
} else
{
$this->types = array('EXPRESS' => 'Express Mail',
'FIRST CLASS' => 'First-Class Mail',
'PRIORITY' => 'Priority Mail',
'PARCEL' => 'Parcel Post',
'BPM' => 'Bound Printed Matter',
'LIBRARY' => 'Library'
);
}
Now you will have much joy.
Please make a backup of your usps.php file before editing it.
If you are not so cozy editing, I can send you a copy of usps.php with this plus the current updates and patches.