The Official Website of AgoraCart and Agora.cgi
AgoraCart.com Demos Download AgoraCart User Manuals & Wiki Gold Members Forum Go Gold Now! Gold Version Memberships

AgoraCart.com

About
Features
Download
Payment Gateways
Send a Donation
Founders Club
BLOG: News & Updates

Showcases & Demos

AgoraCart Demos
Shop Live Stores

Downloads & Add-ons

Gold Version Downloads
DBwizz Database Mgr.
AgoraCart.com Store

Help & Support

User Manuals
Gold Version Users Forum
Gold Version Chat
Tech Support
Certified Agora Pros
Certified Designers
Hire a Freelancer

Gold Version Members

Member Benefits
Join Today!
Gold Members Home
Gold Version Users Forum
Gold Version Chat Rooms
Gold Version Downloads

For Store Owners

Merchant Accounts
Cool Resources
Advertise Here
"Powered by" Logos
Web Hosting Search

Misc.

Contact Us
MEET's Talking Guide
The Ancient Greek Agora






AgoraCart Free User Forums

This is the official FAQ and Cool Tips guide For the AgoraCart shopping Cart software


Official Sponsors of the AgoraCart Project:

       


RegisterSearchFAQLog in
Reply to topic Page 1 of 1
Change "State" to "Country" - how to mak
Author Message
Reply with quote
Post 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! Very Happy

View user's profile Send private message
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
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?

View user's profile Send private message
Reply with quote
Post  
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

Reply with quote
Post  
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! Smile

View user's profile Send private message
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
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! Very Happy



Last edited by peterdouglas on Tue May 24, 05 11:56 am; edited 1 time in total
View user's profile Send private message
Reply with quote
Post  
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'} . "&nbsp;</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'} . "&nbsp;</td>\n";
  $rslt.= "</tr>\n";
  $rslt.= "</table>\n";
  return $rslt;
 }


HTH!


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
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!

View user's profile Send private message
Reply with quote
Post  
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! Very Happy

View user's profile Send private message
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Display posts from previous:
Reply to topic 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