Results 1 to 8 of 8
  1. #1
    Join Date
    May 2010
    Location
    London UK
    Posts
    134
    Plugin Contributions
    0

    Default remove orders when status changes

    HI,

    is there a way to archive or hide orders, once their status has been changed to delivered.

    At present once the status changes the orders remain in the list and it could be good if i could just hide or archive them.

    Thanks

    Lee

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: remove orders when status changes

    You could customize the SELECT on the orders.php to not include orders with the orders_status for Delivered ... by default that is 3 but check your Order Status to make sure ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    May 2010
    Location
    London UK
    Posts
    134
    Plugin Contributions
    0

    Default Re: remove orders when status changes

    I will give it a go thank you

  4. #4
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: remove orders when status changes

    Ajeh, what would the code be for the orders.php or should say the ADMIN HOME page
    where the NEW ORDERS are shown..
    so that DELIVERED does not show, as the list is getting long
    & would be more efficient to only see the orders needing attention.




    Thx,
    Erick
    Last edited by gloerick; 31 Jan 2011 at 07:05 PM.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: remove orders when status changes

    In the file:
    /your_secret_admin_dir/index.php

    is the SELECT for the New Orders around line 155:
    Code:
      <?php  $orders = $db->Execute("select o.orders_id as orders_id, o.customers_name as customers_name, o.customers_id, o.date_purchased as date_purchased, o.currency, o.currency_value, ot.class, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and class = 'ot_total') order by orders_id DESC limit 5");
    You could add to that a WHERE statement to limit the orders pulled to be a particular orders_status or something like < 3 where 3 is the Delivery Status ...
    Last edited by Ajeh; 31 Jan 2011 at 08:59 PM. Reason: fixed line number and code
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: remove orders when status changes

    I appriciate the reply, but I really do not understand what to replace,
    I did find the code you state in the file but not sure on what to change.

    <?php $customers = $db->Execute("select c.customers_id as customers_id, c.customers_firstname as customers_firstname, c.customers_lastname as customers_lastname, a.customers_info_date_account_created as customers_info_date_account_created, a.customers_info_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_INFO . " a on c.customers_id = a.customers_info_id order by a.customers_info_date_account_created DESC limit 5");

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: remove orders when status changes

    You can add a where statement to this by changing line 155 to:
    Code:
      <?php  $orders = $db->Execute("select o.orders_id as orders_id, o.customers_name as customers_name, o.customers_id, o.date_purchased as date_purchased, o.currency, o.currency_value, ot.class, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and class = 'ot_total') WHERE o.orders_status < 3 order by orders_id DESC limit 5");

    NOTE: line number and code change I goobered up in the last post ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: remove orders when status changes

    That seems to be it, thank you so much,
    all the older delivered orders are off the ADMIN HOME page and now only the
    NEW pending orders that need attention are showing.

    Thx SO MUCH, it took off ALOT of cluder.

    Erick

 

 

Similar Threads

  1. Change all orders from status 'x', to status 'y'.
    By bi11i in forum Customization from the Admin
    Replies: 3
    Last Post: 22 Jul 2011, 06:49 AM
  2. Help, blank page when viewing customer orders to update status
    By WUHUIMEI in forum Managing Customers and Orders
    Replies: 2
    Last Post: 19 May 2009, 10:54 AM
  3. Records aren't visible when status changes
    By mumzie in forum General Questions
    Replies: 2
    Last Post: 30 Apr 2007, 05:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg