 |
Page 1 of 1
|
Author |
Message |
peterdouglas
Newbie - Two Blades
Joined: 04 May 2005
Posts: 29
|
 Change "State" to "Country" - how to mak
Hello, I've installed a second Agora cart set up to handle International orders, since the shipping prices are different than for US/Canada orders. Normally on Step 1, the customer needs to enter their zip/postal code and select their state from a drop-down menu. I changed the drop-down menu to be a list of countries, and it says "Please select your country" (instead of state).
The problem is... when Agora populates the fields on the secure Authorize.net order form, it inserts the country into the field for state. After lots of searching, I still can't find the file to change so that it will insert the information selected from the Country drop-down menu into the field for "Country" and NOT "State."
Any ideas? You can see my International cart at http://www.nicotinefreecigarettes.ca/shoppingcartint/agora.cgi
Thanks!
|
Mon May 23, 05 7:46 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
The problem is that you are using the state variable to handle the country and it will always bring up the state field as long as you have the variable being: Ecom_ShipTo_Postal_StateProv
Editing for the country will require editing the order form and the AuthorizeNet-order_lib.pl file in the library directory of the store.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Mon May 23, 05 2:40 pm |
 |
 |
peterdouglas
Newbie - Two Blades
Joined: 04 May 2005
Posts: 29
|
I located the "AuthorizeNet-order_lib.pl" file and looked for any places where it appeared that Ecom_ShipTo_Postal_StateProv was called and then changed it to Ecom_ShipTo_Postal_CountryCode (on my copy, it was lines 67 and 77). There didn't appear to be any other places where it needed to be changed, but I must be missing something... when Step Two comes up, it says "You forgot to fill in Shipping Address State." (it said "country" before I changed Ecom_ShipTo_Postal_StateProv to Ecom_ShipTo_Postal_CountryCode in AuthorizeNet-orderform.html (page title "Step One").
I was thinking I have to modify "Step Two" but can't find that page. I can feel that I'm getting close. What do you think... did I change too much, not enough or the wrong thing?
|
Mon May 23, 05 7:03 pm |
|
 |
Dan
Guest
|
hell-o
look closely at your "required fields" in the AuthorizeNet-order_lib.pl file. you can either remove the state required field or change it to match your edit.
you're probably going to have probs with taxes. if the tax script can't find the state field you may get some errors. it would be better to leave the Ecom_ShipTo_Postal_StateProv as it is then just change the printed text to reflect any name you want in step one, step two, emails and log.
hmmm then again if the state field is passed to auth.net then it will be kinda confusing. try renaming the "state" text to "State/Province" then adding the country field. use the offline source files (html and order_lib.pl) as a guide.
regards,
dan
|
Tue May 24, 05 2:25 am |
|
 |
peterdouglas
Newbie - Two Blades
Joined: 04 May 2005
Posts: 29
|
Thanks Dan. I think I'm getting closer. I'm not worried about the taxes since the person responsible for filling the orders takes care of it. But I think he only needs to collect tax for sales shipped within state. Orders going out of the country aren't subject to tax.
I changed the required field for postal code to country code and modified the "step one" page to reflect this too. So far so good, no more error messages. But on step two, where you need to confirm the info, it still refers to the country as "state." If I confirm and continue, it lets me go ahead, but on the secure Authorize.net form it only inserts the zip/postal code. Country is left blank.
My guess is that I just need to update the "step two" page to reflect the changes. What do you think? I would have tried it already, but I can't locate the file for "step two." Does anyone know where it is, or what it's called?
Thanks!
|
Tue May 24, 05 5:40 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Again, it is in the AuthorizeNet-order_lib.pl file.
Step Two:
You need to edit things in the following subroutine:
"sub AuthorizeNet_verification_table"
Also, to pass the country variable to AuthorizeNet you need to edit the "sub print_AuthorizeNet_SubmitPage" subroutine:
Find:
Code:
<INPUT TYPE=HIDDEN NAME=X_Ship_To_State VALUE=\"$form_data{'Ecom_ShipTo_Postal_StateProv'}\">
NEEDS TO BE:
Code:
<INPUT TYPE=HIDDEN NAME=x_ship_to_country VALUE=\"$form_data{'Ecom_ShipTo_Postal_CountryCode'}\">
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue May 24, 05 6:22 am |
 |
 |
