How to display approved transactions only in My Account

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
User avatar
caveman
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Dec 19, 2008 11:08 am
Location: Indio, Ca
Contact:

How to display approved transactions only in My Account

Post by caveman » Tue Dec 30, 2008 10:31 am

Is it possible to display the approved transactions only on /Members/MyAccount.aspx. Also where can I modify the number of transactions displayed on this page?
Luis Garcia
Website Development,
Internet & SEO Marketing
http://www.cavemedia.com

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

Re: How to display approved transactions only in My Account

Post by mazhar » Wed Dec 31, 2008 9:12 am

Please explain you question a little bit.

User avatar
caveman
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Dec 19, 2008 11:08 am
Location: Indio, Ca
Contact:

Re: How to display approved transactions only in My Account

Post by caveman » Wed Dec 31, 2008 10:53 am

I'm refering to page that appears when you login as a registered user... the MyAccounts.aspx page. That page displays ALL transactions, Payment Authorized and Failed Transactions. I'd like to display only the successfully Payment Authorized transactions. Also, How do you change the number of orders listed on the page to more than 3.

Image
Luis Garcia
Website Development,
Internet & SEO Marketing
http://www.cavemedia.com

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

Re: How to display approved transactions only in My Account

Post by mazhar » Wed Dec 31, 2008 11:39 am

Also, How do you change the number of orders listed on the page to more than 3.
In the code find the following line of code and change the value according to your requirement

Code: Select all

private int maxOrders = 3;
I'm refering to page that appears when you login as a registered user... the MyAccounts.aspx page. That page displays ALL transactions, Payment Authorized and Failed Transactions. I'd like to display only the successfully Payment Authorized transactions.
Edit the MyAccountPage.ascx file and find the following code

Code: Select all

<asp:GridView ID="OrderGrid" runat="server" AutoGenerateColumns="False" ShowHeader="false" GridLines="none" 
            Width="100%" CellPadding="4" RowStyle-CssClass="altodd" AlternatingRowStyle-CssClass="alteven">
and made it look like

Code: Select all

<asp:GridView ID="OrderGrid" runat="server" AutoGenerateColumns="False" ShowHeader="false" GridLines="none" 
            Width="100%" CellPadding="4" RowStyle-CssClass="altodd" AlternatingRowStyle-CssClass="alteven" OnRowCreated="OrderGrid_RowCreated">
Now edit the MyAccountPage.ascx.cs file and add following method to it

Code: Select all

protected void OrderGrid_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            Order order = (Order)e.Row.DataItem;
            e.Row.Visible = (order.PaymentStatus == OrderPaymentStatus.Paid);
        }
    }

User avatar
caveman
Ensign (ENS)
Ensign (ENS)
Posts: 15
Joined: Fri Dec 19, 2008 11:08 am
Location: Indio, Ca
Contact:

Re: How to display approved transactions only in My Account

Post by caveman » Thu Jan 01, 2009 2:44 pm

The solution worked perfectly! Thanks Mazhar.
Luis Garcia
Website Development,
Internet & SEO Marketing
http://www.cavemedia.com

Post Reply