Deleting Guest Orders

I have over 40,000 orders in my site going back a couple of years, I want to delete all guest users orders over a year old to free up some space but dont see how to select Guest user as an option in advanced search in orders.

Any easy way t do it anyone know of.

V3.06

Thanks

John

Hello.

Try to add following code to fn_get_orders function in core/fn.cart.php file:

	if (!empty($params['guest_users']) && $params['guest_users'] == 'Y'){
		$condition .= db_quote(' AND ?:orders.user_id = ?i', 0);
	}

And go to following url: YOURSTORE/admin.php?dispatch=orders.manage&guest_users=Y

Thank you.

Worked a treat

Thanks

Thanks for above reply Alt Team, but I also got to thinking a lot of the orders will have images attached as most are product desiger orders/images which are the directories I can go into to delete the images and canvases safely say over a year old.

I think I found it, var/product designer/data

If correct Ill delete all images and canvases more than 2 years old....some go back to 2011. I know there may be a risk of some registered guests not being able to see those images from then but hey ! Il cross that bridge when I come to it as we have them all stored on local pc as designs anyway.

Hello,

Please contact us and we will offer you best solution for delete images from orders with pd images.

Please do not delete it yourself, because pd uses a complex system of subfolders in var/product_designer/data

Thank you.

Hello.

Try to add following code to fn_get_orders function in core/fn.cart.php file:

	if (!empty($params['guest_users']) && $params['guest_users'] == 'Y'){
		$condition .= db_quote(' AND ?:orders.user_id = ?i', 0);
	}

And go to following url: YOURSTORE/admin.php?dispatch=orders.manage&guest_users=Y

Thank you.

I tried using same method for v 4.5.2 and doesnt filter just guests, any ideas please