peterdouglas
Newbie - Two Blades
Joined: 04 May 2005
Posts: 29
|
SUCCESS!! (sort of) I'm getting closer! The country is now placed in "country" field on the Authorize.net secure form. But I just need to change what appears in the table of step two (it says "state" instead of country and "zip" instead of postal code).
I know I'm in the right area, finally was able to change the background colors of the table in step two where it confirms state and zip. But... still not able to change the words "state" to "country" and "zip" to "postal code" where the user sees the information confirmed in step two. Something tells me I need to find $mytable (not able to locate it yet).
When I view the source from the browser where everything is put together I can see what's wrong, but can't find where to change it in the files. It's probably something obvious, but I'm more of a designer than a programmer!
If you'd like to see the cart thus far, it's at http://www.nicotinefreecigarettes.ca/shoppingcartint/agora.cgi
Thanks!
Last edited by peterdouglas on Tue May 24, 05 11:56 am; edited 1 time in total
|
Tue May 24, 05 11:39 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Again, the "sub AuthorizeNet_verification_table" is the area that you need to edit....
Like so:
Code:
sub AuthorizeNet_verification_table {
local ($rslt)="";
$rslt = "<table border=0 width=100%>\n<tr>\n";
$rslt.= "<td width=\"50%\" align=right>Postal Code:</td>\n";
$rslt.= '<td width = "50%" align=left>' .
$form_data{'Ecom_ShipTo_Postal_PostalCode'} . " </td>\n";
$rslt.= "</tr>\n";
$rslt.= "<tr>\n";
$rslt.= "<td width=\"50%\" align=right>Country:</td>\n";
$rslt.= '<td width = "50%" align=left>' .
$form_data{'Ecom_ShipTo_Postal_CountryCode'} . " </td>\n";
$rslt.= "</tr>\n";
$rslt.= "</table>\n";
return $rslt;
}
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue May 24, 05 11:56 am |
 |
 |
peterdouglas
Newbie - Two Blades
Joined: 04 May 2005
Posts: 29
|
THANK YOU VERY MUCH! Yes, that does help, a lot! My International shopping cart now works flawlessly! You've been a great help. I wanted to figure it out myself, but I was going crazy! This is great, because I need to duplicate this Agora cart for another website.
Now, just one more little question - and tell me if I've reached my quota of questions for today and am cut off - but... I've been looking to change the background colors of all the tables to light gray (#CCCCCC) which I've been able to for some of them, but not the one on Step One and Step Two where it shows picture of the products as well as the table where it confirms the totals.
I also wouldn't mind changing the font to Arial in those tables and the footers. (Probably in the same spot as the colors)
Finally, I wanted to change the title for "Step Two" to read "Step 2 of 3" (I was able to change Step One to "Step 1 of 3").
These are minor styling points, at least the cart works now. But, if anyone could point me to right place to look for making those changes, I'd be most grateful. And that will be it! My cart will be totally done!
|
Tue May 24, 05 12:30 pm |
|
 |
peterdouglas
Newbie - Two Blades
Joined: 04 May 2005
Posts: 29
|
PS: Yeah, I know, that's more than one question. Anyways, I think I need to take a break from the computer for a little while... I'm missing the obvious now!
Thanks again!
|
Tue May 24, 05 12:42 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
The order totals & product table colors can be changed in the manager, Store Layout.
For the Step Two.... agora_order_lib.pl file, look for the following subroutine:
"sub process_order_form"
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue May 24, 05 12:56 pm |
 |
 |
|
The time now is Fri May 02, 25 5:38 am | All times are GMT - 7 Hours
|
Page 1 of 1
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|