Orders cannot print- order number and ID do not match

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Orders cannot print- order number and ID do not match

Post by Brewhaus » Mon Apr 20, 2009 10:58 am

Suddenly the order number and order ID no longer match, and we cannot print any invoices for orders where this is the case. I am not sure why the system wants both an order number and order ID to be generated, but everything prior to this point do match up fine. When we go to an unprintable order, the URL is as follows:

https://
www.
hotsaucedepot.
com/Admin/Orders/ViewOrder.aspx?OrderNumber=53130&OrderId=53133

If we try to override the ID to make it match the order number, we get an error. How can we fix this, and also avoid it happening in the future? We never had any issues prior to upgrading to 7.0.2, but now seem to be running into several.
Last edited by Brewhaus on Wed Nov 05, 2014 11:49 am, edited 1 time in total.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Orders cannot print- order number and ID do not match

Post by compunerdy » Mon Apr 20, 2009 11:23 am

I ran into this same issue. viewtopic.php?f=42&t=10253

I think the only warning given to us was to make sure we fixed the E-mail templates but obviously this could easily affect a lot more than just E-mails if you did any modifications at all.

Once the numbers go different you just need to fix the way URL's/E-mails etc are referenced. You will need to change OrderId into OrderNumber of vise versa until everything is displaying correctly. I ended up just needing to fix E-mail and invoice templates and upgraded my shipper 3 program and I think that was it.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Orders cannot print- order number and ID do not match

Post by Brewhaus » Mon Apr 20, 2009 11:54 am

I opened the SQL table and corrected the Order Number, which was a quick one-time fix. So, do we want to start ignoring the Order ID from now on?

