Customer Comments
Customer Comments
Most of what we sell has a somewhat costom nature to it. This means a lot of customers add comments in checkout. We need a way to get the customer comments to print out on the invoies, so we can make sure that we fill the customers needs. Is there a way to do this that dose not require checking every order by hand to see if there are comments on it?
Thanks,
Thanks,
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
It will be something very similar
viewtopic.php?f=44&t=9019
viewtopic.php?f=44&t=9019
Re: Customer Comments
I made several changes to my invoice so it shows more information. I have added, coupons, quantity discount and customer notes. (nonprivate notes) No promises that the code is correct, but it is working for me. I would also like to add the shipping method. Any sugestions?
Here is my current code if anyone wants it:
Here is my current code if anyone wants it:
Code: Select all
<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" Title="Invoices" Inherits="CommerceBuilder.Web.UI.AbleCommerceAdminPage" %>
<%@ Register Src="../../UserControls/OrderItemDetail.ascx" TagName="OrderItemDetail" TagPrefix="uc" %>
<script runat="server">
private List<string> orderNumbers;
protected int OrderCount = 0;
private List<int> GetSelectedOrders()
{
//CHECK FOR QUERYSTRING PARAMETERS
List<int> selectedOrders = new List<int>();
string orderIdList = Request.QueryString["orders"];
if (!string.IsNullOrEmpty(orderIdList))
{
string[] numberTokens = orderIdList.Split(",".ToCharArray());
foreach (string numberToken in numberTokens)
{
int temp = AlwaysConvert.ToInt(numberToken);
if (temp > 0) selectedOrders.Add(temp);
}
}
return selectedOrders;
}
private string GetOrderNumbers(List<int> orders)
{
if (orderNumbers == null)
{
orderNumbers = new List<string>();
foreach (int orderId in orders)
{
orderNumbers.Add(orderId.ToString());
}
}
if (orderNumbers.Count == 0) return string.Empty;
return string.Join(", ", orderNumbers.ToArray());
}
/// <summary>
/// Gets a collection of orders from a list of order ids.
/// </summary>
/// <param name="orderIds">The orderIds to load.</param>
/// <returns>A collection of orders from the list of ids.</returns>
protected OrderCollection GetOrders(params int[] orderIds)
{
OrderCollection orders = new OrderCollection();
orderNumbers = new List<string>();
foreach (int orderId in orderIds)
{
Order order = OrderDataSource.Load(orderId);
if (order != null)
{
orderNumbers.Add(order.OrderId.ToString());
orders.Add(order);
}
}
OrderCount = orders.Count;
return orders;
}
protected OrderNoteCollection GetOrderNotes(params int[] orders)
{
OrderNoteCollection orderNotes = new OrderNoteCollection();
foreach (int orderId in orders)
{
Order order = OrderDataSource.Load(orderId);
if (order != null)
{
if (order.Notes != null && order.Notes.Count > 0)
{
foreach (OrderNote on in order.Notes)
if(!on.IsPrivate)
orderNotes.Add(on);
}
}
}
return orderNotes;
}
protected void Page_Load(object sender, EventArgs e)
{
List<int> selectedOrders = GetSelectedOrders();
if ((selectedOrders == null) || (selectedOrders.Count == 0)) Response.Redirect("~/Admin/Orders/Default.aspx");
OrderRepeater.DataSource = GetOrders(selectedOrders.ToArray());
OrderRepeater.DataBind();
OrderNotesRepeater.DataSource = GetOrderNotes(selectedOrders.ToArray());
OrderNotesRepeater.DataBind();
OrderList.Text = GetOrderNumbers(selectedOrders);
}
protected OrderItemCollection GetProducts(object dataItem)
{
Order order = (Order)dataItem;
OrderItemCollection products = new OrderItemCollection();
foreach (OrderItem item in order.Items)
{
if (item.OrderItemType == OrderItemType.Product || item.OrderItemType == OrderItemType.Coupon || item.OrderItemType == OrderItemType.Discount)
{
products.Add(item);
}
}
products.Sort(new OrderItemComparer());
return products;
}
protected string GetBillToAddress(object dataItem)
{
return ((Order)dataItem).FormatAddress(true);
}
protected string GetShipToAddress(object dataItem)
{
Order order = (Order)dataItem;
List<string> addressList = new List<string>();
foreach (OrderShipment shipment in order.Shipments)
{
string shipTo = shipment.FormatToAddress();
if (!addressList.Contains(shipTo)) addressList.Add(shipTo);
}
if (addressList.Count == 0) return "n/a";
return string.Join("<hr />", addressList.ToArray());
}
protected LSDecimal GetTotal(object dataItem, params OrderItemType[] orderItems)
{
return ((Order)dataItem).Items.TotalPrice(orderItems);
}
protected LSDecimal GetTotalPayments(object dataItem)
{
return ((Order)dataItem).Payments.Total(true);
}
protected LSDecimal GetBalance(object dataItem)
{
return GetTotal(dataItem) - GetTotalPayments(dataItem);
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="pageHeader noPrint">
<div class="caption">
<h1><asp:Localize ID="Caption" runat="server" Text="Invoices"></asp:Localize></h1>
</div>
<div class="content">
<h2><asp:Localize ID="OrderListLabel" runat="server" Text="Includes Order Numbers:"></asp:Localize></h2>
<asp:Label ID="OrderList" runat="server" Text=""></asp:Label><br />
<p><asp:Localize ID="PrintInstructions" runat="server" Text="This document includes a printable stylesheet. If you are using a modern browser (such as IE7, FF2, or Opera 7) this page will print with appropriate styles and page breaks if needed. Website headers, footers, and this message will not be printed."></asp:Localize></p>
</div>
</div>
<div class="noPrint">
<asp:Button ID="Print" runat="server" Text="Print" OnClientClick="window.print();return false;" />
<asp:Button ID="Back" runat="server" Text="Back" OnClientClick="window.history.go(-1);return false;" />
</div>
<asp:Repeater ID="OrderRepeater" runat="server">
<ItemTemplate>
<table align="center" class="form<%# (Container.ItemIndex < (OrderCount - 1)) ? " breakAfter" : string.Empty %>" cellpadding="0" cellspacing="0" border="1">
<tr>
<td colspan="4" valign="middle">
<div style="float:left">
<br />
<span class="inlineCaption" style="font-size:150%;"><%#Token.Instance.Store.Name%></span>
<br />
<%# Token.Instance.Store.DefaultWarehouse.FormatAddress(true) %>
</div>
<div style="float:right">
<h1 class="invoice">INVOICE</h1>
<asp:Label ID="OrderNumberLabel" runat="server" Text="Order Number:" SkinID="FieldHeader"></asp:Label>
<asp:Label ID="OrderNumber" runat="server" Text='<%# Eval("OrderId") %>'></asp:Label><br />
<asp:Label ID="OrderDateLabel" runat="server" Text="Order Date:" SkinID="FieldHeader"></asp:Label>
<asp:Label ID="OrderDate" runat="server" Text='<%# Eval("OrderDate", "{0:g}") %>'></asp:Label><br />
</div>
</td>
</tr>
<tr>
<td style="width:10px;text-align:center;font-weight:bold" valign="top">
S O L D T O
</td>
<td valign="middle" width="50%">
<%# GetBillToAddress(Container.DataItem) %>
</td>
<td style="width:10px;text-align:center;font-weight:bold" valign="top">
S H I P T O
</td>
<td valign="middle" width="50%">
<%# GetShipToAddress(Container.DataItem) %>
</td>
</tr>
<tr>
<td colspan="4" class="dataSheet">
<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="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>
<table width="100%" cellpadding="0" cellspacing="0" class="dataSheet">
<tr>
<th align="right">
<asp:Label ID="SubtotalLabel" runat="server" Text="Subtotal:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Product)) %>
</td>
</tr>
<tr>
<th align="right">
<asp:Label ID="ShippingTotalLabel" runat="server" Text="Shipping:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Shipping, OrderItemType.Handling)) %>
</td>
</tr>
<tr>
<th align="right">
<asp:Label ID="TaxTotalLabel" runat="server" Text="Tax:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Tax)) %>
</td>
</tr>
<tr id="trOther" runat="server" visible='<%# GetTotal(Container.DataItem, OrderItemType.Charge, OrderItemType.Coupon, OrderItemType.Credit, OrderItemType.Discount, OrderItemType.GiftCertificate, OrderItemType.GiftWrap) > 0 %>'>
<th align="right">
<asp:Label ID="OtherTotalLabel" runat="server" Text="Other:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Charge, OrderItemType.Coupon, OrderItemType.Credit, OrderItemType.Discount, OrderItemType.GiftCertificate, OrderItemType.GiftWrap)) %>
</td>
</tr>
<tr class="totalRow">
<th align="right">
<asp:Label ID="TotalLabel" runat="server" Text="Total:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem)) %>
</td>
</tr>
<%--
<tr>
<th align="right">
<asp:Label ID="PaymentsLabel" runat="server" Text="Payments:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotalPayments(Container.DataItem)) %>
</td>
</tr>
<tr>
<th align="right">
<asp:Label ID="BalanceLabel" runat="server" Text="Balance:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetBalance(Container.DataItem)) %>
</td>
</tr>
--%>
</table>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
<div class="content">
<table align="center">
<tr>
<td colspan="3" class="dataSheet">
<asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Width="100%" CssClass="dataSheet">
<Columns>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("Comment") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</div>
</asp:Content>
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
Forgot to mention. This is the Invoices.aspx file, located in Admin/orders/print
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
One way to accomplish this may be as belowI would also like to add the shipping method. Any sugestions?
Code: Select all
<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" Title="Invoices" Inherits="CommerceBuilder.Web.UI.AbleCommerceAdminPage" %>
<%@ Register Src="../../UserControls/OrderItemDetail.ascx" TagName="OrderItemDetail" TagPrefix="uc" %>
<script runat="server">
private List<string> orderNumbers;
protected int OrderCount = 0;
private List<int> GetSelectedOrders()
{
//CHECK FOR QUERYSTRING PARAMETERS
List<int> selectedOrders = new List<int>();
string orderIdList = Request.QueryString["orders"];
if (!string.IsNullOrEmpty(orderIdList))
{
string[] numberTokens = orderIdList.Split(",".ToCharArray());
foreach (string numberToken in numberTokens)
{
int temp = AlwaysConvert.ToInt(numberToken);
if (temp > 0) selectedOrders.Add(temp);
}
}
return selectedOrders;
}
private string GetOrderNumbers(List<int> orders)
{
if (orderNumbers == null)
{
orderNumbers = new List<string>();
foreach (int orderId in orders)
{
orderNumbers.Add(orderId.ToString());
}
}
if (orderNumbers.Count == 0) return string.Empty;
return string.Join(", ", orderNumbers.ToArray());
}
/// <summary>
/// Gets a collection of orders from a list of order ids.
/// </summary>
/// <param name="orderIds">The orderIds to load.</param>
/// <returns>A collection of orders from the list of ids.</returns>
protected OrderCollection GetOrders(params int[] orderIds)
{
OrderCollection orders = new OrderCollection();
orderNumbers = new List<string>();
foreach (int orderId in orderIds)
{
Order order = OrderDataSource.Load(orderId);
if (order != null)
{
orderNumbers.Add(order.OrderId.ToString());
orders.Add(order);
}
}
OrderCount = orders.Count;
return orders;
}
protected OrderNoteCollection GetOrderNotes(params int[] orders)
{
OrderNoteCollection orderNotes = new OrderNoteCollection();
foreach (int orderId in orders)
{
Order order = OrderDataSource.Load(orderId);
if (order != null)
{
if (order.Notes != null && order.Notes.Count > 0)
{
foreach (OrderNote on in order.Notes)
if(!on.IsPrivate)
orderNotes.Add(on);
}
}
}
return orderNotes;
}
protected void Page_Load(object sender, EventArgs e)
{
List<int> selectedOrders = GetSelectedOrders();
if ((selectedOrders == null) || (selectedOrders.Count == 0)) Response.Redirect("~/Admin/Orders/Default.aspx");
OrderRepeater.DataSource = GetOrders(selectedOrders.ToArray());
OrderRepeater.DataBind();
OrderNotesRepeater.DataSource = GetOrderNotes(selectedOrders.ToArray());
OrderNotesRepeater.DataBind();
OrderList.Text = GetOrderNumbers(selectedOrders);
}
protected string GetShipMethods(Object dataItem)
{
Order order = (Order)dataItem;
string shippingMethods = string.Empty;
foreach (OrderShipment orderShipment in order.Shipments)
{
shippingMethods += orderShipment.ShipMethod.Name;
shippingMethods += ",";
}
if (!String.IsNullOrEmpty(shippingMethods))
shippingMethods = shippingMethods.Remove((shippingMethods.Length - 1), 1);
return shippingMethods;
}
protected OrderItemCollection GetProducts(object dataItem)
{
Order order = (Order)dataItem;
OrderItemCollection products = new OrderItemCollection();
foreach (OrderItem item in order.Items)
{
if (item.OrderItemType == OrderItemType.Product || item.OrderItemType == OrderItemType.Coupon || item.OrderItemType == OrderItemType.Discount)
{
products.Add(item);
}
}
products.Sort(new OrderItemComparer());
return products;
}
protected string GetBillToAddress(object dataItem)
{
return ((Order)dataItem).FormatAddress(true);
}
protected string GetShipToAddress(object dataItem)
{
Order order = (Order)dataItem;
List<string> addressList = new List<string>();
foreach (OrderShipment shipment in order.Shipments)
{
string shipTo = shipment.FormatToAddress();
if (!addressList.Contains(shipTo)) addressList.Add(shipTo);
}
if (addressList.Count == 0) return "n/a";
return string.Join("<hr />", addressList.ToArray());
}
protected LSDecimal GetTotal(object dataItem, params OrderItemType[] orderItems)
{
return ((Order)dataItem).Items.TotalPrice(orderItems);
}
protected LSDecimal GetTotalPayments(object dataItem)
{
return ((Order)dataItem).Payments.Total(true);
}
protected LSDecimal GetBalance(object dataItem)
{
return GetTotal(dataItem) - GetTotalPayments(dataItem);
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="pageHeader noPrint">
<div class="caption">
<h1><asp:Localize ID="Caption" runat="server" Text="Invoices"></asp:Localize></h1>
</div>
<div class="content">
<h2><asp:Localize ID="OrderListLabel" runat="server" Text="Includes Order Numbers:"></asp:Localize></h2>
<asp:Label ID="OrderList" runat="server" Text=""></asp:Label><br />
<p><asp:Localize ID="PrintInstructions" runat="server" Text="This document includes a printable stylesheet. If you are using a modern browser (such as IE7, FF2, or Opera 7) this page will print with appropriate styles and page breaks if needed. Website headers, footers, and this message will not be printed."></asp:Localize></p>
</div>
</div>
<div class="noPrint">
<asp:Button ID="Print" runat="server" Text="Print" OnClientClick="window.print();return false;" />
<asp:Button ID="Back" runat="server" Text="Back" OnClientClick="window.history.go(-1);return false;" />
</div>
<asp:Repeater ID="OrderRepeater" runat="server">
<ItemTemplate>
<table align="center" class="form<%# (Container.ItemIndex < (OrderCount - 1)) ? " breakAfter" : string.Empty %>" cellpadding="0" cellspacing="0" border="1">
<tr>
<td colspan="4" valign="middle">
<div style="float:left">
<br />
<span class="inlineCaption" style="font-size:150%;"><%#Token.Instance.Store.Name%></span>
<br />
<%# Token.Instance.Store.DefaultWarehouse.FormatAddress(true) %>
</div>
<div style="float:right">
<h1 class="invoice">INVOICE</h1>
<asp:Label ID="OrderNumberLabel" runat="server" Text="Order Number:" SkinID="FieldHeader"></asp:Label>
<asp:Label ID="OrderNumber" runat="server" Text='<%# Eval("OrderId") %>'></asp:Label><br />
<asp:Label ID="OrderDateLabel" runat="server" Text="Order Date:" SkinID="FieldHeader"></asp:Label>
<asp:Label ID="OrderDate" runat="server" Text='<%# Eval("OrderDate", "{0:g}") %>'></asp:Label><br />
<asp:Label ID="ShippingMethodsLabel" runat="server" SkinID="FieldHeader" Text="Shipping Medhods: "></asp:Label>
<asp:Label ID="ShippingMethods" runat="server" Text='<%# GetShipMethods(Container.DataItem) %>'></asp:Label>
</div>
</td>
</tr>
<tr>
<td style="width:10px;text-align:center;font-weight:bold" valign="top">
S O L D T O
</td>
<td valign="middle" width="50%">
<%# GetBillToAddress(Container.DataItem) %>
</td>
<td style="width:10px;text-align:center;font-weight:bold" valign="top">
S H I P T O
</td>
<td valign="middle" width="50%">
<%# GetShipToAddress(Container.DataItem) %>
</td>
</tr>
<tr>
<td colspan="4" class="dataSheet">
<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="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>
<table width="100%" cellpadding="0" cellspacing="0" class="dataSheet">
<tr>
<th align="right">
<asp:Label ID="SubtotalLabel" runat="server" Text="Subtotal:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Product)) %>
</td>
</tr>
<tr>
<th align="right">
<asp:Label ID="ShippingTotalLabel" runat="server" Text="Shipping:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Shipping, OrderItemType.Handling)) %>
</td>
</tr>
<tr>
<th align="right">
<asp:Label ID="TaxTotalLabel" runat="server" Text="Tax:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Tax)) %>
</td>
</tr>
<tr id="trOther" runat="server" visible='<%# GetTotal(Container.DataItem, OrderItemType.Charge, OrderItemType.Coupon, OrderItemType.Credit, OrderItemType.Discount, OrderItemType.GiftCertificate, OrderItemType.GiftWrap) > 0 %>'>
<th align="right">
<asp:Label ID="OtherTotalLabel" runat="server" Text="Other:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem, OrderItemType.Charge, OrderItemType.Coupon, OrderItemType.Credit, OrderItemType.Discount, OrderItemType.GiftCertificate, OrderItemType.GiftWrap)) %>
</td>
</tr>
<tr class="totalRow">
<th align="right">
<asp:Label ID="TotalLabel" runat="server" Text="Total:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotal(Container.DataItem)) %>
</td>
</tr>
<%--
<tr>
<th align="right">
<asp:Label ID="PaymentsLabel" runat="server" Text="Payments:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetTotalPayments(Container.DataItem)) %>
</td>
</tr>
<tr>
<th align="right">
<asp:Label ID="BalanceLabel" runat="server" Text="Balance:" />
</th>
<td align="right" width="80px">
<%# string.Format("{0:lc}", GetBalance(Container.DataItem)) %>
</td>
</tr>
--%>
</table>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
<div class="content">
<table align="center">
<tr>
<td colspan="3" class="dataSheet">
<asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Width="100%" CssClass="dataSheet">
<Columns>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("Comment") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</div>
</asp:Content>
Re: Customer Comments
Once again, just what I was looking for.
thanks,
thanks,
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
I'd really like to use this invoice template but I'm wondering if there is a way to include the phone number and email address of the customer as well as a "pulled" box to the left of the quantity?
Re: Customer Comments
Ultimately, it sounds like a configurable invoice would be a great feature.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
Have a look at the following post.I'd really like to use this invoice template but I'm wondering if there is a way to include the phone number and email address of the customer as well as a "pulled" box to the left of the quantity?
viewtopic.php?f=44&t=7913
Re: Customer Comments
I have found a problem with the code in that it will only print correctly when printing each invoice individually. If you try to print multiple invoices at one time from the Orders menu, all notes are printed on the last invoice in the list (since the invoices are printed in reverse for some reason, this means that the notes are all added to the first order in the series).
Also, as we have somehow ended up with a couple of orders coming through with a blank shipping method we found that trying to print these orders will create a Runtime error.
Also, as we have somehow ended up with a couple of orders coming through with a blank shipping method we found that trying to print these orders will create a Runtime error.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Customer Comments
The problem is fixed. Here is the updated file.I have found a problem with the code in that it will only print correctly when printing each invoice individually. If you try to print multiple invoices at one time from the Orders menu, all notes are printed on the last invoice in the list (since the invoices are printed in reverse for some reason, this means that the notes are all added to the first order in the series).
Re: Customer Comments
I have managed to add the payment method and billing phone number, but cannot get the Ship To phone number to pull. If I change BillToPhone to ShipToPhone we get a Runtime error. Can anyone help with this?
If anyone wants, once we get the shipping phone added we can post the file. It seems to have everything needed on the invoice now.
If anyone wants, once we get the shipping phone added we can post the file. It seems to have everything needed on the invoice now.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Customer Comments
Locate the GetShipToAddress method and make it look like
It will print the ShipToPhone information with the shipping address
Code: Select all
protected string GetShipToAddress(object dataItem)
{
Order order = (Order)dataItem;
List<string> addressList = new List<string>();
foreach (OrderShipment shipment in order.Shipments)
{
string shipTo = shipment.FormatToAddress();
string shipToPhone = string.Empty;
if (!String.IsNullOrEmpty(shipment.ShipToPhone))
shipTo += "<br />" + shipment.ShipToPhone;
if (!addressList.Contains(shipTo)) addressList.Add(shipTo);
}
if (addressList.Count == 0) return "n/a";
return string.Join("<hr />", addressList.ToArray());
}
Re: Customer Comments
Jaz - you actually have been able to post coupons on the invoice? Does this include the emailed invoice/shipping notification?
Is it a graphical coupon or just text?
Brilliant Idea! Thanks
Is it a graphical coupon or just text?
Brilliant Idea! Thanks
Bryan Bundgaard
AC7 User http://www.SchoolSupplyStore.com
AC7 User http://www.SchoolSupplyStore.com
Re: Customer Comments
The coupon used shows up on the printed invoice as text. I am assuming the emailed notifications are unchanged. I have not checked them. I guess that would be another project.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
Just an FYI - The code that Mazhar posted for Invoices.aspx contains a spelling error. Replace the text 'Shipping Medhods' with 'Methods'.
Thanks for the code!
Thanks for the code!
Bryan Bundgaard
AC7 User http://www.SchoolSupplyStore.com
AC7 User http://www.SchoolSupplyStore.com
Re: Customer Comments - Adding a little more detail
Hi all,
We like the feature of having the order notes print - we want to use it on our packing sheet.
I'd like to have the date/author also display.
Original order notes code:
I modified the code after looking up the field names in the source code:
But I get an error message:
Server Error in '/' Application.
DataBinding: 'CommerceBuilder.Orders.OrderNote' does not contain a property with the name 'Author'.
Any thoughts as to why it can't pull the data?
Thanks! ~Mo
We like the feature of having the order notes print - we want to use it on our packing sheet.
I'd like to have the date/author also display.
Original order notes code:
Code: Select all
<asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Width="100%" CssClass="dataSheet">
<Columns>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("Comment") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Code: Select all
<asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Width="100%" CssClass="dataSheet">
<Columns>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("CreatedDate") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("Author") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("Comment") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Server Error in '/' Application.
DataBinding: 'CommerceBuilder.Orders.OrderNote' does not contain a property with the name 'Author'.
Any thoughts as to why it can't pull the data?
Thanks! ~Mo
~Mo
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website

Ablecommerce Gold R11 Catalog LIVE
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website

Ablecommerce Gold R11 Catalog LIVE
Re: Customer Comments
There is no datamember name Author in the order note object. You can use the User information available with the order note. Here is the updated code
Code: Select all
<asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Width="100%" CssClass="dataSheet" DataSource='<%# GetOrderNotes(Container.DataItem) %>'>
<Columns>
<asp:TemplateField HeaderText="Created Date">
<ItemTemplate>
<%#Eval("CreatedDate") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="First Name">
<ItemTemplate>
<%#Eval("User.PrimaryAddress.FirstName") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Last Name">
<ItemTemplate>
<%#Eval("User.PrimaryAddress.LastName") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="User Name">
<ItemTemplate>
<%#Eval("User.UserName") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<%#Eval("Comment") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Re: Customer Comments
Thank you Mazhar!
Now I get a compilation error?
Compiler Error Message: CS0117: 'System.Web.UI.Control' does not contain a definition for 'DataItem'
Source Error:
Line 339: <tr>
Line 340: <td colspan="3" class="dataSheet"><h1>ORDER NOTES:</h1>
Line 341: <asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
Line 342: AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Line 343: Width="100%" CssClass="dataSheet" DataSource='<%# GetOrderNotes(Container.DataItem) %>'>
Source File: e:\hshome\scottsbt\ac7.scottsbt.com\Admin\Orders\Print\PullSheet.aspx Line: 341
Aaarrrgggh! This can get so frustrating
~Mo
Now I get a compilation error?
Compiler Error Message: CS0117: 'System.Web.UI.Control' does not contain a definition for 'DataItem'
Source Error:
Line 339: <tr>
Line 340: <td colspan="3" class="dataSheet"><h1>ORDER NOTES:</h1>
Line 341: <asp:GridView ID="OrderNotesRepeater" runat="server" ShowHeader="false"
Line 342: AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none"
Line 343: Width="100%" CssClass="dataSheet" DataSource='<%# GetOrderNotes(Container.DataItem) %>'>
Source File: e:\hshome\scottsbt\ac7.scottsbt.com\Admin\Orders\Print\PullSheet.aspx Line: 341
Aaarrrgggh! This can get so frustrating

~Mo
~Mo
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website

Ablecommerce Gold R11 Catalog LIVE
Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website

Ablecommerce Gold R11 Catalog LIVE
Re: Customer Comments
I installed the changest to put the comments on the individual pages, but they are printing on the top of the following invoice, not on the invoice that the comment is part of.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --
Re: Customer Comments
We just found that we are hitting the same issue. Everything else is working perfectly, and we have laid out the invoice to work perfectly for order completion, as well, by getting pertinent information listed together (shipping and payment information together, shipping telephone showing, etc.). I assume that the end of page simply needs to be adjusted- can anyone help with this?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Customer Comments
I haven't re-read this whole post, but in the original invoices.aspx, there is this code:
<table align="center" class="form<%# (Container.ItemIndex < (OrderCount - 1)) ? " breakAfter" : string.Empty %>" cellpadding="0" cellspacing="0" border="1">
I think that controls the break for orders, so I'm guessing anything added to the code would have to go within that table.
<table align="center" class="form<%# (Container.ItemIndex < (OrderCount - 1)) ? " breakAfter" : string.Empty %>" cellpadding="0" cellspacing="0" border="1">
I think that controls the break for orders, so I'm guessing anything added to the code would have to go within that table.
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
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
Re: Customer Comments
Please check the following update and have a look at the screen shot.
Re: Customer Comments
The Shipping Methods would not display when using this file, but I found that by copying only the portion of the file after the 'Sold To' section and overwriting the same block in our current Invoices.aspx file, everything worked plus I was able to retain all of our invoice layout modifications.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Customer Comments
Thanks, I commented that code during customization and then forgot to revert those changes. I have updated the above attachment with fixed version of file.Brewhaus wrote:The Shipping Methods would not display when using this file, but I found that by copying only the portion of the file after the 'Sold To' section and overwriting the same block in our current Invoices.aspx file, everything worked plus I was able to retain all of our invoice layout modifications.