Packing Slip Custimization

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
seanvaughan
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Fri Sep 26, 2008 1:48 pm

Packing Slip Custimization

Post by seanvaughan » Fri Sep 26, 2008 1:55 pm

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

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Packing Slip Custimization

Post by jmestep » Fri Sep 26, 2008 4:33 pm

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.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Packing Slip Custimization

Post by mazhar » Fri Sep 26, 2008 8:42 pm

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.

User avatar
napacabs
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 45
Joined: Mon Jan 14, 2008 2:58 pm
Location: Chino, California
Contact:

Re: Packing Slip Custimization

Post by napacabs » Sat Dec 13, 2008 7:06 pm

After making this replacement, orders with multiple addresses do not print. Any suggestions?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Packing Slip Custimization

Post by mazhar » Mon Dec 15, 2008 6:10 am

Seems to work for me, check the screen shot

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: Packing Slip Custimization

Post by mfreeze » Tue Aug 10, 2010 12:10 pm

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?
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Packing Slip Custimization

Post by mazhar » Wed Aug 11, 2010 5:27 am

Yep you are right. I should be

Code: Select all

$orderItem.GiftMessage

Post Reply