Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-30-2024 08:51:24

KryptSupport
Member
Registered: 04-29-2024
Posts: 77

9.2 Update Issue

NOTE: This post was created on 2022-10-30 on the Kryptronic eCommerce Community facebook page, which has been replaced with this forum.  All facebook support content was migrated into this forum in April 2024.

Graham:

Another issue with the 9.2 update.
I've noticed that Uk Counties/ US States used to be sorted into order with Not Applicable at the top, then UK Counties, then US states.
Now they're just in the order they appear in the csv file, instead of being arranged according to the sortorder field.

Kryptronic:

We've noticed this as an issue on updated installs. To correct, we've modified the logic which will be available in our next update. Here's a rundown of the change so you can do it now:
Modify {private}/core/CORE_App/CORE_App.php. In the functions get_country_info() and get_stateprov_info(), change the order for the SQL call to read:
array('sortorder' => 'ASC', 'id' => 'ASC')
That will get everything sorted the way you want, and if there are any minor adjustments to be made, adjust the sort order for Countries and States/Provinces using the System / Locations admin functions.

Graham:

This works for the Country, but when I try it for stateprov, the list disappears and I only get "select" in the dropdown box.

Graham:

As mentioned, this solution isn't working for the stateprov file.
Please can you suggest a fix.

Nick:

Ensure your states and provinces reference the countries being used in your list. Something is off with your data setup.

Graham:

Here's the first few lines of core_stateprov although I have no idea how this will come out on your screen.
It would have been easier if you were still using the Forums, I think the move to Facebook is a mistake.
id abb taxrate taxship usecon usedel country sortorder region
Aberdeenshire XX 0 0 1 1 UK - Scotland Mainland 2 UK
Alabama AL 4 0 1 1 United States 200 OTHER
Alaska AK 0 0 1 1 United States 200 OTHER
Alberta AB 0 0 1 1 Canada 300 OTHER
Anglesey XX 0 0 1 1 UK - England & Wales 3 UK
Angus XX 0 0 1 1 UK - Scotland Mainland 4 UK
Argyll XX 0 0 1 1 UK - Scotland Mainland 5 UK
Argyll and Bute XX 0 0 1 1 UK - Scotland Mainland 6 UK
Arizona AZ 5 0 1 1 United States 200 OTHER

Nick:

I've just looked at your site and it's working fine. The state/province and country selections are dependent on each other now, and they are working correctly. I don't see a problem and have checked your shipping estimator and create account functions, which both use those fields.

Graham:

The State/ Province fields are sorted in alphabetical order starting with Abedeenshire, Alabama, Alaska.
They should be sorted with Not Applicable at the top, then Aberdeenshire, Anglesey, Angus, ie in the order of the Sort Order fields in core_stateprov which I set up so Not Applicable is easy to get to (since this doesn't affect UK addresses), then the UK Counties if people want to include theirs.
How do I get them arranged in my chosen sortorder?

ElectroSpares Net:

We can manage ours under Dashboard / System / Locations / States and Provinces - have you tried this?

Graham:

That lists the States and Provinces in the order I want, with Not Applicable at the top, then the UK Counties in alphabetical order next.
But the Shipping Estimate routine doesn't do that and only lists them in the order they appear in the stateprov file.

ElectroSpares Net:

OK that sounds like one for Nick. Sorry I could not help further.

Graham:

I am still having a problem with the Shipping Estimator not displaying the states and provinces in my desired order.
I've tried resorting the core_stateprov.csv by sortorder in Excel so Not Applicable is at the top, followed by UK counties in alphabetical order, then US states etc, but they're still just in alphabetical order in the Shipping Estimator, despite my using the code from above.
How can I fix this?

Graham:

I don't seem to have had a reply to the message I posted three weeks ago getting the Shipping Estimator to display States and Provinces in my desired order.

Not Applicable has Sort Order 1, yet the list is being presented to customers in alphabetical order, despite using the edits suggested previously and my uploading a version of the file arranged in Sort Order.

Also I've tried editing core_formfields/ ecom.shipestimator.rescom/ Required to 0 so customers don't need to select Residential or Commercial, but even though the asterisk doesn't appear, I keep getting a message saying that I've not filled in all the required fields.
How do I fix these problems?

Kryptronic:

Please read my reply from Oct 31, 2022 in this thread. Make the recommended change, and you'll be good to go.

Graham:

I made those changes, but they didn't help as I stated three weeks ago.

"I am still having a problem with the Shipping Estimator not displaying the states and provinces in my desired order.
I've tried resorting the core_stateprov.csv by sortorder in Excel so Not Applicable is at the top, followed by UK counties in alphabetical order, then US states etc, but they're still just in alphabetical order in the Shipping Estimator, despite my using the code from above.
How can I fix this?"

Also that doesn't fix the problem with Residential/ Commercial as I mentioned above.

Kryptronic:

This is the post I am referring to

Anthony:

Thanks - perfect!!

Graham:

Regarding this, as I said sixteen weeks ago, I made those changes, but they didn't help:

"I am still having a problem with the Shipping Estimator not displaying the states and provinces in my desired order.

I've tried resorting the core_stateprov.csv by sortorder in Excel so Not Applicable is at the top, followed by UK counties in alphabetical order, then US states etc, but they're still just in alphabetical order in the Shipping Estimator, despite my using the code from above.

How can I fix this?"

Also that doesn't fix the problem with Residential/ Commercial as I mentioned above.

Kryptronic:

Graham, our proposed fix helped 99% of those who experienced the same issue as you. But today we released 9.3.0 which has a fix for this issue. Please view our post at the top of the group.

Offline

 

Board footer