I had made the changes noted on the 7.0.2 post upgrade tasks. I assumed that this would keep things in check, but when I look at the first e-mail template I am left with concerns. Here is our order confirmation e-mail:
<html>
<head>
<style type="text/css">
TABLE.Email {
width: 640px;
padding: 5px;
margin: 0px;
border: 1px solid #5872CB;
}
TABLE.Email TH {
font-weight: bold;
font-size: 12px;
color: #ffffff;
font-family: Arial, Verdana, Sans-Serif;
font-style: strong;
background-color: #304FBA;
text-align: center;
text-decoration: none;
padding: 5px;
}
TABLE.Email TD {
font-weight: normal;
font-size: 12px;
color: #000000;
font-family: Arial, Verdana, Sans-Serif;
background-color: #ffffff;
text-align: left;
text-decoration: none;
padding: 3px;
}
</style>
</head>
<body>
<table class="Email">
<tr>
<td colspan="2" class="Email">
<p><strong>Thank you for your order $order.BillToFirstName $order.BillToLastName !</strong></p>
<p>If you would like to check the status of your order, manage addresses, update your email, or customize many other options, please visit your personal My Account page.</p>
<p>Thank you again for shopping with us.<br>
</p>
</td>
</tr>
</table>
<table class="Email">
<tr>
<th class="Email">Order Summary</th>
</tr>
</table>
<table class="Email">
<tr>
<td class="Email"><div align="right"><strong>Email Address:</strong></div></td>
<td class="Email">${order.BillToEmail}</td>
</tr>
<tr>
<td class="Email" width="140"><div align="right"><strong>Order Number:</strong> </div></td>
<td class="Email" width="500"><p>$order.OrderId</p></td>
</tr>
<tr>
<td class="Email"><div align="right"><strong>Ordered on:</strong></div></td>
<td class="Email">$order.OrderDate.ToString("G")</td>
</tr>
<tr>
<td class="Email"><div align="right"><strong>Ordered by:</strong></div></td>
<td class="Email">$order.BillToFirstName $order.BillToLastName</td>
</tr>
<tr>
<td><div align="right"><strong>Order Total:</strong></div></td>
<td>$order.Items.TotalPriceById().ToString("ulc")</td>
</tr>
<tr>
<td class="Email"><div align="right"><strong>Order Status:</strong></div></td>
<td class="Email"><a href="${store.StoreUrl}Members/MyOrder.aspx?OrderId=$order.OrderId">View Online</a></td>
</tr>
</table>
<table class="Email">
<tr valign="top">
<td class="Email" width="50%"><strong>Billing Address:</strong>
<div style="padding-left:30px;">
$order.FormatAddress(true)
</div>
</td>
<td class="Email" width="50%">
<strong>Payment Method:</strong>
<div style="padding-left:30px;">
#foreach($payment in $payments)
$payment.PaymentMethodName<br />
$payment.ReferenceNumber<br />
#end
</div>
</td>
</tr>
</table>
#set ($shipNo = 1)
#foreach($shipment in $order.Shipments)
#beforeall
<table class="Email">
<tr>
<th class="Email">Shipment Information</th>
</tr>
</table>
#each
<table class="Email">
<tr>
<td colspan="4" class="Email" style="text-align: center;">
<strong><u>Shipment $shipNo of $order.Shipments.Count</u></strong>
#set ($shipNo = $shipNo + 1)
</td>
</tr>
<tr>
<td class="Email" colspan="4" style="text-align: center;">
<table width="100%">
<tr>
<td class="Email" valign="top">
<strong>Ship From:</strong>
<div style="padding-left:30px;">
Brewhaus / Hot Sauce Depot<br>5901 Park Vista Circle, #105<br>Keller, TX 76248<br>817-750-2739
</div>
</td>
<td class="Email" valign="top">
<strong>Ship To:</strong>
<div style="padding-left:30px;">
$shipment.FormatToAddress(true)
#if ($shipment.ShipMessage.Length > 0)
<br/><strong>Message:</strong>$shipment.ShipMessage
#end
</div>
</td>
<td class="Email" valign="top">
<strong>Shipment Method:</strong>
<div style="padding-left:30px;">
$shipment.ShipMethodName</div>
<div style="padding-left:30px;"></div>
</td>
</tr>
</table>
</td>
</tr>
#foreach($orderItem in $order.Items.FilterByShipmentAndSort($shipment.OrderShipmentId))
#beforeall
<tr>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>SKU</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Description</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Quantity</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Price</strong></td>
</tr>
#each
#if (($orderItem.OrderItemType == "Product") || ($orderItem.OrderItemType == "Discount") || ($orderItem.OrderItemType == "GiftWrap") )
<tr class="Email">
<td class="Email" style="text-align: center;">
#if (($orderItem.OrderItemType == "Product"))
$orderItem.Sku
#elseif (($orderItem.OrderItemType == "Discount"))
DISCOUNT
#elseif (($orderItem.OrderItemType == "GiftWrap"))
GIFTWRAP
#end
</td>
<td class="Email">
$orderItem.Name
#if ($orderItem.VariantName.Length > 0)
($orderItem.VariantName)
#end
#if ($orderItem.WrapStyle)
<br>
Gift-Wrap: $orderItem.WrapStyle.Name
#end
</td>
<td class="Email" style="text-align: center;">$orderItem.Quantity</td>
<td class="Email" style="text-align: right;">$orderItem.ExtendedPrice.ToString("ulc")</td>
</tr>
#end
#end
<tr class="Email"><td colspan="4">&nbsp;</td>
</tr>
</table>
#end
<!-- Output Non-Shipping Items -->
#foreach($orderItem in $order.Items.FilterByShipmentAndSort())
#beforeall
<table class="Email">
<tr>
<th class="Email">Non-Shipping Items</th>
</tr>
</table>
<table class="Email">
<tr>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>SKU</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Name</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Price</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Quantity</strong></td>
<td style="background:#cccccc; color:#00000; text-align: center;"><strong>Total</strong></td>
</tr>
#each
#if (($orderItem.OrderItemType == "Product"))
<tr>
<td class="Email" style="text-align: center;">$orderItem.Sku</td>
<td class="Email">
$orderItem.Name
#if ($orderItem.VariantName.Length > 0)
($orderItem.VariantName)
#end
</td>
<td class="Email" style="text-align: right;">$orderItem.Price.ToString("ulc")</td>
<td class="Email" style="text-align: center;">$orderItem.Quantity</td>
<td class="Email" style="text-align: right;">$orderItem.ExtendedPrice.ToString("ulc")</td>
</tr>
#end
#afterall
</table>
#end
<table class="Email">
<tr>
<th class="Email">Order Totals</th>
</tr>
</table>
<table class="Email">
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Subtotal:</strong>
</td>
<td width="15%" class="Email" style="text-align: right;">
$order.Items.TotalPriceById(0).ToString("ulc")
</td>
<td width="55%" rowspan="5"><p align="center"><strong>Thanks again for shopping with us!</strong></p></td>
</tr>
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Tax:</strong>
</td>
<td width="15%" class="Email" style="text-align: right;">
$order.Items.TotalPriceById(3).ToString("ulc")
</td>
</tr>
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Shipping and Handling:</strong>
</td>
<td width="15%" class="Email" style="text-align: right;">
$order.Items.TotalPriceById(1, 2).ToString("ulc")
</td>
</tr>
<tr>
<td width="40%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Discounts:</strong>
</td>
<td width="15%" class="Email" style="text-align: right;">
$order.Items.TotalPriceById(4).ToString("ulc")
</td>
</tr>
<tr>
<td width="30%" style="background:#cccccc; color:#00000; text-align: right;">
<strong>Total:</strong>
</td>
<td width="15%" class="Email" style="text-align: right;">
$order.Items.TotalPriceById().ToString("ulc")
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
Should we be changing the OrderID referenced to OrderNumber?

