Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Hide Failed Orders From Customers

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-27-2007, 11:24 PM
  girlsbits's Avatar 
girlsbits girlsbits is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 77
 

Default 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
__________________
X-Cart Gold | v 4.0.18 | Unix | php 4.3 | phpMyAdmin 2.8.0.3 |
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:35 AM.

   

 
X-Cart forums © 2001-2020