Results 1 to 2 of 2
  1. #1

    Default Purchase Order - Need to search in admin? super orders

    I've been trying to figure this out with no avail. You can not search for a customers PO number in orders or super orders mod. How do I add to the search function to search for the purchase order.

    Thanks for the help

  2. #2

    Default Re: Purchase Order - Need to search in admin? super orders

    I think I need to reference table so_purchase_orders and column po_number. The below code is from superorders.php which i am guessing is what I need to add somehow. I do not really understand code. But should be technical enough to figure out with a little help to point me in the right direction.

    // Only one or the other search
    // create search_orders_products filter
    $search = '';
    $new_table = '';
    $new_fields = '';
    if (isset($_GET['search_orders_products']) && zen_not_null($_GET['search_orders_products'])) {
    $new_fields = '';
    $search_distinct = ' distinct ';
    $new_table = " left join " . TABLE_ORDERS_PRODUCTS . " op on (op.orders_id = o.orders_id) ";
    $keywords = zen_db_input(zen_db_prepare_input($_GET['search_orders_products']));
    $search = " and (op.products_model like '%" . $keywords . "%' or op.products_name like '" . $keywords . "%')";
    if (substr(strtoupper($_GET['search_orders_products']), 0, 3) == 'ID:') {
    $keywords = TRIM(substr($_GET['search_orders_products'], 3));
    $search = " and op.products_id ='" . (int)$keywords . "'";
    }
    } else {
    ?>
    <?php
    // create search filter
    $search = '';
    if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
    $search_distinct = ' ';
    $keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
    $search = " and (o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.date_purchased like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.ip_address like '%" . $keywords . "%')";
    $new_table = '';

 

 

Similar Threads

  1. Shipstation php file edit for super orders PO/purchase order value pass
    By jpietrowiak in forum Addon Shipping Modules
    Replies: 0
    Last Post: 5 Sep 2013, 02:34 AM
  2. How do I add a purchase order field to the admin orders page?
    By kbascombe in forum Managing Customers and Orders
    Replies: 1
    Last Post: 1 Oct 2009, 02:48 AM
  3. HELP! orders not registering in admin-Super Orders?
    By mtkatgirl in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 Aug 2009, 02:50 AM
  4. Super Orders / Purchase Order question
    By rebekah in forum General Questions
    Replies: 0
    Last Post: 28 Oct 2006, 10:49 PM
  5. Question about Purchase order for Super Orders module
    By rkeppert in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 30 Aug 2006, 02:22 PM

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