Re: USPS shipping module...trying to restrict shipping options programmatically
Quote:
Originally Posted by
lat9
Thanks for the clarification! You can use the following code in that auto-loaded observer:
Code:
case 'NOTIFY_USPS_UPDATE_OR_DISALLOW_TYPE':
// -----
// Disallow "Ground Advantage" if there are no products with a tax_class_id of 4
// in the cart.
//
if (stripos($p1, 'USPS Ground Advantage') !== false) {
if ($_SESSION['cart']->in_cart_check('products_tax_class_id', '4') == 0) {
$p2 = false;
}
}
break;
Worked like a charm--thank you!
Re: USPS shipping module...trying to restrict shipping options programmatically
@lat9--sorry, quick follow up question. Is there an easy way to change the display name of the shipping service? Right now it shows up as USPS Ground Advantage. Because of how I have my shipping options set up/combined, I'd like for it to just say Ground Advantage. I believe the module is pulling this info direct from USPS and didn't see a language file unless I missed one? Thanks again!