Well I have a custom shipping option installed, which as far as I knew worked great, until today, when a customer tried the shipping estimator and received a fatal error. Unfortunately, I can't find the guy who wrote it, so I'm really hoping someone can perhaps see an obvious error.
Here is a link to a product just so you can try:
http://transportation.actionforms.ca...oducts_id=2002
The error received is:
Fatal error: Cannot use object of type shoppingCart as array in /home/actforms/public_html/cart/includes/modules/shipping/canpar.php on line 187
And this is the snip of code that is in that area:
It works just fine to actually place an order, just a problem with the estimator. Any help would be appreciated!!!Code:$itemCount = 0; $totalWeight = 0; if (count($order->products) > 0) { foreach ($order->products as $pkey=>$pval) { $totalWeight = $totalWeight + ($pval['weight'] * $pval['qty']); $itemCount++; } } else { if (array_key_exists("cart", $_SESSION) && count($_SESSION['cart']['contents']) > 1) { // this might be the shipping estimator foreach ($_SESSION['cart']['contents'] as $pkey=>$pval) { $totalWeight = $totalWeight + ($pval['weight'] * $pval['qty']); $itemCount++; } } else { // return $this->error("You have no items in your cart."); return $this->error(MODULE_SHIPPING_CANPAR_TEXT_LOGIN); } }


Reply With Quote
