Display Shipping Address on PaymentPage.ascx

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
dave@givemore.com
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Tue Jan 13, 2009 11:11 am

Display Shipping Address on PaymentPage.ascx

Post by dave@givemore.com » Thu Aug 04, 2011 5:11 pm

I am having difficulty displaying the customers shipping address on the PaymentPage.ascx.

On PaymentPage.ascx I have:

Code: Select all

<asp:Literal ID="FormattedShippingAddress" runat="server" EnableViewState="false"></asp:Literal>
And in the Page_PreRender function on PaymentPage.ascx.cs I have:

Code: Select all

User user = Token.Instance.User;
Address shippingAddress = null;

foreach (Address tempAddress in user.Addresses) if (tempAddress.Nickname == "Shipping") shippingAddress = tempAddress;

if (shippingAddress != null)
{
	FormattedShippingAddress.Text = shippingAddress.ToString(true);
}
Which I feel like should work, but I am getting the error:
error CS0103: The name 'FormattedShippingAddress' does not exist in the current context


I have tried to declare 'FormattedShippingAddress' in other locations on the PaymentPage.ascx.cs but have had no luck.

Please help.

Thanks!
Give More Media
http://www.givemore.com/

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Display Shipping Address on PaymentPage.ascx

Post by plugables » Tue Aug 09, 2011 7:40 am

This is strange. I suspect that files being edited are different from the files being compiled.

dave@givemore.com
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Tue Jan 13, 2009 11:11 am

Re: Display Shipping Address on PaymentPage.ascx

Post by dave@givemore.com » Wed Aug 10, 2011 3:47 pm

Thanks for the reply Plugables.

How could I determine if the files being compiled are different from the files I edited?

Also, is there a way to force a compile of the two new files?

I encounter this error a lot and it would almost have to be something like this.

Thanks!
Joe
Give More Media
http://www.givemore.com/

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Display Shipping Address on PaymentPage.ascx

Post by plugables » Tue Aug 16, 2011 6:16 am

Do you have multiple copies of PaymentPage.ascx in your store?
Are you editing the default files that are in ConLib folder?
Can you post the code from PaymentPage.ascx and PaymentPage.ascx.cs?

Post Reply