goodsdealer Posted November 26, 2010 Share Posted November 26, 2010 Hi,basicly i got little problem with my cart.it displays this:Warning: Illegal offset type in isset or empty in /home/content/d/e/a/deadmouz/html/android/classes/Cart.php on line 820Warning: Illegal offset type in /home/content/d/e/a/deadmouz/html/android/classes/Cart.php on line 821Warning: Illegal offset type in /home/content/d/e/a/deadmouz/html/android/classes/Cart.php on line 822Hack attempt: "no default carrier"I found a right line but have no idea how to fix this . // If no carrier, select default one if (!$id_carrier) $id_carrier = $this->id_carrier; if (empty($id_carrier)) $id_carrier = Configuration::get('PS_CARRIER_DEFAULT'); if (!isset(self::$_carriers[$id_carrier])) self::$_carriers[$id_carrier] = new Carrier(intval($id_carrier)); $carrier = self::$_carriers[$id_carrier]; if (!Validate::isLoadedObject($carrier)) die(Tools::displayError('Hack attempt: "no default carrier"')); if (!$carrier->active) return $shipping_cost; // Get id zone anyone? Link to comment Share on other sites More sharing options...
tomerg3 Posted November 26, 2010 Share Posted November 26, 2010 Did you try to set a default carrier in the backoffice (Shipping->Carrier)? Link to comment Share on other sites More sharing options...
Rodolfo Posted March 10, 2011 Share Posted March 10, 2011 Hello, I have same problem...PS 1.2.5I have 5 carriers working properly, this happens with my 6th carrier, which I want to use for europe...I can't find the problem, and I have a default carrier, of course¡¡¡Thanks everybodyRODOLFO Link to comment Share on other sites More sharing options...
tomerg3 Posted March 10, 2011 Share Posted March 10, 2011 Un-comment the following line from /classes/Tools.php //d(debug_backtrace());That should display the full error Link to comment Share on other sites More sharing options...
Rodolfo Posted March 11, 2011 Share Posted March 11, 2011 Here you areRODOLFOWarning: Illegal offset type in isset or empty in /home/compraun/public_html/shop/classes/Cart.php on line 820Warning: Illegal offset type in /home/compraun/public_html/shop/classes/Cart.php on line 821Warning: Illegal offset type in /home/compraun/public_html/shop/classes/Cart.php on line 822Array( [0] => Array ( [file] => /home/compraun/public_html/shop/classes/Cart.php [line] => 824 [function] => displayError [class] => Tools [type] => :: [args] => Array ( [0] => Hack attempt: "no default carrier" ) ) [1] => Array ( [file] => /home/compraun/public_html/shop/classes/Cart.php [line] => 803 [function] => _getOrderShippingCost [class] => Cart [type] => -> [object] => Cart Object ( [id] => 3332 [id_address_delivery] => 0 [id_address_invoice] => 0 [id_currency] => 1 [id_customer] => 0 [id_guest] => 39668 [id_lang] => 3 [id_carrier] => 0 [recyclable] => 1 [gift] => 0 [gift_message] => [date_add] => 2011-03-11 10:14:07 [date_upd] => 2011-03-11 10:14:41 [fieldsRequired:protected] => Array ( [0] => id_currency [1] => id_lang ) Link to comment Share on other sites More sharing options...
tomerg3 Posted March 11, 2011 Share Posted March 11, 2011 looks like it's not finding a default carrier.... Link to comment Share on other sites More sharing options...
Rodolfo Posted March 11, 2011 Share Posted March 11, 2011 And why? Of course I have... Link to comment Share on other sites More sharing options...
tomerg3 Posted March 11, 2011 Share Posted March 11, 2011 It's hard to tell from this error, try to set it to a different carrier, and see if it makes a difference. Link to comment Share on other sites More sharing options...
Rodolfo Posted July 1, 2011 Share Posted July 1, 2011 I do not know why, but this erros appears sometime to some of my customers...If you go to customers/carts....you should see all the carts, but sometimes when this erros appears, this shows...4982 M. ESPINOSA PAREDES 62,93 € GLS 2011-06-30 01:22:564981 -- 5,99 € -- 2011-06-29 23:48:294980 c. MORENO 30,49 € El Cartucho de Rudolph 2011-06-29 19:52:554979 c. MORENO Warning: Illegal offset type in isset or empty in /home/cartucho/public_html/shop/classes/Cart.php on line 820Warning: Illegal offset type in /home/cartucho/public_html/shop/classes/Cart.php on line 821Warning: Illegal offset type in /home/cartucho/public_html/shop/classes/Cart.php on line 822Hack attempt: "no default carrier"I must tell the customer to clean cache, cookis, or use another browser. Then it works fine...Thanks God, this happens very few times...once a week or less...RODOLFO Link to comment Share on other sites More sharing options...
Recommended Posts