Report of Products within Status

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Thistle3408
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Apr 19, 2010 4:52 pm

Report of Products within Status

Post by Thistle3408 » Thu Sep 23, 2010 10:35 am

Has anyone created a report where our admin can see those orders that contain a specific product or products?

Essentially what I was looking at doing was customizing the Admin/Orders/Default.aspx (and associated .cs) to all the existing parameter selections (e.g., status, date range, etc.) but add a "product" (either by name or by SKU) as a selection criteria.

So, the admin could enter whatever parameters (similar to what is currently available on the order management screen, along with a product. The resulting list of orders would be those that had the specified status (and/or other existing criteria) and where the order included the specified product.

Think of this in light of backlogs, such as future delivery orders (ones that will be shipped in the future) and back orders (orders we'd like to ship but can't due to a product being out of stock).

Might even be nice to have a count. But at least we could look at the list of orders that met the criteria.

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Report of Products within Status

Post by plugables » Fri Sep 24, 2010 4:33 am

For backlog orders and such you should probably define an order status for each of these types of orders.
For example define an order status 'Back Ordered'. When you process such orders for which you can't ship because product is out of stock you simply mark the order as Back Ordered. Then at a later stage you can search for the orders by their order status of 'Back Ordered' on the current order manager page.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Report of Products within Status

Post by mazhar » Fri Sep 24, 2010 5:18 am

Has anyone created a report where our admin can see those orders that contain a specific product or products?
Well there could be one workaround with minimum effort to make order manager do this using an order note. Upon the completion of order from retail side you can create and add a private order note to order with SKU and name information of all items through code. Then you will be able to find order using SKU and item name in Find Keyword filter with lockup option set to order notes. You can try following code to give it a try.

Edit your ConLib/OnePageCheckout.ascx.cs file and locate following code block

Code: Select all

        }
        else
        {
            CheckoutMessagePanel.Visible = true;
            CheckoutMessage.Text = string.Join("<br /><br />", response.WarningMessages.ToArray());
        }
then replace it with

Code: Select all

            Order order = OrderDataSource.Load(e.OrderId);
            if (order != null)
            {
                StringBuilder sb = new StringBuilder();
                foreach (OrderItem orderItem in order.Items)
                {
                    if (orderItem.OrderItemType == OrderItemType.Product)
                    {
                        sb.Append(string.Format("{0},{1}<br />", orderItem.Name, orderItem.Sku));
                    }
                }
                OrderNote orderNote = new OrderNote();
                orderNote.NoteType = NoteType.Private;
                orderNote.Comment = sb.ToString();
                orderNote.CreatedDate = LocaleHelper.LocalNow;
                orderNote.OrderId = order.OrderId;
                orderNote.Save();
            }
        }
        else
        {
            CheckoutMessagePanel.Visible = true;
            CheckoutMessage.Text = string.Join("<br /><br />", response.WarningMessages.ToArray());
        }
save the file. Now place some test order and remember name, SKU of items those are included in that order. Now go to merchant side and try keyword search for item's name and SKU that were included in last order by keep search type to look into order notes. That should do the trick.

Thistle3408
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Apr 19, 2010 4:52 pm

Re: Report of Products within Status

Post by Thistle3408 » Fri Sep 24, 2010 6:09 am

plugables,

We already have that status (Back Order) defined and used as you describe.

Mazhar,

Interesting approach. I'll try that. It's sort of looking at the problem from a different perspective but might yield the desired results sufficiently.

Thistle3408
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Apr 19, 2010 4:52 pm

Re: Report of Products within Status

Post by Thistle3408 » Fri Sep 24, 2010 6:45 am

Mazhar,

Works fine.

Post Reply