Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Active Countries


Guest

Recommended Posts

Hi Enigma1,

 

I think I have a problem.

 

When I want to update/ edit my address in ?My Personal Address Book? I get this error message:

 

Parse error: syntax error, unexpected '}' in /domains1/do287700/public/www_root/catalog/includes/modules/address_book_details.php on line 134

 

Can you help me please? Thank you.

Link to comment
Share on other sites

  • Replies 257
  • Created
  • Last Reply

Top Posters In This Topic

Hi Enigma1,

 

I think I have a problem.

 

When I want to update/ edit my address in ?My Personal Address Book? I get this error message:

 

Parse error: syntax error, unexpected '}' in /domains1/do287700/public/www_root/catalog/includes/modules/address_book_details.php on line 134

 

Can you help me please? Thank you.

 

Ok, so I was able to fix this problem too. I just removed this: '}' and it works now.

Link to comment
Share on other sites

Ok, so I was able to fix this problem too. I just removed this: '}' and it works now.

Ok, for the image paths, I made a note so the documentation will be updated with the next version.

 

admin\includes\languages\english\images\buttons\button_submit.gif

admin\includes\languages\english\images\buttons\button_countries.gif

Link to comment
Share on other sites

Installation of Active Countries is done, it?s a great contribution. Thank you very much, Enigma1.

 

But,

 

In ?Tax Zones? when I click on the created zone row to drill down one level to "Sub Zones" I will get to a page with the sub zones. But there is no ?Insert? button. There is ?Back? and ?Delete? button but no ?Insert?.

 

Now I am not sure if there should be an ?Insert button? or if it disappeared after I installed Active counties

 

And in ?Tax Zones? when I click the ?Delete? button the page just reloads and I am not able to delete the tax zone.

 

Did I make a mistake somewhere with the installation of Active Countries?

 

Thank you

Link to comment
Share on other sites

the insert function is replaced with the "submit" Just select the country you want to insert zones for and click submit. Select the states (tick the boxes) then click insert

Link to comment
Share on other sites

the insert function is replaced with the "submit" Just select the country you want to insert zones for and click submit. Select the states (tick the boxes) then click insert

 

ok i understand now. it works. Again thank you so much for that contribution, it's great.

Link to comment
Share on other sites

Is there a 'Lite' version of this contribution?

 

I just wanted to limit delivery addresses to European countries whilst allowing any countries to be used for billing addresses. However I absolutely don't want to force people to specify which zone they live in as that is a bit of a nightmare for many customers.

 

Any suggestions? - Thanks

Link to comment
Share on other sites

Is there a 'Lite' version of this contribution?

 

I just wanted to limit delivery addresses to European countries whilst allowing any countries to be used for billing addresses. However I absolutely don't want to force people to specify which zone they live in as that is a bit of a nightmare for many customers.

 

Any suggestions? - Thanks

 

To do this it will require few things.

 

1. Replace the country status leds with a drop down or another selection mechanism which will give an option to where the country status applies. So now there is 0 and 1 as the country status options. This has to change to provide different flags for create account, shipping and payment.

2. Modify the checkout_shipping_address.php and checkout_payment_address.php files to retrieve the address based on a separate status.

3. Modify the common functions to return different lists of countries based on a different status.

 

It is something I thought earlier when I saw a couple of threads about it but havent got a chance to do it really. It requires some work but it's straight forward.

 

I think however this will not be a lite version, more likely a heavier version with more options.

Edited by enigma1
Link to comment
Share on other sites

Thanks for the reply.

 

Actually I was thinking that create account and checkout_payment_address could be left alone. The 0 and 1 would only apply to the shipping address only.

As you say, common functions are a potential source of problems.

 

One suggestion I had read was to change the appropriate class that picks up the shipping address.

 

Another idea was to use the contribution Embargo 1.0 which blacklists certain countries. Probably it could be reversed to whitelist some instead. There was only one version of this written 2 years ago so it may not be so popular.

 

