Add shipping method to order manager list page
Add shipping method to order manager list page
Each day I print out the order manager page to know what orders need to go out. Is there a way to add a column to show shipping method so I know what my rush orders are?
~Jaz
~Jaz
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Add shipping method to order manager list page
Edit your Admin/Orders/Default.aspx file and locate following code
and change it to
Now edit Admin/Orders/Default.aspx.cs file and add following method to it
Code: Select all
<asp:TemplateField HeaderText="Shipment">
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:PlaceHolder ID="phShipmentStatus" runat="server"></asp:PlaceHolder>
<asp:Label ID="ShipmentStatus" runat="server" Text='<%# Eval("ShipmentStatus") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Code: Select all
<asp:TemplateField HeaderText="Shipment">
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:PlaceHolder ID="phShipmentStatus" runat="server"></asp:PlaceHolder>
<asp:Label ID="ShipmentStatus" runat="server" Text='<%# Eval("ShipmentStatus") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Shipment Methods">
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%# GetShippingMethods(Container.DataItem) %>
</ItemTemplate>
</asp:TemplateField>
Code: Select all
protected string GetShippingMethods(Object dataItem)
{
string shippmentMethods = string.Empty;
Order order = (Order)dataItem;
List<int> shippmentMethodIds = new List<int>();
foreach (OrderShipment orderShipment in order.Shipments)
{
if (orderShipment.ShipMethodName != null && !shippmentMethodIds.Contains(orderShipment.ShipMethodId))
{
shippmentMethodIds.Add(orderShipment.ShipMethodId);
shippmentMethods += orderShipment.ShipMethodName + ",";
}
}
if (!string.IsNullOrEmpty(shippmentMethods))
shippmentMethods = shippmentMethods.Remove((shippmentMethods.Length - 1), 1);
return shippmentMethods;
}
Re: Add shipping method to order manager list page
This mod should be ootb. Maybe in the next upgrade?
Re: Add shipping method to order manager list page
Thank You very much. You have just made my wife very happy.
~Jaz
~Jaz
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
-
- Commander (CMDR)
- Posts: 121
- Joined: Sat Sep 23, 2006 1:00 pm
Re: Add shipping method to order manager list page
The code works great, thank you! Is it possible to high light UPS Next Day, UPS 2nd Air , and USPS Express say in red color or bold
Thanks
Speedy
Thanks
Speedy
Re: Add shipping method to order manager list page
speedythinker wrote:The code works great, thank you! Is it possible to high light UPS Next Day, UPS 2nd Air , and USPS Express say in red color or bold
Thanks
Speedy
Code: Select all
protected string GetShippingMethods(Object dataItem)
{
string shippmentMethods = string.Empty;
Order order = (Order)dataItem;
List<int> shippmentMethodIds = new List<int>();
foreach (OrderShipment orderShipment in order.Shipments)
{
if (orderShipment.ShipMethodName != null && !shippmentMethodIds.Contains(orderShipment.ShipMethodId))
{
shippmentMethodIds.Add(orderShipment.ShipMethodId);
shippmentMethods += orderShipment.ShipMethodName + ",";
}
}
if (!string.IsNullOrEmpty(shippmentMethods))
{
shippmentMethods = shippmentMethods.Remove((shippmentMethods.Length - 1), 1);
if (shippmentMethods.Contains("UPS Next Day") || shippmentMethods.Contains("UPS 2nd Air") || shippmentMethods.Contains("USPS Express"))
shippmentMethods = string.Format("<div style='background-color:red;color:#FFFFFF;'>{0}</div>",shippmentMethods);
}
return shippmentMethods;
}
-
- Commander (CMDR)
- Posts: 121
- Joined: Sat Sep 23, 2006 1:00 pm
Re: Add shipping method to order manager list page
Works Great! FYI, the 'UPS 2nd Air" missing the "Day" and it works perfect after I added it in!
Many thanks!
Speedy
Many thanks!
Speedy
Re: Add shipping method to order manager list page
Sounds good that you made it work
-
- Commander (CMDR)
- Posts: 121
- Joined: Sat Sep 23, 2006 1:00 pm
Re: Add shipping method to order manager list page
Just got one more little thought about the Order screen , how could I highlight the 'Problem' status? I found that eventhough I changed an order status to 'problem' that need some care before shipping. But my shipper could easily oversight it had the item shipped out without the problem being fixed yet.
Thanks again
Speedy
Thanks again
Speedy
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Re: Add shipping method to order manager list page
Will this work with AbleCommerce 7.0.7?
Re: Add shipping method to order manager list page
I am quite sure that It will work.