I would like to add the customers phone number to the packing slip. After I edit the Website\Admin\Orders\Print\PackSlips.aspx page what snippet of code do I have to add?
Thanks,
Gio
Add phone number to packing slip
- gio50000
- Commander (CMDR)
- Posts: 123
- Joined: Mon Feb 18, 2008 12:51 pm
- Location: Orlando, FL
- Contact:
Add phone number to packing slip
Thank you,
Gio
Gio
Re: Add phone number to packing slip
Edit the Admin/Orders/Print/PackSlips.aspx file and locate the following code
and make it look like
Now add the following method in the script section
These changes will append the customer phone number in the ShipTo address section.
Code: Select all
<asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>
Code: Select all
<asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress() + GetPhoneNumber(Container.DataItem)%>'></asp:Label>
Code: Select all
protected string GetPhoneNumber(Object dataItem)
{
OrderShipment orderShipment = (OrderShipment)dataItem;
if (String.IsNullOrEmpty(orderShipment.ShipToPhone))
return string.Empty;
return "<br /> Phone# " + orderShipment.ShipToPhone;
}
- gio50000
- Commander (CMDR)
- Posts: 123
- Joined: Mon Feb 18, 2008 12:51 pm
- Location: Orlando, FL
- Contact:
Re: Add phone number to packing slip
Mazhar - it worked like a charm.
I would like to add the email address to the packing slip. I could use the same example but I don't know the email dataitem.
Gio
I would like to add the email address to the packing slip. I could use the same example but I don't know the email dataitem.
Gio
Thank you,
Gio
Gio
Re: Add phone number to packing slip
You can use the ShipToEmail property like
Code: Select all
return "Email: "+orderShipment.ShipToEmail;
Re: Add phone number to packing slip
Very helpful post about putting Email address on the PackSlip have a look at it.
viewtopic.php?f=44&t=7913&p=33547
viewtopic.php?f=44&t=7913&p=33547