Page 1 of 1

OrderId in "balance due" 7.0.4

Posted: Tue Jul 27, 2010 9:24 am
by igavemybest
The "OrderId" is showing in the OrderBalanceDialog instead of the "OrderNumber"

Has anyone fixed this in 7.0.4 yet so I don't have to go in and redo it for no reason? If so the code would be much appreciated!

Re: OrderId in "balance due" 7.0.4

Posted: Fri Jun 08, 2012 9:15 am
by bgreenwald54
This is still an issue in 7.0.7.

OrderBalanceDialog.ascx

Code: Select all

<div class="section">
    <div class="header">
        <h2><asp:Localize ID="phCaption" runat="server" Text="Balance Due"></asp:Localize></h2>
    </div>
    <div class="Cell">
        <asp:PlaceHolder ID="PayOrderPanel" runat="server">
            <p align="justify"><asp:Label ID="phInstructionText" runat="server" Text="Order #{0} has a balance due.  Click the button below to make a payment."></asp:Label></p><br />
            <p align="center"><asp:HyperLink ID="PayLink" runat="server" Text="Pay Now" NavigateUrl="~/Members/PayMyOrder.aspx" SkinID="Button" /></p>
        </asp:PlaceHolder>
        <asp:PlaceHolder ID="ContactUsPanel" runat="server" Visible="false">
            <p align="justify"><asp:Label ID="phInstructionText2" runat="server" Text="Order #{0} has a balance due but it includes one or more subscription payments.  Please contact us in order to complete your order."></asp:Label></p>
        </asp:PlaceHolder>
        <br />
    </div>
</div>
OrderBalanceDialog.ascx.cs

Code: Select all

 
_OrderId = AlwaysConvert.ToInt(Request.QueryString["OrderId"]);
        _Order = OrderDataSource.Load(_OrderId);
        if (_Order != null && _Order.OrderStatus.IsValid)
        {
            LSDecimal balance = _Order.GetCustomerBalance();
            if (balance > 0)
            {
                if (!OrderHasSubscriptionPayments())
                {
                    phCaption.Text = this.Caption;
                    phInstructionText.Text = string.Format(phInstructionText.Text, _OrderId);
                    PayLink.NavigateUrl += "?OrderNumber=" + _Order.OrderNumber.ToString() + "&OrderId=" + _OrderId.ToString();
                }
                else
                {
                    phInstructionText2.Text = string.Format(phInstructionText2.Text, _OrderId);
                    PayOrderPanel.Visible = false;
                    ContactUsPanel.Visible = true;
                }
            }
            else this.Controls.Clear();
        }
        else this.Controls.Clear();
The string.Format() methods in OrderBalanceDialog.ascx.cs need to have _OrderId replaced with _Order.OrderNumber.