While I was working on that Address Manager system, I had to test that it worked well with the Countries admin page, as it is on the Countries page that shopowner assigns Address Formats so I had to make sure that any new address_format entries showed up when adding/editing a country.
While I was on the country page I thought it might be nice to add in a Sort Order feature so shopowner could put important countries at the top of the drop down list (eg on create_account.php)... and a Status feature so that shopowner can disallow creation of accounts from those disallowed countries (ie, status = off means countries won't show in the dropdown list).
Admin Side
New Sort Order Column
The Sort Order allows shopowner to move important countries up the list taking them out of the usual alphabetical system. In the example above I have moved UK, AU and US to the top 3.
The Sort Order number is added/edited/deleted in the usual side column;
New Status Column
The Status allows shopowner to turn off countries to which you have no interest in selling to. North Korea anyone? In the example above, I have turned off Afghanistan simply because it is near the top of the usual list so it's easier to screenshot (see "shop side" below).
The Status is changed by clicking on the red/green buttons in the country listings, this is the same system as is used when (eg) turning a product on/off.
Shop Side
The Shop Side countries dropdown is populated as you have designated, applicable Sort Order & applicable Status. In the image below you will see that UK, AU and US are at the top of the list, and Afghanistan (as its status is off) is nowhere to be seen.
Countries SORT ORDER & STATUS
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Countries SORT ORDER & STATUS
You do not have the required permissions to view the files attached to this post.
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Countries SORT ORDER & STATUS
And the absolute beauty of Phoenix is that ALL of this is done with no core code changes.
Hopefully this thread can help to illustrate that it is relatively simple to bend core code to your needs, whilst also not actually touching/changing core code!
This "no touch core code, but still be able to change how core works" has taken so much code effort to get into place, but here we are - amazing system - one of the (if not THE) most flexible shopping cart system currently available is in your hands.
Hopefully this thread can help to illustrate that it is relatively simple to bend core code to your needs, whilst also not actually touching/changing core code!
This "no touch core code, but still be able to change how core works" has taken so much code effort to get into place, but here we are - amazing system - one of the (if not THE) most flexible shopping cart system currently available is in your hands.