Page 1 of 1

Packing Slip Custimization

Posted: Fri Sep 26, 2008 1:55 pm
by seanvaughan
I want to add a "Sold To:" field on the packing slip print page. The call for ship to is as follows:


<asp:Label ID="ShipTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatToAddress()%>'></asp:Label>

As i don't have the source for the CommerceBuilder dll's i don't know what the call would be to display this information. If anyone could help me, i would greatly appreciate it. I thought it would be simply changing the "FormatToAddress" to the Format associated with The Sold to Address. Let me know if you could help. Thanks

Re: Packing Slip Custimization

Posted: Fri Sep 26, 2008 4:33 pm
by jmestep
You should be able to pull a sold to from another piece of code, like the invoice. The ship to is part of the shipment object since there can be multiple shipments so you might have to put the sold to outside of that section.

Re: Packing Slip Custimization

Posted: Fri Sep 26, 2008 8:42 pm
by mazhar
Edit the Website\Admin\Orders\Print\PackSlips.aspx page and replace the HTML of table with in the item tempalte with the following HTML

Code: Select all

<table align="center" class="form<%# (Container.ItemIndex < (ShipmentCount - 1)) ? " breakAfter" : string.Empty %>" cellpadding="0" cellspacing="0" border="1">
                <tr>
                    <th colspan="4" class="header">
                        <asp:Label ID="ShipmentLabel" runat="server" Text="Packing List: Order #{0}" CssClass="caption"></asp:Label>
                        <asp:Label ID="ShipmentCountLabel" runat="server" Text=" (Shipment {0} of {1})" CssClass="caption"></asp:Label>
                    </th>
                </tr>
                <tr>
                    <td valign="top">
                        <asp:Label ID="OrderDateLabel" runat="server" Text="Order Date:" SkinID="fieldheader"></asp:Label>
                        <asp:Label ID="OrderDate" runat="server" Text='<%#Eval("Order.OrderDate", "{0:g}") %>'></asp:Label><br />
                        <asp:Label ID="ShippingMethodLabel" runat="server" Text="Shipping Method:" SkinID="fieldheader"></asp:Label>
                        <asp:Label ID="ShippingMethod" runat="server" Text='<%#Eval("ShipMethodName") %>'></asp:Label>
                    </td>
                    <td valign="top">
                        <asp:Label ID="ShipFromCaption" runat="server" Text="Ship From:" SkinID="FieldHeader"></asp:Label><br />
                        <asp:Label ID="ShipFrom" runat="server" Text='<%#((OrderShipment)Container.DataItem).FormatFromAddress()%>'></asp:Label>
                    </td>
                    <td valign="top">
                        <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>
                    </td>
                    <td valign="top">
                        <asp:Label ID="SoldToCaption" runat="server" Text="Sold To:" SkinID="FieldHeader"></asp:Label><br />
                        <asp:Label ID="SoldTo" runat="server" Text='<%#((OrderShipment)Container.DataItem).Order.FormatAddress(false)%>'></asp:Label>
                    </td>
                </tr>
                <tr id="trShipMessage" runat="server">
                    <td colspan="4">
                        <asp:Label ID="ShipMessageLabel" runat="server" Text="Customer Comment:"></asp:Label>
                        <asp:Label ID="ShipMessage" runat="server" Text='<%#Eval("ShipMessage")%>'></asp:Label><br /><br />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="dataSheet">
                        <asp:GridView ID="ShipmentItems" runat="server" ShowHeader="true" 
                            AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none" 
                            Width="100%" DataSource='<%#GetProducts(Container.DataItem)%>' CssClass="dataSheet">
                            <Columns>
                                <asp:BoundField DataField="Quantity" HeaderText="Quantity" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="Sku" HeaderText="Sku" ItemStyle-HorizontalAlign="Center" />
                                <asp:TemplateField HeaderText="Item">
                                    <ItemTemplate>
                                        <uc:OrderItemDetail ID="OrderItemDetail1" runat="server" OrderItem='<%#(OrderItem)Container.DataItem%>' ShowAssets="False" LinkProducts="False" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
This change will made the SoldTo address available in print.

Re: Packing Slip Custimization

Posted: Sat Dec 13, 2008 7:06 pm
by napacabs
After making this replacement, orders with multiple addresses do not print. Any suggestions?

Re: Packing Slip Custimization

Posted: Mon Dec 15, 2008 6:10 am
by mazhar
Seems to work for me, check the screen shot

Re: Packing Slip Custimization

Posted: Tue Aug 10, 2010 12:10 pm
by mfreeze
Has anybody put the Gift Message on the packing slip email template? What variable would you use? I assume it would be something like $orderitem.giftmessage?

Re: Packing Slip Custimization

Posted: Wed Aug 11, 2010 5:27 am
by mazhar
Yep you are right. I should be

Code: Select all

$orderItem.GiftMessage