Printing and displaying the product Summary

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
gregglbk
Ensign (ENS)
Ensign (ENS)
Posts: 12
Joined: Tue Feb 05, 2008 11:53 am

Printing and displaying the product Summary

Post by gregglbk » Fri Sep 05, 2008 11:07 am

Hi everyone,

I have been looking for a way to do this but can't seem to find one... Does anyone know how I can make the product summary display on the voice and also print when we print invoice and packing lists. Our products are such that we named them by date and used the summary for the title of the product. Most of the time this works great, but we do have some products that the date does not explain what product they have ordered. We need to look at the description to determine the exact product. We have over 2500 products all with different sku's so this does not work very well either. We have our new AC7 site up and I'm just trying to make some small changes to help us process orders better. You can check it out and see what I'm talking about at http://www.originallifemagazines.com Any Help you have would be great, and thanks for all the help this forum has been so far. Also let me know what you think of the site, we are open to any suggestions you might have.

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

Re: Printing and displaying the product Summary

Post by mazhar » Fri Sep 05, 2008 9:23 pm

In order to display the product summary on Invoice edit the Website\Admin\Orders\Print\Invoices.aspx file and locate the OrderItems gridview and make it look like

Code: Select all

<asp:GridView ID="OrderItems" 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>
                                <asp:TemplateField HeaderText="Summary">
                                    <ItemStyle HorizontalAlign="left" width="150px" />
                                    <ItemTemplate>
                                        <asp:Label ID="SummaryLabel" runat="server" Text='<%# GetSummary(Container.DataItem) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Price">
                                    <ItemStyle HorizontalAlign="right" width="80px" />
                                    <ItemTemplate>
                                        <asp:Label ID="Price" runat="server" Text='<%#Eval("ExtendedPrice", "{0:lc}")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
Now add the following method in the above <script runat="server">...</script> part

Code: Select all

<script runat="server">
.................
.................
.................
protected string GetSummary(Object dataItem) 
    {
        OrderItem orderItem = (OrderItem)dataItem;
        return orderItem.Product.Summary;
    }
</script>
These changes will made the summary data available next to the order item name in the invoce

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

Re: Printing and displaying the product Summary

Post by jmestep » Sat Sep 06, 2008 8:12 am

The only problem with mazhar's solution is that if you delete the product when it is not available any more, that data will be gone from the order. If you want to keep it for time and eternity, you might try putting the product summary into a template field then customize your pages and/or checkout process.
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

gregglbk
Ensign (ENS)
Ensign (ENS)
Posts: 12
Joined: Tue Feb 05, 2008 11:53 am

Re: Printing and displaying the product Summary

Post by gregglbk » Mon Sep 08, 2008 9:39 am

Mazhar,

Thank you very much for the help that was exactly what I was looking for, and it works great. Judy I appreciate you input and that information would be very helpful for some sites, and I will keep it in mind. The products we sell are vintage magazines and they would never be removed from the store, they may not available to sell because of stock but as for removing them that will not happen. This information is only for our use anyway, some of our magazines have the same date but are special issues, this was only to help us figure out which issue they ordered. Again, thank you very much both of you for your help.

Post Reply