Jump to content
stevel

Country-State Selector

Recommended Posts

It seems to me that your fundamental problem is that the correct form_check.js.php is not being pulled in. In some of the template contribs I've looked at, there's a copy of this in another folder that gets used instead. Check to see what file is really being included.

Share this post


Link to post
Share on other sites
It seems to me that your fundamental problem is that the correct form_check.js.php is not being pulled in. In some of the template contribs I've looked at, there's a copy of this in another folder that gets used instead.  Check to see what file is really being included.

 

I located the form_check.js.php in the /includes/ directory. Do you know of any other way to see if there are duplicates with different names? I've checked for the same name in other directories with negative results.


Aloha,

Lawrence

Share this post


Link to post
Share on other sites
It seems to me that your fundamental problem is that the correct form_check.js.php is not being pulled in. In some of the template contribs I've looked at, there's a copy of this in another folder that gets used instead.  Check to see what file is really being included.

 

You are absolutely correct! In searching further, I located another form_check.js.php file.

 

If you are using the CRE loaded V6.15 version, the correct form_check.js.php is located at: /includes/javascript/

 

Following the instructions provided (except the new location for form_check.js.php on CRE Loaded v 6.15 build only) I added the following code to /includes/javascript/form_check.js.php:

 

<?php // +Country-State Selector ?>
function refresh_form(form_name) {
  form_name.action.value = 'refresh';
  form_name.submit();
  return true;
  }
<?php // -Country-State Selector ?>

 

And it works fine. Thank you very much for your help!!!


Aloha,

Lawrence

Share this post


Link to post
Share on other sites
Started up again on PWA.  Yuck.  What a convoluted way it has of processing the customer details.  But I think I can see how it should go...

 

Hi Steve!

There are many roads that lead to the same place and apparently the PWA has a rocky one. I wish I could help; but at this point, its too far beyond me.

 

Help us, Obi Wan Steve! You're our only hope!

 

Corinne

Share this post


Link to post
Share on other sites

Yeah, well.. I actually started on a rewrite of PWA with C-S selector integrated, but gave up on that. I think I know how to do the minimal changes and should have it this weekend.

Share this post


Link to post
Share on other sites

Hi,

I have a question. Can we use this contribution with the PayPal web payment pro with no problem? I do have the PayPal web payment pro installed on my store. Thank you so much for your great contribution.


Regards,

Share this post


Link to post
Share on other sites

I don't know - I have not looked at that contribution. C-S Selector affects the pages where a customer enters an address - create account, address book, checkout_shipping_address and checkout_billing_address. I am not aware of any interaction with payment modules.

Share this post


Link to post
Share on other sites
What a strange thing!

 

I did install the contrib and it works great on create_account.php page, but it doesn't work on address_book_process.php

 

Any ideas what might be wrong?

 

 

Well here is what I see on create_account.php page

 

1.png

create_account.php

 

and this is what I see on address_book_process.php

 

2.png

address_book_process.php

 

... I don't have the option to select the zone from the drop down menu... any ideas?

Edited by zvoivoda

Share this post


Link to post
Share on other sites

I see two curious things there. In addition to no dropdown for the state, the Country field is much shorter than I would expect it to be. Did you make the edits to includes/modules/address_book_details.php?

Edited by stevel

Share this post


Link to post
Share on other sites

I think I have the PWA changes for C-S selector working. Before I release this, I'd like some "beta testers". If you're interested, send me a PM with your e-mail address and I'll send you the updated files (just two at the moment.) I'll also add C-S Selector functions to admin before releasing an update.

Share this post


Link to post
Share on other sites

Beta, shmeta.. I'll just throw the code over the wall and see where it sticks. :unsure:

 

I've uploaded a new release 1.3.0 which includes both the PWA changes and the admin change. If you don't care about either of these, then there's nothing new for you. I have tested this as best as I can, but I may have goofed somewhere. If I did, I'm sure you'll let me know.

Share this post


Link to post
Share on other sites
Beta, shmeta..  I'll just throw the code over the wall and see where it sticks.  :unsure:

 

I've uploaded a new release 1.3.0 which includes both the PWA changes and the admin change.  If you don't care about either of these, then there's nothing new for you.  I have tested this as best as I can, but I may have goofed somewhere.  If I did, I'm sure you'll let me know.

 

 

I will certainly check it out ASAP - thanks for putting in the work Steve!

 

:thumbsup:

Share this post


Link to post
Share on other sites

In its current form, I was still not able to get PWA and this contrib (CSS) to work together.

 

