Jump to content

Problem Deleting Orders - (orders/index.php)


Guest

Recommended Posts

Let's say I have several orders in the DB.

I delete an order in the admin panel and it asks "Are you sure". I click OK and the page refreshes, and it says "There are no orders in the database."

The link in the address bar is, for example "orders/?delete=070722-153950-4478&customer_id=7"

If I refresh the above link, I get the same message that no orders exist.

It does actually delete the order but I have to click on the 'Orders' button in the left nav and it shows me all my orders again.

No I've narrowed it down to this piece of code:

$sqlQuery = "";

if(isset($_GET['oid']) && !isset($_GET['delete'])){

 	$sqlQuery = "WHERE cart_order_id = ".$db->mySQLsafe($_GET['oid']);

} elseif(isset($_GET['customer_id']) && $_GET['customer_id']>0){

	$sqlQuery = "WHERE ".$glob['dbprefix']."CubeCart_customer.customer_id = ".$db->mySQLsafe($_GET['customer_id']);

// }

When I remove the above code, everything works as it should :(

Can anyone explain to me what this code does? I can't just remove it! :D

Many thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...