Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Active Countries


Guest

Recommended Posts

I found out about the Faroe Island *silly me - just enter them - sorry for that post*

 

It works great now, but the customer.php page pusles me.

 

Why is there passwords fields?

Maybe I made a mistake, but the field is emty when I look at a customer?

 

The " case 'insert': " is that part of the "ENTRY_STATE;" ?

 

I need to add two more fields to this page - and I'm not sure why this "insert" case is there for?

I cannot get my two new fields to work the right way....

 

Helle :-"

Link to comment
Share on other sites

  • Replies 257
  • Created
  • Last Reply

Top Posters In This Topic

I cannot get that customers.php to work - it wont update anything? Even trying the page that comes with this contrib?

 

Helle :(

 

 

Yes there is a bug updating customer accounts.

 

Locate the following in admin\customers.php

			$zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'");

 

Replace it with this:

			$zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_id = '" . tep_db_input($entry_zone_id) . "'");

 

 

Also the code assumes the accounts were created using an identifier for the state rather than the state name.

 

Finally the reason for changing the customers.php page is due to the state/country selection. I simply added the ability with the same script to create new accounts. The password fields work like with the create/update account pages. So if you create a new account with the new customers.php you have to supply a password.

 

For existing accounts leaving the password fields blank maintains the original password. Entering a different account password simply changes the account password.

 

And the notify customer checkbox sends an email notifying the customer about the changes.

Link to comment
Share on other sites

Hmmm, when I tried to change a password - I got a blank page with this in the broswser line:

 

customers.php?selected_box=customers&page=1&cID=10&action=update

 

How is that?? If I leave the password fields - no problem

 

Helle

Link to comment
Share on other sites

Hmmm, when I tried to change a password - I got a blank page with this in the broswser line:

 

customers.php?selected_box=customers&page=1&cID=10&action=update

 

How is that?? If I leave the password fields - no problem

 

Helle

 

 

Did you include items-19 and 20 (see documentation)? The password functions (and password_funcs.php) have to be present and at the correct locations.

Edited by enigma1
Link to comment
Share on other sites

Sorry - clearly my mistake *totally forgot the password file*

 

Everything works great - except the email the customer get. Can that be made language independant??

 

Name:

Email:

Telephone:

Address:

City:

State:

Country:

Zipcode:

 

...... and perhaps a link to the www.adress.com

 

Helle :rolleyes:

Link to comment
Share on other sites

Tks for another great contribution, enigma! Great job!

And tks for fixing the customer editing bug. I thought I had done something wrong.

 

I think there's another bug, or maybe this time I did do something wrong: I can't delete a tax zone. When I click on the delete button, it will take me back to the same page and nothing happens. Now if I click on the zone tax folder and try to delete the country with all zones by clicking on the delete button, I'm getting an error message and it won't be deleted either:

 

Warning: Invalid argument supplied for foreach() in C:\Documents and Settings\Patty\My Documents\xampp\htdocs\My Web Sites\loja\admin\geo_zones.php on line 459

 

Any ideas??

 

TIA for your assistance with this.

Edited by Patty

Patty

Link to comment
Share on other sites

OK, I think I might have found the solution for deleting the zone: I just uncommented the 3 instances of case 'delete_zone'. First one around line 52, second one around line 567 and the third one around line 608 of catalog/admin/geo_zones.php file.

 

Since I'm no programmer, I can't tell if this is the right thing to do or if it will have any "collateral damage". But it seems to be working now.

 

Also, the problem above is caused when trying to delete a sub-zone without selecting any, in other words, just by hitting the delete button. So it does seem to be a bug.

 

Any thoughts about that, enigma?

Edited by Patty

Patty

Link to comment
Share on other sites

Yes there was a problem deleting the geo-zones folders. I did a new release v2.02 which fixes the problem. Yes for the 2nd you do get this warning if you do not select a zone and I will fix that with the next version

 

As of the multi-lingual question I haven't checked but the whole system should follow the language procedure. In other words have you tried suppying the different language file names for the emails?

Link to comment
Share on other sites

Great! Tks for the quick fix! :)

 

Could you just tell me which file(s) contain the changes, so I don't have to compare all of them? It would save me some time and work. Thank you!

Patty

Link to comment
Share on other sites

Thank you! :)

 

I noticed another little thing: the SQL file for World Zones has several names using encoded special characters. This causes a problem when a customer is signing up and selects one of this zones, since the dropdown shows the names with the plain special characters.

 

I corrected the whole file, changing all special characters which were encripted. It would be good if you could replace it, so users won't have this problem.

 

I can post the corrected file here (which is a lonnnnng list) or just upload it to the contribution. What do you prefer?

Patty

Link to comment
Share on other sites

I can post the corrected file here (which is a lonnnnng list) or just upload it to the contribution. What do you prefer?

 

If you can upload the file with these comments in the active countries contribution page (not here in the forum), that will be great. I can also included it with the next version. Thanks.

Link to comment
Share on other sites

hello enigma1,

the only thing I would like to add is when a new customer doing registration, be able to add the state or provience, so when you do print on packing slip or invoice shows the state as well,

for example a customer lives in Los Angles. USA,

but which state. it is important for shipping.

So can I use this module to do this.

thanks again.

 

 

 

 

 

 

Active Countries contribution offers control of the countries table through the osc admin cpanel. In addition the contribution automatically filters the associated states (when present) of the selected country. This approach eliminates selection difficulties visitors experience during the registration process and has no active script dependencies. Multiple modifications are done on the catalog side, to address the 4 areas a user can alter the country information. Those are in the create account, address book change, payment address and shipping address.

 

If only one country is enabled the country drop-down list is replaced by simple text while the requirement asterisk is removed.

 

v1.00 is available to download

 

