X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Direct links to order statuses (https://forum.x-cart.com/showthread.php?t=70600)

drholmes 11-24-2014 01:14 AM

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

tony_sologubov 11-24-2014 05:56 AM

Re: Direct links to order statuses
 
Hi Per!

I will give code samples within a week.

Tony.

tony_sologubov 12-01-2014 06:15 AM

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.


All times are GMT -8. The time now is 05:00 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.