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

Direct links to order statuses

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-24-2014, 01:14 AM
 
drholmes drholmes is offline
 

Advanced Member
  
Join Date: Oct 2014
Posts: 84
 

Default Direct links to order statuses

Hi,

We have orders floating in a variety of statuses (some on hold, some awaiting payment etc), and I spend all day modifying the search results over and over and over to see the orders.

I want to make direct links so I can make a handful of bookmarks that take me directly to a list of orders in a certain status.

Since the search field is Ajax, none of this is done with URL variables, otherwise I could hack it.

Are there any URL variables that the search page will respond to so you could craft bookmarks that would take you directly to search results? Then I could at a glance switch back and forth between On Hold, Awaiting Payment, Paid, or at a glance get my unshipped orders.

Modifying the search fields is fine for a one-time search. As a way of navigating your orders on a daily basis, it's hopelessly manual.

Thanks!

Per
__________________
X-Cart Business 5.4.1.7, No third party modules, most modules disabled, zero modifications other than CSS.
Reply With Quote
  #2  
Old 11-24-2014, 05:56 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Direct links to order statuses

Hi Per!

I will give code samples within a week.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 12-01-2014, 06:15 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Direct links to order statuses

Hi Per!

You can specify the bookmarks to order search form knowing that you can pass following GET parameters to admin.php?target=order_list script:

- substring - it defines a text for search form as shown here: http://awesomescreenshot.com/04f3y17gba e.g. substring=text
- paymentStatus[0] - it can accept id of payment status that should be searched for, e.g. paymentStatus[0]=1 . If you need to search for several payment statuses, you can specify it like this: paymentStatus[0]=1&paymentStatus[1]=2
- shippingStatus[0] - the same as above, but for shipping status. Again, you can specify several shipping statuses: shippingStatus[0]=1&shippingStatus[1]=2
- dateRange - this field defines the dates for search in yyyy-mm-dd format separated by %20to%20, e.g. dateRange=2014-11-01%20to%202014-11-30
- accessLevel defines whether search form should return only orders for guest or regular users, e.g. accessLevel=anonymous or accessLevel=registered

So, as an example, if you want to return shipped (shipping status ID = 3) and completed (payment status ID = 6) orders from 31Jan 2014 to 1 Dec 2014 placed by registered users only, you will call it like this:

admin.php?target=order_list&paymentStatus[0]=6&shippingStatus[0]=3&dateRange=2014-01-31%20to%202014-12-01&accessLevel=registered

NOTE: you can check for payment and shipping statuses IDs by looking at content of xc_order_payment_statuses and xc_order_shipping_statuses tables accordingly.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
SignTorch (12-01-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 06:07 AM.

   

 
X-Cart forums © 2001-2020