Add Phone and Email to PackingList
-
- Ensign (ENS)
- Posts: 5
- Joined: Thu Mar 19, 2009 3:30 pm
Add Phone and Email to PackingList
I've attempted to use examples of getting the PackingList.aspx file under Admin/Orders/Shipments to have the Email address and phone number included in the packing list.
When I display the packing slip under orders/shipment... I do not see the Email or Phone information
Please advise.
When I display the packing slip under orders/shipment... I do not see the Email or Phone information
Please advise.
Re: Add Phone and Email to PackingList
Locate following code Admin/Order/Print/PackSlipts.aspx and locate following code
and make it look like
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()%>'></asp:Label>
<asp:Label ID="ShipToEmail" runat="server" Text='<%#((OrderShipment)Container.DataItem).ShipToEmail%>'></asp:Label>
<asp:Label ID="ShipToPhone" runat="server" Text='<%#((OrderShipment)Container.DataItem).ShipToPhone%>'></asp:Label>
-
- Ensign (ENS)
- Posts: 5
- Joined: Thu Mar 19, 2009 3:30 pm
Re: Add Phone and Email to PackingList
NOTE: There 2 files with similar names
...Admin/Orders/Print/PackSlips.aspx
...Admin/Orders/Shipments/PackingList.aspx
I made the changes to the PackSlips.aspx file.
I attempted to test the changes. The only orders that I have are completed orders. When I displayed the PackingSlip.aspx file I received the error below.
I checked the file and do not have a 'ShipToEmail' anywhere else in this file.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The ID 'ShipToEmail' is already used by another control.
Source Error:
Line 165: <asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>
Line 166: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToEmail") %>'></asp:Label>
Line 167: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToPhone") %>'></asp:Label>
Line 168: </td>
Line 169: </tr>
...Admin/Orders/Print/PackSlips.aspx
...Admin/Orders/Shipments/PackingList.aspx
I made the changes to the PackSlips.aspx file.
I attempted to test the changes. The only orders that I have are completed orders. When I displayed the PackingSlip.aspx file I received the error below.
I checked the file and do not have a 'ShipToEmail' anywhere else in this file.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The ID 'ShipToEmail' is already used by another control.
Source Error:
Line 165: <asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>
Line 166: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToEmail") %>'></asp:Label>
Line 167: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToPhone") %>'></asp:Label>
Line 168: </td>
Line 169: </tr>
Re: Add Phone and Email to PackingList
In following code it seems that you have two controls with same names. Use different names for different labels.digitalguru wrote:NOTE: There 2 files with similar names
...Admin/Orders/Print/PackSlips.aspx
...Admin/Orders/Shipments/PackingList.aspx
I made the changes to the PackSlips.aspx file.
I attempted to test the changes. The only orders that I have are completed orders. When I displayed the PackingSlip.aspx file I received the error below.
I checked the file and do not have a 'ShipToEmail' anywhere else in this file.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The ID 'ShipToEmail' is already used by another control.
Source Error:
Line 165: <asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>
Line 166: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToEmail") %>'></asp:Label>
Line 167: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToPhone") %>'></asp:Label>
Line 168: </td>
Line 169: </tr>
Line 166: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToEmail") %>'></asp:Label>
Line 167: <asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToPhone") %>'></asp:Label>
-
- Ensign (ENS)
- Posts: 5
- Joined: Thu Mar 19, 2009 3:30 pm
Re: Add Phone and Email to PackingList
I updated the file ...Admin/Orders/Print/PackSlips.aspx
to include the following code:
<asp:Label ID="ShipToCaption" runat="server" Text="Ship To:" SkinID="FieldHeader"></asp:Label><br />
<asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>
<asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToEmail") %>'></asp:Label
<asp:Label ID="ShipToPhone" runat="server" Text='<%#Eval("ShipToPhone") %>'></asp:Label>
to include the following code:
<asp:Label ID="ShipToCaption" runat="server" Text="Ship To:" SkinID="FieldHeader"></asp:Label><br />
<asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>
<asp:Label ID="ShipToEmail" runat="server" Text='<%#Eval("ShipToEmail") %>'></asp:Label
<asp:Label ID="ShipToPhone" runat="server" Text='<%#Eval("ShipToPhone") %>'></asp:Label>
-
- Ensign (ENS)
- Posts: 5
- Joined: Thu Mar 19, 2009 3:30 pm
Re: Add Phone and Email to PackingList
How do I get the file ...Admin/Orders/Shipments/PackingList.aspx to include the Phone and Email address?
Re: Add Phone and Email to PackingList
Edit the file and locate following code
and then make it look like
Then find following piece of code
and make it look like
Code: Select all
<asp:Label ID="ShipTo" runat="server" Text="" ></asp:Label>
Code: Select all
<asp:Label ID="ShipTo" runat="server" Text="" ></asp:Label>
<br />
<asp:Label ID="ShipToEmail" runat="server" Text="" ></asp:Label>
<asp:Label ID="ShipToPhone" runat="server" Text="" ></asp:Label>
Code: Select all
ShipTo.Text = _OrderShipment.FormatToAddress();
Code: Select all
ShipTo.Text = _OrderShipment.FormatToAddress();
ShipToEmail.Text = _OrderShipment.ShipToEmail;
ShipToPhone.Text = _OrderShipment.ShipToPhone;
-
- Ensign (ENS)
- Posts: 5
- Joined: Thu Mar 19, 2009 3:30 pm
Re: Add Phone and Email to PackingList
Thank you very much. It works.
I added a <br /> to put the phone on the next line instead of on one line.
I added a <br /> to put the phone on the next line instead of on one line.