Jump to content
xt:Commerce Community Forum
Sign in to follow this  
zander

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object

Recommended Posts

Hallo ..

... wenn ich einen artikel in den warenkorb hinzufügen will, dann bekomme ich folgenden fehler:

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition shoppingcart of the object you are trying to operate on was loaded _before_ the session was started in /is/htdocs/67897/www.intermezzo-werbung.de/multishop/includes/cart_actions.php on line 157

hier ist der code ...

case 'add_product_creator' :

if (isset ($_POST['pID']) && is_numeric($_POST['pID'])) {

if((SHOP_USE == 'mall')&&(USE_SHOP_MALL=='true')){

$owner_check_query = xtc_db_query("SELECT products_owner from ".TABLE_PRODUCTS." where products_id='".(int)$_POST['pID']."'");

$owner_check = xtc_db_fetch_array($owner_check_query);

$shop_query = xtc_db_query("SELECT shop_url, shop_subdomain from ".TABLE_SHOP_TO_URL." where shop_id='".$owner_check['products_owner']."'");

$shop = xtc_db_fetch_array($shop_query);

if($shop['subdomain']!='true'){

$shop_link = 'http://www.'.$shop_url.'';

}else{

$shop_link = 'http://'.$shop_url.'';

}

if((!$_SESSION['cart_owner'])||($_SESSION['cart_owner']=='')){

$_SESSION['cart_owner'] = $owner_check['products_owner'];

}else{

if($_SESSION['cart_owner']!=$owner_check['products_owner']){

xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, xtc_get_all_get_params($parameters).'&error_message=true'));

}

}

}

if ($_POST['products_qty'] > MAX_PRODUCTS_QTY)

$_POST['products_qty'] = MAX_PRODUCTS_QTY;

$_SESSION['cart']->add_cart((int) $_POST['pID'], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['pID'], $_POST['id'])) + xtc_remove_non_numeric($_POST['products_qty']), $_POST['id']);

}

xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters)));

break;

ich weiß es leider nich! :(

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...