There is another contribution which works via grouping countries into tax zones which seemed pretty clever. I think this worked on a per product basis whereas I just was looking for a global setting.

Link to comment
Share on other sites

  • 3 weeks later...

I have installed the 2.0 verson and the fixes in posts

 

I think everything is working correctly, however when I went to test it by creating a new account I get a popup error on the submission "Errors have occoured during the process of your form. Please make the following corrections: *Your State must contain a minimum of 2 characters." I have activated US, and the drop down box of states is there & I have selected a state.

 

Has anyone else had this issue? Was there something I left out? I searched but didn't see anyone mention this issue.

 

Your assitance is greatly apprecatiated.

 

Thank you,

Kristine

www.boxgeek.com

Kristine

Link to comment
Share on other sites

I have installed the 2.0 verson and the fixes in posts

I think everything is working correctly, however when I went to test it by creating a new account I get a popup error on the submission "Errors have occoured during the process of your form. Please make the following corrections: *Your State must contain a minimum of 2 characters." I have activated US, and the drop down box of states is there & I have selected a state.

 

Has anyone else had this issue? Was there something I left out? I searched but didn't see anyone mention this issue.

 

Your assitance is greatly apprecatiated.

 

Thank you,

Kristine

www.boxgeek.com

 

:blush: Forget the issue with the state, all I had to do was edit the admin - config - min values - state from the default 2 to a blank and it works fine.

 

I really am not sure if it has anything to do with this contribution, but I did notice that when I try to add/edit an address in my address book (ie. a different shipping address, or edit primary address) I get an error. Anyone else have this issue? :blush: I really hope it isn't another silly oversite on my part. :P

 

PS - Thanks for this contribution Mark & the support. I was wondering how in the world I was gonna get the state issue fixed today! :thumbsup:

Kristine

Link to comment
Share on other sites

  • 3 weeks later...

I am about to (deep breath) run the active countries contribution V2. I have been reading this thread and wanted to ask a few questions before I get started.

 

1) How do I run countries_custom.sql file in phpmyadmin? (never used it before) Do I need to upload it to my server first? upload to where?

 

2) Do I need to use the world_zones_sequential file? I will only be using the UK at the moment. Do I run that in phpmyadmin?

 

3) Do I need to follow instructions on following posts? 110, 114, 92, 84, 103 to correct errors that have been posted?

 

4) I changed 2 lines of code previously to make UK the default country. Should I change them back before I install contribution?

 

5) Anything else I need to do? (except backup 10 times for safety :thumbsup: )

 

Any advice gladly appreciated.

Thanks.

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

I am about to (deep breath) run the active countries contribution V2. I have been reading this thread and wanted to ask a few questions before I get started.

 

1) How do I run countries_custom.sql file in phpmyadmin? (never used it before) Do I need to upload it to my server first? upload to where?

 

2) Do I need to use the world_zones_sequential file? I will only be using the UK at the moment. Do I run that in phpmyadmin?

 

3) Do I need to follow instructions on following posts? 110, 114, 92, 84, 103 to correct errors that have been posted?

 

4) I changed 2 lines of code previously to make UK the default country. Should I change them back before I install contribution?

 

5) Anything else I need to do? (except backup 10 times for safety :thumbsup: )

 

Any advice gladly appreciated.

Thanks.

 

Ok, I'm almost done here, phew. Seems to be mostly working - a good contribution.

BUT - Can anyone explain what I need to do with the world_zones_sequential.sql file? I don't know whether to run it in phpmyadmin or import it or what? It's not very clear in the Readme file.

 

Please help.

Thanks

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