As for invoices, we re-incorporated our version 7 templates because we had made so many modifications. Should we be changing OrderID references to OrderNumber?

What is the reason that the system now uses a separate OrderID and OrderNumber? And, why does the system reference both in the URL?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Orders cannot print- order number and ID do not match

Post by compunerdy » Mon Apr 20, 2009 12:22 pm

I cant answer the "why" as I am not sure why it was all changed myself.

You need to change OrderId to OrderNumber wherever you want to display the actual order number. As in

Code: Select all

<td class="Email" width="140"><div align="right"><strong>Order Number:</strong> </div></td>
<td class="Email" width="500"><p>$order.OrderId</p></td>
should be

Code: Select all

<td class="Email" width="140"><div align="right"><strong>Order Number:</strong> </div></td>
<td class="Email" width="500"><p>$order.OrderNumber</p></td>
But you DONT need to change ones like this

Code: Select all

<td class="Email"><div align="right"><strong>Order Status:</strong></div></td>
<td class="Email"><a href="${store.StoreUrl}Members/MyOrder.aspx?OrderId=$order.OrderId">View Online</a></td>

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Orders cannot print- order number and ID do not match

Post by Brewhaus » Mon Apr 20, 2009 12:42 pm

This change to running a separate OrderID and OrderNumber is going to be a real headache. I cannot understand why they would change this, as it seems to be duplicating something while allowing them to change independently. I cannot imagine that I am the only one who has customized pages such as the invoice / packing slip, and this makes us start all over with such changes.

I BELIEVE at this point that the only changes that are affected for us are the e-mail templates (which should be pretty easy to resolve) and our invoices.aspx and packingslip.aspx files. Still, that is a real pain, and likely will be in the future, as well.

Did you hit any other areas that you found needed to be fixed? I am going through my head to think of any other files that I put the 7.0 version in place due to modifications so that I know if I need to fix anything else.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Orders cannot print- order number and ID do not match

Post by Brewhaus » Mon Apr 20, 2009 2:04 pm

Okay, it appears that even Able is not fully onto the OrderID / OrderNumber thing yet, so I don't have to feel so bad. We just had a duplicate order, and when cancelling one view the batch system, the OrderNumber is shown in the URL (correctly), but the Order showing to be cancelled is using the OrderID (incorrectly). So in canceling order number 53136, it shows the following in the list:

53145 Payment Pending McManus, Albert $55.29 4/20/2009 Authorized Unshipped

I assume that this is simply a matter of making the correction to OrderNumber from OrderId, but I don't think that I want to mess with those files. :?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Orders cannot print- order number and ID do not match

Post by heinscott » Mon Apr 20, 2009 2:12 pm

You might want to check the batch processes for Printing invoices/packing slips/ etc... Those didn't work on mine either until I made some changes. Those were files that I had customized, so, it could very well have been my fault for not updating them.

Scott

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Orders cannot print- order number and ID do not match

Post by Brewhaus » Mon Apr 20, 2009 2:27 pm

The invoice and packing slip files seem to be the same for both printing from the specific order and for batch printing. My only issue is that it is pulling by OrderID, not OrderNumber. OrderID shows up numerous places in those two files, and I do not know which of those should be changed and which should remain, so I may have to re-do all of the customizations.

