Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Active Countries


Guest

Recommended Posts

Hi I have just installed this contrib and i get this error:

 

Fatal error: Cannot redeclare tep_validate_password() (previously declared in /catalog/admin/includes/functions/password_funcs.php:18) in /catalog/admin/includes/functions/password_funcs.php on line 18

 

how do i fix?

 

Thank You,

Antony

Link to comment
Share on other sites

  • Replies 257
  • Created
  • Last Reply

Top Posters In This Topic

Opps sorry it is line 16 not 18:

 

Fatal error: Cannot redeclare tep_validate_password() (previously declared in /catalog/admin/includes/functions/password_funcs.php:16) in /catalog/admin/includes/functions/password_funcs.php on line 16

Link to comment
Share on other sites

you must have the password functions defined already on the admin in your case. By default they aren't. So check what files on the admin include the tep_validate_password function, compare the functions and if they're the same, remove the one of the 2.

Link to comment
Share on other sites

Mark,

 

Please help!!!

 

I have installed your Active Countries mod onto www.hardenhoney.com and as far as I can tell I followed all of your instructions, however I am now getting this error on my page for account creation.

 

": 1054 - Unknown column 'zone_status' in 'where clause'

 

select zone_id, zone_name from zones where zone_status='1' and zone_country_id = '13' order by zone_name

 

[TEP STOP]"

 

Do you know where I went wrong???

 

Kye.

Link to comment
Share on other sites

Mark,

 

Please help!!!

 

I have installed your Active Countries mod onto www.hardenhoney.com and as far as I can tell I followed all of your instructions, however I am now getting this error on my page for account creation.

 

": 1054 - Unknown column 'zone_status' in 'where clause'

 

select zone_id, zone_name from zones where zone_status='1' and zone_country_id = '13' order by zone_name

 

[TEP STOP]"

 

Do you know where I went wrong???

 

Kye.

 

Fixed the above error, (found the fix just after I hit send about four messages above this one) but now am getting this error and can't see a fix for it. So still in a state of requiring help here.

 

Error reads

 

"Fatal error: Call to undefined function: tep_get_country_active_list() in /home/harhoney/public_html/create_account.php on line 463"

Link to comment
Share on other sites

Mark,

 

Please help!!!

 

I have installed your Active Countries mod onto www.hardenhoney.com and as far as I can tell I followed all of your instructions, however I am now getting this error on my page for account creation.

 

": 1054 - Unknown column 'zone_status' in 'where clause'

 

select zone_id, zone_name from zones where zone_status='1' and zone_country_id = '13' order by zone_name

 

[TEP STOP]"

 

Do you know where I went wrong???

 

Kye.

 

There is an issue with the documentation how to run the sql queries. It is mentioned in posts #222,#223 in this thread.

 

basically run the countries_custom.sql file after the world zones. Otherwise run the zone status query with phpmyadmin again, this line:

 

ALTER TABLE `zones` ADD `zone_status` tinyint(1) default '1' not null;

The documentation will be corrected with the next version

Link to comment
Share on other sites

Fixed the above error, (found the fix just after I hit send about four messages above this one) but now am getting this error and can't see a fix for it. So still in a state of requiring help here.

 

Error reads

 

"Fatal error: Call to undefined function: tep_get_country_active_list() in /home/harhoney/public_html/create_account.php on line 463"

yea well you need to follow the instructions. Item-1 in the documentation. Have you done it?

Link to comment
Share on other sites

yea well you need to follow the instructions. Item-1 in the documentation. Have you done it?

 

By Item one I assume you mean to add the following?

 

//-MS- Active Countries
////
// Returns a drop-down list of active countries
 function tep_get_country_active_list($name, $selected = '', $parameters = '', $type=0) {
   // Return the pulldown populated with active countries
   $countries_array = tep_get_active_countries('', $type);
   if( count($countries_array) > 1 ) {
     return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
   } else {
     return $countries_array[0]['text'];
   }
 }
//-MS- Active Countries EOM

 