Ok, well, no-one replied :(

Anyway, I just ran the world_zones_sequential.sql in phpmyadmin. Hey presto, everything works a treat.

 

If you do install this (V2.00) remember you'll need to also use the following posts on this thread:

 

84, 92, 103, 108, 114

 

And remember to switch on the following in admin section : click configuration/customer details/set state to "True".

 

I have a Question: In steps 10 & 11:

 

10. In catalog\admin\countries.php

a) Locate the following code 
switch ($action) {

&

11. In catalog\admin\zones.php 

a) Locate the following code 
switch ($action) {

 

In both these files there are 2 places where

switch ($action) {

exists. I put new code after the first one. Would it make a difference where you put it? Perhaps the documentation could be updated to clarify????

 

I noticed a couple of niggles - nothing major though.

1) In admin, edit customer details, there is no drop down menu to edit the state. What would happen if I just typed in a different one?

2) If a State has been entered, and then require state is set to false in admin, the state originally entered still appears in customer address/invoices but it can not be changed. This might be problematic if the original state was incorrect. I know they can delete the whole address and start again but it's not so customer friendly and they might not guess the need to do that to fix it.

 

A SUPER CONTRIBUTION - JUST WHAT I WAS LOOKING FOR!!!!

THANK YOU MARK :thumbsup:

 

Claire

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

  • 4 weeks later...

Dear Enigma,

 

I'd like to make the State selector a drop down menu that is not a required field. This is because in the UK, not all addresses use states/counties/regions. Also, some states listed are cities, so for instance Edinburgh would have to be entered twice by customer - city field & state field.

I could delete the states I don't require but the customer would still have to select a state even if not needed and this may cause postal problems. I'd still like to keep the field though for when someone needs to use it.

 

How do I make the State field a non-required option?

 

Please help

ThanQ muchly

B)

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

------------------------------------------------

PM me? - I'm not for hire

Link to comment
Share on other sites

  • 3 weeks later...

There's a simple html_output.php mod I found on the forums that enables you to list the countries you will deal with. With it installed all of the drop-downs will contain just those countries (so it applies to shipping and billing addresses). It doesn't affect existing address already registered with you. There is also something in the contributions area to exclude countires - search for 'banned'

Link to comment
Share on other sites

  • 3 weeks later...

Hi, first of all, this is an AWESOME mod! It is exactly what I needed and more. Thank you so much for this contrib!!!

 

I do have a VERY minor problem. The country of the address when shown in the emailed invoice and account_history_info.php only shows the letter "U" which should be "United States". It works perfectly in all other places... or is there a way to not let the country field show at all?

 

The code for the addresses for the admin invoice and emailed invoice are the same, but they come out different as mentioned above.

 

Here is what I have:

Billing address

<?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?>

 

Shipping address

<?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?>

Link to comment
Share on other sites

  • 5 weeks later...

Released version 2.01 to address several of the questions posted recently. Make sute you exemine the update readme file of the archive. I believe it answers most of the questions. The following items were addressed:

 

- Documentation update for item 12-A

- Documentation update for item 4-B

- Removed item 5-F from catalogaddress_book_process.php

- Added address book synch in the countries.php

- Added create customer accounts from the admincustomers.php

- Added active countries filtering for customers editing.

- Fix for geo_zones.php changing country pages.

- Fix for jscript error check in address_book_process.php

 

As of the last question about the emailed invoice I cannot replicate the problem here. It could be some other modifications with your store that may cause this issue.

Link to comment
Share on other sites

Hi, first of all, this is an AWESOME mod! It is exactly what I needed and more. Thank you so much for this contrib!!!

 

I do have a VERY minor problem. The country of the address when shown in the emailed invoice and account_history_info.php only shows the letter "U" which should be "United States". It works perfectly in all other places... or is there a way to not let the country field show at all?

 

The code for the addresses for the admin invoice and emailed invoice are the same, but they come out different as mentioned above.

 

Here is what I have:

Billing address

<?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?>

 

Shipping address

<?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?>

 

One other note about this problem I saw earlier is this:

http://www.oscommerce.com/forums/index.php?s=&...st&p=950333

So it may not be the active countries that causes this.

Link to comment
Share on other sites

I must have missed out??

 

When I want to edit a zone for a country - there are no zones available ??

Ifound that out when I wanted to set the zone where my shop is located - all it said, was 210, no zone name or nothing??

 