http://www.oscommerce.com/community/contributions,3607

Link to comment
Share on other sites

This is already included with the default osC. The state is included with the packing slip and invoice. In fact the full billing/shipping address is included. Unless I did not understand the question this is not related with this contribution.

 

hello enigma1,

the only thing I would like to add is when a new customer doing registration, be able to add the state or provience, so when you do print on packing slip or invoice shows the state as well,

for example a customer lives in Los Angles. USA,

but which state. it is important for shipping.

So can I use this module to do this.

thanks again.

Link to comment
Share on other sites

Thanks to getting back to me.

what I need is when a new customer is going to create an account, right after the City is Country and there is no State or Province has added, so when you are printing an invoice or packing slip where the customer address is the State or Province is missing. is there any way that I can add this option so when customer doing registration can also add the State or Province.

by the way I did download the Active Countries and followed the read me file, after I modify the files, and when I upload it, some of the pages did not appear. I did update the mySql database as well.

Thanks again.

KOROUSH.

 

 

hello enigma1,

the only thing I would like to add is when a new customer doing registration, be able to add the state or provience, so when you do print on packing slip or invoice shows the state as well,

for example a customer lives in Los Angles. USA,

but which state. it is important for shipping.

So can I use this module to do this.

thanks again.

Link to comment
Share on other sites

go to the osCommerce demo site to see that there is by default a state when creating new accounts.

https://demo.oscommerce.com/create_account.php

 

So it's perhaps your configuration. There is a switch for the state in osC Admin->Configuration->Customer Details. Check the state switch. Should be set to true if you want to have the state included.

 

Thanks to getting back to me.

what I need is when a new customer is going to create an account, right after the City is Country and there is no State or Province has added, so when you are printing an invoice or packing slip where the customer address is the State or Province is missing. is there any way that I can add this option so when customer doing registration can also add the State or Province.

by the way I did download the Active Countries and followed the read me file, after I modify the files, and when I upload it, some of the pages did not appear. I did update the mySql database as well.

Thanks again.

KOROUSH.

Link to comment
Share on other sites

enigma1 you are the greatest,

the problem was on customer configuration. I fix it.

I was thinking about everything except that.

Thanks,

KOROUSH

 

go to the osCommerce demo site to see that there is by default a state when creating new accounts.

https://demo.oscommerce.com/create_account.php

 

So it's perhaps your configuration. There is a switch for the state in osC Admin->Configuration->Customer Details. Check the state switch. Should be set to true if you want to have the state included.

Link to comment
Share on other sites

hello enigma1

I have a problem with my credit card process, I use beanstream which I have download it from:

http://www.oscommerce.com/community/contri...arch,beanstream

 

after I install it, I did the test process; and it will give me the error that "Shipping state/province does not match country" the state/province is match, is that anyway you can figure this one out, I have no idea.

thanks,

KOROUSH

 

go to the osCommerce demo site to see that there is by default a state when creating new accounts.

https://demo.oscommerce.com/create_account.php

 

So it's perhaps your configuration. There is a switch for the state in osC Admin->Configuration->Customer Details. Check the state switch. Should be set to true if you want to have the state included.

Link to comment
Share on other sites

  • 2 weeks later...

Hi enigma1,

 

First of all, thanks for the great contribution! A lot of effort definitely went into writing it.

 

I just installed the newest version and it's just what I was looking for, but I am running into a couple errors that I'm hoping you can help me out with.

 

1. In the configuration I set my active country to US. When I go to register as a new customer, I get a pull down menu with all the states, which is great, but next to the country field I get this error:

 

Fatal error: Call to undefined function: tep_get_active_countries() in /home/collig5/public_html/includes/functions/html_output.php on line 304

I read through this support forum and tried some of the suggestions, but nothing seems to work.

 

2. Also, when I go through the checkout as a logged in customer and go to edit the shipping info (in checkout_shipping_address.php) the state option is just a text input field, and the country option has a drop down menu with all countries, not just the active country (US).

 

I'm running out of ideas where to fix this, so I'd appreciate any help!

 

Thanks,

 

Kasia

Link to comment
Share on other sites

make sure you installed the module properly. Item-2 of the documentation shows where the tep_get_active_countries function goes to. So revise your mods from the installation instructions because seem like you haven't installed it properly.

Link to comment
Share on other sites

make sure you installed the module properly. Item-2 of the documentation shows where the tep_get_active_countries function goes to. So revise your mods from the installation instructions because seem like you haven't installed it properly.

Thanks for the quick reply. It turns out that I modified all the code correctly, but some of the files didn't get uploaded (I modified all files first, then uploaded them one by one, so it might have been too much for the server).

Everything works great now, thanks for the contribution!

Link to comment
Share on other sites

  • 2 weeks later...

Many thanks to enigma1 for his work on this contribution. The html install instructions are the Gold standard by which all other instructions will now be judged.

 

I've gotten v2.02 installed, went through and selected all the countries I want and took a look at the Zones (side note: I thought the world_zones_sequential.sql file uploaded by Patty was supposed to take care of problems with special characters, but I have question marks replacing some characters for some zones).

 

My problem comes when trying to add countries to Tax zones. The first page of countries shows up fine, and I can add whatever I need from there. See screenshot:

 

osc-screen1.jpg

 

When I try and go to the next page, it goes to it fine but seems to exit the Tax zone (see next screenshot, it no longer says ">> Shipping - USA") so that when I try and add more countries, it doesn't work. It only seems to happen when trying to add whole countries (via Active Countries Mode).

 

osc-screen2.jpg

 

I had to add all the States to the US manually (instead of adding the US with all zones) and Canada is on the first page so I was able to add it with all zones, but I need to add all the rest of the countries to my "Rest of the World" zone. Anyone know what's going on? Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...