What i ended up doing was adding the refresh_form (appropriately modified, with form_name defined as the name of the form on that page) to every page that would call the function. Suddenly it started working.

 

(Yes I checked and double checked that form_check.js.php was being included, and it is...)

 

Someone better at Javascript can scratch their head over that one, I'm just glad it's working for me again. :)

Share this post


Link to post
Share on other sites

Thanks Steve,

 

The C - S selector workes perfect for me, - looks like. Will continue testing.

 

Best Regards :rolleyes:

Edited by Aage

Share this post


Link to post
Share on other sites

Jeremy, I don't quite understand what you did. Were you using the PWA mods I made in 1.3.0? Are you using a template contribution such as STS or BTS? These have a second copy of form_check.js.php that needs to be modified.

Share this post


Link to post
Share on other sites

Steve,

 

thank you very much for your hard work, I've installed the PWA update as well as the admin part and all seems to be working fine. I have Zones International and Visible Countries installed and no problems so far. Visible countries works well in shop part with Country State selector, in admin>customers>edit, list of all countries is offered in dropdown menu, no big deal, I can live with that! :-"


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

Glad to hear it. I am not familiar with "Visible Countries". Perhaps it makes a change to tep_get_country_list? If so, you could make the corresponding change to css_get_country_list in the admin edits for Country-State Selector.

Share this post


Link to post
Share on other sites

Hey Steve!

I am SO GLAD you were able to pull this off! I appreciate this immensely! :D

 

I do need to let you know, however, that I think I found a small bug. "Log Off" and "My Account" show up in the right hand side of the breadcrumb bar.

 

If you click on the "My Account", it takes you to "account.php" where you have all of the account options like look at previous orders, change password, etc. Of course, a person purchasing without an account shouldn't have access to these options.

 

If you click on "Log Off" it simply sends you to the log off page. I'm not sure what it does internally, i.e. saves their information or cart?

 

In the original PWA, the "My Account" disappears after you fill out the form and you are taken to the "checkout_shipping.php" page with all of the shipping options.

 

I think the "Log Off" and "My Account" appearing might have to do with the code in "Order_Info_Process.php". In this file, the breadcrumb line is this:

    $breadcrumb->add(NAV_ORDER_INFO, tep_href_link(FILENAME_ORDER_INFO, '', 'NONSSL'));

 

In your "Order_Info.php", the line is this:

  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

 

You might want to take a closer look at the original "Order_Info.php" and see how it handles the "catalog/includes/header.php" file. That's where the PWA author says he took out the "Log Off" and "My Account". I haven't had much time to dive into this, but I'll try to take a look at it more closely tomorrow if I can.

 

Other than that, so far, so good! Thanks!!!

Corinne

Share this post


Link to post
Share on other sites
The code you quote isn't what does the part you're commenting on.  From a brief look at the code, I don't see why it shouldn't work.  I'll look closer tonight.

 

Hi Steve!

Boy, is my face red! :blush: I took a closer look at my files and found out that somehow I had replaced my "header.php" with one that didn't have the changes in it. I have no idea when or how it happened.

 

Anyway, it looks like your fix is bug free! Once again, THANK YOU!!!!!!

 

Also, I want to say that I really appreciate how much time you put into this thread. I've installed about fifteen modules in my cart and you are one of the most attentive contribution authors I've run across.

 

Many, many, many thanks!

Corinne

Share this post


Link to post
Share on other sites
Glad to hear it. I am not familiar with "Visible Countries". Perhaps it makes a change to tep_get_country_list? If so, you could make the corresponding change to css_get_country_list in the admin edits for Country-State Selector.
It probably does, and it's quite handy contribution if you don't ship everywhere. I've tried to put tep_get_country_list instead of css_get_country_list which is obviously not the way of doing it. Looks like I need at least few more months of learning PHP! :o

Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

hi,

 

for some reason my form isnt refreshing, I change countries and it doesnt refresh. It also appears that the error window doesnt come up either. I am not sure if this is related to this or not.

 

I have another store on the system that has this stuff working but its my newest store that doesnt work

 

any help would be appreciated

 

thanks

kris

Edited by Kristofor

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Share this post


Link to post
Share on other sites

That strongly suggests that the refresh_form function is not being included. Easy enough to tell - with your store page open in a browser where this should work, do a View Source and look for the refresh function. It is either missing or you failed to attach it in an onChange attribute to the country dropdown.

Share this post


Link to post
Share on other sites

would that also cause the standard osc error box to not come up for like if i dont enter a name or watever? or is that unrelated, it just appeard to me that no js ont hat page was working


Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×