Can any body point me in a direction to find the error?

Helle :'(

 

Linie 41

Character: 5

Error: syntax error

code: 0

 

geo_zones.php?zpage=1&zID=5&action=list&spage=1&sID=55&action=edit

Link to comment
Share on other sites

Can or does anybody know how to put in Faroe Island in the zones table? I tried this:

 

#Faroe Islands
INSERT INTO zones VALUES ('',70,'C','Eiðis');
INSERT INTO zones VALUES ('',70,'N','Fámjins');
INSERT INTO zones VALUES ('',70,'E','Fuglafjarðar');
INSERT INTO zones VALUES ('',70,'W','Fugloyar');
INSERT INTO zones VALUES ('',70,'R','Funnings');
INSERT INTO zones VALUES ('',70,'C','Gøtu');
INSERT INTO zones VALUES ('',70,'N','Hovs');
INSERT INTO zones VALUES ('',70,'E','Húsa');
INSERT INTO zones VALUES ('',70,'W','Húsavíkar');
INSERT INTO zones VALUES ('',70,'R','Hvalbiar');
INSERT INTO zones VALUES ('',70,'C','Hvannasunds');
INSERT INTO zones VALUES ('',70,'N','Klaksvíkar');
INSERT INTO zones VALUES ('',70,'E','Kunoyar');
INSERT INTO zones VALUES ('',70,'W','Kvívíkar');
INSERT INTO zones VALUES ('',70,'R','Leirvíkar');
INSERT INTO zones VALUES ('',70,'C','Miðvágs');
INSERT INTO zones VALUES ('',70,'N','Nes');
INSERT INTO zones VALUES ('',70,'E','Porkeris');
INSERT INTO zones VALUES ('',70,'W','Runavíkar');
INSERT INTO zones VALUES ('',70,'R','Sandavágs');
INSERT INTO zones VALUES ('',70,'C','Sands');
INSERT INTO zones VALUES ('',70,'C','Sjóvar');
INSERT INTO zones VALUES ('',70,'N','Skálavíkar');
INSERT INTO zones VALUES ('',70,'E','Skopunar');
INSERT INTO zones VALUES ('',70,'W','Skúvoyar');
INSERT INTO zones VALUES ('',70,'R','Sumbiar');
INSERT INTO zones VALUES ('',70,'C','Sunda');
INSERT INTO zones VALUES ('',70,'C','Svínoyar');
INSERT INTO zones VALUES ('',70,'N','Sørvágs');
INSERT INTO zones VALUES ('',70,'E','Tórshavnar');
INSERT INTO zones VALUES ('',70,'W','Tvøroyrar');
INSERT INTO zones VALUES ('',70,'R','Vágs');
INSERT INTO zones VALUES ('',70,'W','Vestmanna ');
INSERT INTO zones VALUES ('',70,'R','Viðareiðis');

 

but got some kind of error

 

PS: the letters for the areas I'm not sure off?

 

Helle

Edited by HelleM
Link to comment
Share on other sites

Hi, first of all, this is an AWESOME mod! It is exactly what I needed and more. Thank you so much for this contrib!!!

 

I do have a VERY minor problem. The country of the address when shown in the emailed invoice and account_history_info.php only shows the letter "U" which should be "United States". It works perfectly in all other places... or is there a way to not let the country field show at all?

 

The code for the addresses for the admin invoice and emailed invoice are the same, but they come out different as mentioned above.

 

Here is what I have:

Billing address

<?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?>

 

Shipping address

<?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?>

 

I had the same problem. I tried to remember how I solved it. I'm sure it's in the include/funtions/general.php file....

 

Look into what it says under this section:

// Return a formatted address

// TABLES: address_format

 

Around line 457

$country = tep_output_string_protected($address['country']);

 

Around line 487

if ($country == '') $country = tep_output_string_protected($address['country']);

 

Try one line at a time.... Once I found the solution it was easy - don't "shoot" me if it doesn't work - but I feel quite sure it's right

Helle :-)

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