Which yes it was the second thing that I did. If it was something else please let me know as sleep deprivation really isnt helping my case at the moment.

 

The first thing being reading all of the details from beginning to end twice to clarify what was what.

 

I appreciate your rapid response on this issue as its currently very early in the morning here and I really need to try and have this running before I go to work again in the morning for paid jobs number 4 and 2. (The joys of having babies.)

Link to comment
Share on other sites

hmmm.... It seems that the functions file had not synchronised correctly with the server. Error is now gone.

 

Thank you again for your rapid response Mark. This is an astounding contribution which eliminated one of the many annoyances I was having with making many portions of the site work neatly.

 

All I need to do now is try to figure out some way of integrating category availability by geographical zone for quarantine purposes and all of my worries will be gone.

 

You're a wizard.

Link to comment
Share on other sites

Hi

 

Firstly, thank you for an amazing contribution!

 

I am however having a problem with the create account function where, when someone selects a country other than the default, the page resets to bring up the states options. The visitor is thus confronted with a blank form after they have already filled everything in. I can see us losing some signups because of this!

 

Can someone please tell me where and how this is controlled. - What should I check or change for the form to save its info. I have a very heavily modded store and this is the first time I have done a test purchase using a different country (which I did to test this contribution), so it may not be related to this contribution at all.

 

If you have any ideas I would be hugely appreciative.

Link to comment
Share on other sites

Hi

 

Firstly, thank you for an amazing contribution!

 

I am however having a problem with the create account function where, when someone selects a country other than the default, the page resets to bring up the states options. The visitor is thus confronted with a blank form after they have already filled everything in. I can see us losing some signups because of this!

 

Can someone please tell me where and how this is controlled. - What should I check or change for the form to save its info. I have a very heavily modded store and this is the first time I have done a test purchase using a different country (which I did to test this contribution), so it may not be related to this contribution at all.

 

If you have any ideas I would be hugely appreciative.

When the countries selection changes the form is submitted. There is a variable called $country_flag which signals this transition. When set, the code loads only the associated states for the selected country and leaves the rest of the variables as they are. It does not perform any other processing in that case.

 

The module works with the stock osc for creating accounts. For custom stores where other contributions are integrated you need to know how each contribution works and then ensure that the functionality of each is preserved.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I installed this contribution and it seems to work fine except one problem:

 

when customer creates an account the country dropdown box appears after the province dropdown box instead of opposite.

 

Couls someone help me to solve it?

 

Best Regards,

Elazar

Link to comment
Share on other sites

Hi,

 

I installed this contribution and it seems to work fine except one problem:

 

when customer creates an account the country dropdown box appears after the province dropdown box instead of opposite.

 

Could someone help me to solve it? Thanks in advance !!

 

Best Regards,

Elazar

Link to comment
Share on other sites

Hi,

 

I installed this contribution and it seems to work fine except one problem:

 

when customer creates an account the country dropdown box appears after the province dropdown box instead of opposite.

 

Could someone help me to solve it? Thanks in advance !!

 

Best Regards,

Elazar

yes well, that's the default behavior so how to change/customize the layout is up to you.

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

Link to comment
Share on other sites

  • 2 weeks later...
Receiving Error. Please Help.

 

I Have just installed the contribution and I am receiving the following error on the 'My Account Information' screen when I go to checkout and create a new account:

 

1054 - Unknown column 'zone_status' in 'where clause'

 

select zone_id, zone_name from zones where zone_status='1' and zone_country_id = '13' order by zone_name

 

I receive this similar error when I navigate to Admin->Location/Taxes->Zones:

 

1054 - Unknown column 'z.zone_status' in 'field list'

 

select z.zone_id, c.countries_id, c.countries_name, z.zone_name, z.zone_code, z.zone_country_id, z.zone_status from zones z left join countries c on (z.zone_country_id = c.countries_id) where c.countries_status='1' order by c.countries_name, z.zone_name limit 0, 20

 

Can someone shed some light on what I may have done wrong in the installation?

 

 

