Zen Follower
- Join Date:
- Apr 2010
- Location:
- Albuquerque, NM
- Posts:
- 198
- Plugin Contributions:
- 0
Customized shipping modules not working after upgrade
Hello. So a while back Ajeh patiently helped me customize my USPS and flat rate module files so that if a certain product were in my cart a flat fee would be added in addition to any other shipping fee for the regular products, and it was working out.
A few months ago I upgraded to 1.3.9h, and I've just gotten around to testing out the checkout process, and now if I have one of these special products in the cart that would trigger the added flat rate, it just goes to a blank page and shows the paragraph I had written in to explain the flat fee. There's no way to continue, so no way to check out. I'm attaching a screen shot of what it looks like. If I remove this product and just have regular USPS triggered, it works as it should, it calculates the shipping charge by weight and there are no errors in the checkout process.
I looked at my debug logs and it says this:
[22-May-2011 14:27:01] PHP Warning: Cannot modify header information - headers already sent by (output started at ....../store/includes/modules/shipping/usps.php:276) in ..../store/includes/functions/functions_general.php on line 45
Here is line 276 in usps.php, it is part of the customized code:
global $cart;
//check if manufacturer alchemy is in cart
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('manufacturers_id','1') > 0)); {
$manufacturer_alchemy = $_SESSION['cart']->in_cart_check('manufacturers_id','1');
$drop_ship_extra_charge = $manufacturer_alchemy;
}
// charge dropship fee for alchemy
if ($drop_ship_extra_charge > 0) {
$cat_extra_charge = 5;
echo '<br /><font color="#660000" size="2"><em>A flat $5 shipping fee to cover all Alchemy items in your cart has been added to the shipping quote below. Please note that Alchemy products ordered from Black Orchid Couture can only be shipped to addresses in the United States. All Alchemy products are special ordered from England and will be mailed to you separate from any other items in your order, and will take between 2-3 weeks to be delivered.</em></font>';
} else {
$cat_extra_charge = 0;
}
$methods = array();
$size = sizeof($uspsQuote);
for ($i=0; $i<$size; $i++) {
list($type, $cost) = each($uspsQuote[$i]);
The question is, did some part of the usps.php code change that would interfere with the custom code above? Or maybe I made a mistake in transfering it to the new code? I'm just not sure how to interpret the error log, I looked at the other file (functions_general.php) and there is no custom code in there. I just don't know how to fix this other than installing the usps.php fresh and starting over trying to figure out how to customize it.
Thanks for any help!!!!