I need to change the Orders search interface in the admin tool and be able to filter Orders based on the Coupon Code.
Any Idea how I can implement this?
I tried adding extra filters to the OrderSearchCriteria Object, but didn't work.
Search Orders on CouponCode
Re: Search Orders on CouponCode
I guess to accomplish this you would need a some custom query. Instead of modifying the order admin create a new page and then put some code to filter the orders for you where customer applied some specific coupon code. For example you can use
following query to filter the orders
Have a look here to find how you can write custom queries in AbleCommerce
http://wiki.ablecommerce.com/index.php/ ... uilder_API
following query to filter the orders
Code: Select all
SELECT DISTINCT * FROM
ac_Orders AS O INNER JOIN ac_OrderItems AS OI
ON O.OrderId = OI.OrderId
WHERE OI.OrderItemTypeId = 5 AND OI.Sku ='coupon_code_here'
Have a look here to find how you can write custom queries in AbleCommerce
http://wiki.ablecommerce.com/index.php/ ... uilder_API
Re: Search Orders on CouponCode
Thanks for the response.
How about doing some custom filtering in the DataSource, Selected event?
I mean removing the records from the datasource that don't have the coupon condition.
Would you suggest that? If yes, would you suggest using Linq or not.
Thanks
How about doing some custom filtering in the DataSource, Selected event?
I mean removing the records from the datasource that don't have the coupon condition.
Would you suggest that? If yes, would you suggest using Linq or not.
Thanks
Re: Search Orders on CouponCode
I guess that may work. You can give it a try.