-Thanks

 

Cheers.

 

 

I am getting this same error and I have run the SQL as described in other posts and still not working. Any ideas of what could be wrong or is their anything I need to post

 

I know before I installed this I had previously deleted all counties in my countries table but United States but I don't think that would be cause this as I have seen other people have this error as well.

Edited by Silverado05

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Never mind I got it working. After examining my DB for errors as to why it was doing that cause my code was straight I noticed the status wasn't taking or being inserted for some reason after running the SQL so I manually inserted it and all is good now.

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

  • 1 month later...

Does anyone have this contri. working with SPPC? I am close but am having some issues. The two together make a great product so I would really like to get it working. I have also tried using the stock customers.php page and have problems with using other countries, I have tried the world_zones tables but it doesn't seem to work, just parses errors.

 

Here's what I have so far:

 

Admin/ customers.php

1. Edit address: address_book_id doesn't get passed to the URL

 

2. SQL error on "insert" new customer in the Options section where SPPC adds customer groups

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hccdevel/public_html/purseket/catalog/admin/includes/functions/database.php on line 99

 

3. Payment modules section not showing module selections ( shows radio header )

 

4. State/Country drop down works with US but if another country is selected the state goes blank ( I tried installing the world_zones sql tables but then I get sql errors and it doesn't work at all.)

 

Catalog side:

1. new account and address book state/country drop downs behave as follows. When US is selected the state drop down works as advertised (only shows US States) If I select another country all off the states are combined ( I.E. Mexico and US shows US states and all Mexican States - see above about adding the world_zones tables)

 

This is what is working properly:

 

1. Edit address shows and works properly

2. all actions work, meaning I can add, edit sort, etc.. all aspects of the customers

 

 

I can provide the admin/customers.php file if anyone wants to look at it.

 

Thanks

Link to comment
Share on other sites

  • 2 months later...

Sorry if this has been addressed, but I recently installed this module and it's great!

 

When a person is creating an account there was an error that line 462 had an extra } which I had to delete. Just wanted to see if anyone else had that problem.

Link to comment
Share on other sites

  • 2 weeks later...

now I got a problem login in my admin:

Fatal error: Cannot redeclare tep_validate_password() (previously declared in /home/content//html/catalog/admin/includes/functions/password_funcs.php:16) in /home/content/html/catalog/admin/includes/functions/password_funcs.php on line 16

 

now do I fix this problem?

Link to comment
Share on other sites

Now I get this

 

Fatal error: Call to undefined function: tep_get_country_active_list() in /home/content/k/u/s/kustomjs/html/catalog/create_account.php on line 460

 

and also

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/html/catalog/create_account.php:2)

in /home/content/html/catalog/includes/functions/sessions.php on line 97

Link to comment
Share on other sites

  • 2 weeks later...
Never mind I got it working. After examining my DB for errors as to why it was doing that cause my code was straight I noticed the status wasn't taking or being inserted for some reason after running the SQL so I manually inserted it and all is good now.

 

-Thanks

Silverado, I am getting the same error after install. What did you do to repair it??

Link to comment
Share on other sites

I have set up Active Countries in a fresh install and have found an odd behavior in a specific setup configuration.

 

Set store Country to US.

Make two countries Active.

 

US Status ON Pay ON Ship OFF

Indonesia Status ON Pay OFF Ship ON

 

 

On checkout_shipping_address.php page Indonesia shows up as country but State/Province: has US States in pull down.

 

Source had Indonesia as display but hidden value is for the US 223.

 

<tr>

<td class="main">Country:</td>

<td class="main"><b>Indonesia<input type="hidden" name="country_old" value="223"></b></td>

</tr>

 

If I turn shipping on for US then US is the default country and the states are there. Then when I switch to Indonesia the proper "states" show up. So I am reasonably confident that I have the correct set up.

 

As odd as the described setup seems it is the setup I would like.

 

Does anyone have any ideas on how to solve this?

 

-Kore

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...