The code for my invoices.aspx file is:

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(Object dataItem)
    {
        OrderNoteCollection orderNotes = new OrderNoteCollection();

        Order order = (Order)dataItem;
        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 PaymentCollection GetPayments(int orderId)
    {
      Order order = OrderDataSource.Load(orderId);
        return order.Payments;
    }  
   
    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();
        OrderList.Text = GetOrderNumbers(selectedOrders);
    }

    protected void MarkPrinted_Click(object sender, EventArgs e)
    {
        List<int> selectedOrders = GetSelectedOrders();
        if ((selectedOrders == null) || (selectedOrders.Count == 0)) Response.Redirect("~/Admin/Orders/Default.aspx");
        OrderCollection orders = GetOrders(selectedOrders.ToArray());
        OrderStatus orderStatus = OrderStatusDataSource.Load(7,false);
        foreach (Order order in orders)
            order.UpdateOrderStatus(orderStatus);
    }

    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();
            string shipToPhone = string.Empty;
            if (!String.IsNullOrEmpty(shipment.ShipToPhone))
                shipTo += "<br />" + shipment.ShipToPhone;
            if (!addressList.Contains(shipTo))
            {
                if (!string.IsNullOrEmpty(shipment.ShipMessage))
                    shipTo += "<br /><b>Shipping Note:</b> " + shipment.ShipMessage;
                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 true;" OnClick="MarkPrinted_Click" />
        <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%;"><img border="0" src="/Assets/Invoice-Logo.jpg" /></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 /><br>
                            <asp:Label ID="ShippingMethodsLabel" runat="server" SkinID="FieldHeader" Text="Ship By: "></asp:Label>
                            <asp:Label ID="ShippingMethods" runat="server" Text='<%# GetShipMethods(Container.DataItem) %>'></asp:Label>
<asp:formview
                               runat="server"
                                HorizontalAlign="left"
                                id="paymentref_fv"
                                DataSource='<%#GetPayments(Convert.ToInt32(Eval("OrderId")))%>'
                      >
                               <ItemTemplate>
               <b>Paid by:</b>
                                    <asp:Label ID="PaymentMethodName" runat="server" Text='<%#Eval("PaymentMethodName")%>'></asp:Label>
                               <asp:Label ID="ReferenceNumber" runat="server" Text='<%#Eval("ReferenceNumber")%>'></asp:Label> 
            </ItemTemplate>   
                          </asp:formview>

                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="width:10px;text-align:center;font-weight:bold" valign="top">
                        S O L D &nbsp; T O
                    </td>
                    <td valign="middle" width="50%">
                        <%# GetBillToAddress(Container.DataItem) %><br>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label><%# Eval("BillToPhone") %><br>
                    </td>
                    <td style="width:10px;text-align:center;font-weight:bold" valign="top">
                        S H I P &nbsp; 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>
                <tr >
                    <td colspan="4" valign="middle">
                        <asp:GridView ID="OrderNotesRepeater" runat="server" AutoGenerateColumns="false" CellPadding=0 CellSpacing=0 GridLines="none" CssClass="dataSheet" DataSource='<%# GetOrderNotes(Container.DataItem) %>' ShowHeader="true" Width="100%">
                        <HeaderStyle HorizontalAlign="Left" />
                            <Columns>
                                <asp:TemplateField HeaderText="Order Notes" >
                                    <ItemStyle Wrap="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="CommentLabel" runat="server" Text='<%#Eval("Comment") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:Repeater>
    
</asp:Content>
The packing slip file is very similar (I have just removed the pricing). So, is it pretty straightforward to correct this file, or should I just implement my customizations on the new 7.0.2 files?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

tachia
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue Dec 30, 2008 6:30 pm

Re: Orders cannot print- order number and ID do not match

Post by tachia » Wed Jun 29, 2011 9:51 pm

The hosting service recently crashed and they were able to get it to work from an earlier version. To prevent the order numbers for duplicating, if they were able to get the missing orders, I changed the Next Order Number to a higher number. Now I have the same issue as above. The Order Number and Order ID do not match, so I'm not able to print invoices and customers are given two separate numbers.

I think it would be easier just to change the Order ID to match the next Order number. Can anyone suggest a way to change this to match or what else can be done to fix this issue?

I would really appreciate any assistance or if you can tell me the steps to resolve this problem.

Thanks.

Tachia

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

Re: Orders cannot print- order number and ID do not match

Post by jmestep » Thu Jun 30, 2011 7:50 am

You can't change the orderid, you can only change the ordernumber. OrderId is an autonumber field.
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

tachia
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue Dec 30, 2008 6:30 pm

Re: Orders cannot print- order number and ID do not match

Post by tachia » Thu Jun 30, 2011 3:15 pm

Thanks for your response.

Do you have any other solutions to this issue?

How can you change the Order Number, so that it can match up with the order ID? This has to be an issue with the software, since customers see both the order number and order ID.

I notice the original questions was also never answered.

tachia
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue Dec 30, 2008 6:30 pm

Re: Orders cannot print- order number and ID do not match

Post by tachia » Fri Jul 01, 2011 9:01 am

I just wanted to simplify the details of the issue, so that I may get some help with this issue.

Cause:
The hosting company I was with crashed and their last backup was 3 days before the event, so I was not able to get orders for the last 3 days. To prevent the order numbers for duplicating, I changed the Next Order Number to a higher number. At the time, I didn't realize the order number/order ID would not match (which makes no sense to have two different numbers).

Problems:
Order Number and OrderID not matching
Customer are getting both an order id and order number
I'm not able to print invoices (I think this is the reason for this issue based on the original post)
I'm sure their may be other issues that have not surfaced yet because of the error.

Possible Solutions:
Change the order ID to match the order number or set both to the same number
Remove the order ID and just show the order number

Thanks in advance for any assistance with these issues.

Tachia

Post Reply