X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Hide Failed Orders From Customers (https://forum.x-cart.com/showthread.php?t=30781)

girlsbits 04-27-2007 11:24 PM

Hide Failed Orders From Customers
 
Hi,

I wanted to hide orders with a Failed Status from customers so I asked Qualiteam to provide a solution.

In <xcart_dir>/include/orders.php find:

<CODE>
# Search by order status
if (!empty($data["status"]))
$search_condition .= " AND $sql_tbl[orders].status='".$data["status"]."'";
</CODE>

and replace with:

<CODE>
# Search by order status
if (!empty($data["status"])) {
$search_condition .= " AND $sql_tbl[orders].status='".$data["status"]."'";
} else {
if ($current_area == "C") $search_condition .= " AND $sql_tbl[orders].status <> 'F' AND $sql_tbl[orders].status <> 'D' ";
}
</CODE>

The way I use this is to set an order to Declined, so that the customer receives an email lettting them know their order hasn't gone through, then change the order status to Failed - they aren't emailed with a Failed order status and the order won't show up on their order history.

Works on 4.0.18, should work on other versions if you can locate the first piece of code in include/orders.php


All times are GMT -8. The time now is 04:04 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.