Calling all experts

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
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Calling all experts

Post by igavemybest » Tue Oct 06, 2009 3:44 pm

My addresses are showing up like this:
Billing Address:
Chad Crumpton 21734 State Hwy 79 EINSON, AL 35126 UNITED STATES


Instead of like this:
Billing Address:
Chad Crumpton
21734 State Hwy 79
EINSON, AL
35126 UNITED STATES


It appears that way in email notifications and on the 2nd page of the checkout.
What file handles the <br> between the lines diring the checkout process?

I am seeing:
$shipment.FormatFromAddress(true)
$shipment.FormatFromAddress(true)
$shipment.FormatToAddress(true)

...in the email template. I looked in the database and all parts of the address are in the correct place (name, address1, address2, etc)

I redownloaded AC7, copied over the complete AC7/Checkout directory and AC7/Admin/Orders directory and overwrote everything. Not working, everything is still on the same line. How do I fix this and what actually handles this process?

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

Re: Calling all experts

Post by mazhar » Wed Oct 07, 2009 4:20 am

The method you are asking is in back end code so you can't modify it. I am unable to reproduce the case on my local install. Instead of modifying the method you should better format address your self. For example for shipment from address you can do something like

Code: Select all

$shipment.Address.FirstName $shipment.Address.LastName<br />
$shipment.Address.Address1 $shipment.Address.Address 2<br />
$shipment.Address.City<br />
$shipment.Address.Country<br />
in Email template.

User avatar
batmike
Commander (CMDR)
Commander (CMDR)
Posts: 123
Joined: Tue Sep 04, 2007 10:46 am
Location: Minneapolis, MN
Contact:

Re: Calling all experts

Post by batmike » Wed Oct 07, 2009 5:41 am

One other place you could check is in the Admin panel - go to Configure -> Regions -> Countries and then click the notepad icon to edit one of the countries. On the right side, there is an area for address format that by default is set the way that you describe your addresses as appearing (I'm pretty sure, though I can't remember completely since I haven't had a default install for a while). Either way, you can insert line breaks and formatting for whichever country you're editing and that should change it across the board.

Hopefully this helps along with the previous post.

Mike

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: Calling all experts

Post by igavemybest » Wed Oct 07, 2009 2:41 pm

Do you know what file(s) specifically handle this process? Is it a file or in the database? I want to recopy over the files in case there is some corruption somewhere. It is formatted correctly in the country

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

Re: Calling all experts

Post by jmestep » Wed Oct 07, 2009 3:56 pm

I looked at your question some this morning and found the methods in the source code, but I couldn't figure out what you were referring to as the second page in the checkout and I had to get on to other work.
What page is it?
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

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: Calling all experts

Post by igavemybest » Wed Oct 07, 2009 4:31 pm

2 page checkout - the 2nd page (where the credit card info is displayed) It is really beyond the scope of that page I believe. It happens in email, etc.

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

Re: Calling all experts

Post by jmestep » Thu Oct 08, 2009 5:57 am

Here is a snippet from the source code. You might be able to change the address format by picking up "pattern" from a country and applying it to the address.

Code: Select all

public static string Format(string name, string company, string address1, string address2, string city, string province, string postalCode, string countryCode, string phone, string fax, string email, bool isHtml)
        {
            string pattern = string.Empty;
            string countryName = countryCode;

            //NEED TO GET FORMAT FOR pattern FOR THIS COUNTRY
            Country country = CountryDataSource.Load(countryCode);
            if (country != null)
            {
                //GET pattern FORMAT FROM COUNTRY RECORD
                pattern = country.AddressFormat;
                countryName = country.Name;
            }
return AddressFormatter.Format(pattern, name, company, address1, address2, city, province, postalCode, countryName, phone, fax, email, isHtml);
        }
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

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: Calling all experts

Post by igavemybest » Thu Oct 08, 2009 7:26 pm

Ok, cool, thanks...what file is that sourcecode contained within? I want to recopy it. Is it in the database somewhere, compiled within a dll?

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

Re: Calling all experts

Post by jmestep » Fri Oct 09, 2009 3:13 am

It's in the source code that I purchased-- it's in the dll if you don't have that.
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

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: Calling all experts

Post by igavemybest » Fri Oct 09, 2009 7:35 am

Thats what I meant, do you know what dll so I can replace it

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: Calling all experts

Post by igavemybest » Wed Dec 09, 2009 2:37 pm

As a follow up, in the backend, even though the address format appeared to have a break under the "Edit Countries" no bread was in fact there. I simply deleted the line break in the addres format textbox, the pressed the return key. To make sure all the breaks were there. This fixed the issue. Weird.

Post Reply