Delivery Instructions on Gold Invoice

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
jill224
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 23
Joined: Sat Aug 22, 2009 3:19 pm
Location: Northaeast Pennsylvania

Delivery Instructions on Gold Invoice

Post by jill224 » Tue Nov 04, 2014 6:02 pm

I know this used to be a default setting back in the older version but have been having trouble trying to figure this out in GOLD.

Has anyone been able to figure out how to add the "Delivery Instructions" on the printable invoice. I have seen posts about adding Order Notes but I am specifically looking for the delivery instructions or "ShipMessage" as it seems to be labeled.

Any help is much appreciated!

User avatar
AnySupport
Lieutenant (LT)
Lieutenant (LT)
Posts: 73
Joined: Fri Feb 17, 2012 8:58 am

Re: Delivery Instructions on Gold Invoice

Post by AnySupport » Wed Nov 05, 2014 3:36 pm

I don't know about Able7, so I'm not sure if this is exactly what you want, but maybe it will at least be helpful?

What we found to use for Delivery/Shipping comments (or instructions) to appear on the packing list is:
under the Order
--> Shipments Tab
Then click "Edit Shipment"
There a field appears called "Customer Comments".

It doesn't appear on the basic out-of-the-box Invoice, but if a comment exists, it does get pulled up on the basic out-of-the-box Packing List, so it must be programmatically accessible..

I hope this helps!
Liz

jill224
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 23
Joined: Sat Aug 22, 2009 3:19 pm
Location: Northaeast Pennsylvania

Re: Delivery Instructions on Gold Invoice

Post by jill224 » Thu Nov 06, 2014 7:17 am

Hi Liz,

Thanks for your reply! Yes - I have also seen that the "Customer Comments" do automatically show up on the Packing Slip. In this case though, I need them to specifically be on the Invoice.

Like you said, since it is doable on the packing slip, I'm sure there must be a way to make it work on the Invoice. I had tried copying the code from the packing slip file but it caused the invoice to not work. I tried a few variations without any success. I am by no means an expert and I have been stumped.

If any one else has any ideas or a solution I would appreciate it!

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Delivery Instructions on Gold Invoice

Post by nadeem » Fri Nov 07, 2014 7:40 am

You may need to do the following updates:

Open Website/Admin/Orders/Print/Invoice.aspx and add the following :

Code: Select all

<tr>
   <td colspan="4">
      <asp:Label ID="ShipMessageLabel" runat="server" Text="Customer Comment:" SkinID="FieldHeader"></asp:Label>
      <span><%#GetShipMessage(Container.DataItem)%></span>
  </td>
</tr>
and add the following code to code behind file i.e. Website/Admin/Orders/Print/Invoice.aspx.cs

Code: Select all

protected string GetShipMessage(object dataItem)
{
    Order order = (Order)dataItem;
    List<string> shipMessage = new List<string>();
    foreach (OrderShipment shipment in order.Shipments)
    {
        if(!string.IsNullOrEmpty(shipment.ShipMessage))
          shipMessage.Add(shipment.ShipMessage);
    }
    return string.Join(",", shipMessage.ToArray());
}
Last edited by nadeem on Sat Nov 08, 2014 1:22 am, edited 1 time in total.

rmaweb
Commander (CMDR)
Commander (CMDR)
Posts: 118
Joined: Fri Sep 10, 2010 9:41 am

Re: Delivery Instructions on Gold Invoice

Post by rmaweb » Fri Nov 07, 2014 8:18 am

Hello jill224,

This should be what your looking for. I have a heavily modified Pullsheet and Invoice templates, so my code won't work. But if your using the default code for the Invoices.aspx file, this *should* work. ( Not tested though )

In Admin -> Orders -> Print -> Invoices.aspx

Add: anywhere inside of the <asp:Repeater ID="OrderRepeater" runat="server"></asp:Reapeater> tag that you want it to be displayed in.

Code: Select all

<%# GetShipmentMessages(Container.DataItem) %>
In Admin -> Orders -> Print -> Invoices.aspx.cs

Add: after the close of the Print_Click function

Code: Select all

        protected string GetShipmentMessages(object dataItem)
        {
            Order order = (Order)dataItem;
            List<string> ShipmentMessages = new List<string>();
            foreach (OrderShipment shipment in order.Shipments)
            {
                if (!string.IsNullOrEmpty(shipment.ShipMessage))
                {
                    string message = string.Format("Shipment #{0} Message: {1}", shipment.ShipmentNumber, shipment.ShipMessage);
                    ShipmentMessages.Add(message);
                }
            }
            if (ShipmentMessages.Count == 0) return "n/a";
            return string.Join("<hr />", ShipmentMessages.ToArray());
        }
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3

Post Reply