Results 1 to 3 of 3
  1. #1

    Default Display orders list from from multiple status Ex. pending and processing on one page.

    Have issues with orders not being monitored since I have multiple order statuses for various things. I am trying to be able to display on one page multiple orders from multiple status via a simple link.

    Currently Zencart has this built in for each status by going to "Admin home" page and just clicking on the status to see what orders are currently assigned to it.
    The URL would look something like this for "Pending"
    ----website.com/admin/orders.php?selected_box=customers&status=1

    What I would like to do is something like this to pull up orders from "Pending" which =1 and "Custom Status" which =5
    The URL I would think should look like something like this
    ----website.com/admin/orders.php?selected_box=customers&status=1 & 5

    I think I found the code that generates this URL from admin/index.php which is below. Maybe this would help elaborate on what would need to be changed or to add my own seperate link into page somewhere else and hard code the customer status numbers in myself.

    $orders_contents .= '<div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status->fields['orders_status_id'], 'NONSSL') . '">' . $orders_status->fields['orders_status_name'] . '</a>:</span><span class="rigth"> ' . $orders_pending->fields['count'] . '</span> </div>';

    I am not a coder, but have played with this stuff enough to be dangerous. Any help would be appreciated. Thanks
    Last edited by jpietrowiak; 29 Apr 2015 at 02:09 PM. Reason: Clarity

  2. #2
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Display orders list from from multiple status Ex. pending and processing on one p

    Quote Originally Posted by jpietrowiak View Post
    Have issues with orders not being monitored since I have multiple order statuses for various things. I am trying to be able to display on one page multiple orders from multiple status via a simple link.

    Currently Zencart has this built in for each status by going to "Admin home" page and just clicking on the status to see what orders are currently assigned to it.
    The URL would look something like this for "Pending"
    ----website.com/admin/orders.php?selected_box=customers&status=1

    What I would like to do is something like this to pull up orders from "Pending" which =1 and "Custom Status" which =5
    The URL I would think should look like something like this
    ----website.com/admin/orders.php?selected_box=customers&status=1 & 5

    I think I found the code that generates this URL from admin/index.php which is below. Maybe this would help elaborate on what would need to be changed or to add my own seperate link into page somewhere else and hard code the customer status numbers in myself.

    $orders_contents .= '<div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status->fields['orders_status_id'], 'NONSSL') . '">' . $orders_status->fields['orders_status_name'] . '</a>:</span><span class="rigth"> ' . $orders_pending->fields['count'] . '</span> </div>';

    I am not a coder, but have played with this stuff enough to be dangerous. Any help would be appreciated. Thanks
    you would need to modify the YOUR_ADMIN/orders.php

    This modification is not for the faint of heart.

    Notice this code here:
    PHP Code:
     } elseif ($_GET['status'] != '') {
          
    $status zen_db_prepare_input($_GET['status']);
          
    $orders_query_raw "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
                              
    $new_fields "
                              from (" 
    TABLE_ORDERS_STATUS " s, " .
                              
    TABLE_ORDERS " o " .
                              
    $new_table ")
                              left join " 
    TABLE_ORDERS_TOTAL " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total') " "
                              where o.orders_status = s.orders_status_id and s.language_id = '" 
    . (int)$_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int)$status "'  " .
                              
    $search " order by o.orders_id DESC"
    You need to some how modify it so that to replace
    PHP Code:
     s.orders_status_id '" . (int)$status . "' " 
    With some thing like (s.orders_status_id = '5' OR s.orders_status_id = '1')
    keep in mind above is "hard coded" and you would need to determine the order status type from a url like
    orders.php?selected_box=customers&status=1&status=5, additionally you would have to re-code the order status drop down choices. Or create links to those specified, or create a special check-box or something for this.

    ***This is something that an advanced zen-cart developer should do, since it WILL require several significant core overwrites.***

  3. #3

    Default Re: Display orders list from from multiple status Ex. pending and processing on one p

    Thanks Bislewl... This is way over my head and looks like it really messes with the way zencart works. I think I might have to be happy with what I have on this one. Thanks for the response though. Cheers!

 

 

Similar Threads

  1. v150 Denied Payments Still Completing Orders and Placing Them in Pending Status
    By Mr.Pibb in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 16 Oct 2013, 09:00 PM
  2. Changing Status Names (Delivered, Pending, Processing etc)
    By amyleew in forum General Questions
    Replies: 2
    Last Post: 14 Feb 2010, 01:23 AM
  3. Replies: 1
    Last Post: 3 Sep 2009, 11:23 PM
  4. Nochex payment status Pending not Processing
    By snarfy in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 21 Sep 2008, 12:18 AM
  5. Correct Order Status on multiple orders
    By athena in forum Managing Customers and Orders
    Replies: 1
    Last Post: 1 Jun 2007, 05:22 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR