Yes it is
Yes it is
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
The function provided by this plugin is partially supported in the upcoming Zen Cart v1.5.2, the differences being:
- This plugin adds the field countries_active char(1) to the countries table in the database; ZC 1.5.2 adds the field status tinyint(1)
- This plugin disallows the creation of any address (billing or shipping) if the country is not active; ZC 1.5.2 disallows only shipping addresses.
I'm currently in limbo as to whether and/or how to merge this plugin's changes into a ZC 1.5.2 environment, so at this point of time this plugin should be considered not compatible with ZC 1.5.2.
Feedback and suggestions are welcomed.
as far as getting past the installer upgrade and maintaining the selected country settings I made this alteration to the installer code:
zc_install\sql\mysql_upgrade_zencart_151_to_152.sql
from
toALTER TABLE countries ADD status tinyint(1) DEFAULT '1';
ALTER TABLE countries CHANGE countries_active status tinyint(1) DEFAULT '1';
Steve
github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...
...since the functionality included in 1.5.2 has been lifted from this mod it seems logical that the existence of the countries_active column should have been sniffed out first by the installer before carrying out a corresponding CHANGE or ADD as required.
Steve
github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...
The v1.5.2 implementation is not as far off from "Selectable Countries" as I was led to believe by the wording in the v1.5.2 admin. On the store-side, if a country is disabled, it can't be used for either a shipping nor a billing address ... just like "Selectable Countries".
When I get to the update for "Selectable Countries" for v1.5.2, I'll include an upgrade.sql file with this (thanks)!
Following is the text that I'm planning to include in the next update of Selectable Countries, describing the upgrade procedure to Zen Cart v1.5.2:
Upgrading to Zen Cart v1.5.2 or later
The function provided by Selectable Countries is included in Zen Cart v1.5.2 and later. If you have installed Selectable Countries on your Zen Cart v1.5.0 or v1.5.1 store and are preparing to upgrade, this section identifies that process. The following table identifies what action to perform on each of this plugin's files during your upgrade:
Once the file and database portions of your upgrade are completed, run the SQL patch present in /sc_upgrade_to_zc152.sql. This file changes the name of the countries_active field to its Zen Cart v1.5.2+ field name (status).Code:File Name Upgrade Action /includes/auto_loaders/config.country_check.php Delete /includes/init_includes/init_country_check.php Delete /includes/functions/functions_lookups.php Use Zen Cart distribution version /includes/functions/extra_functions/selectable_countries_functions.php Delete /includes/languages/english/extra_definitions/YOUR_TEMPLATE/selectable_countries.php Delete /YOUR_ADMIN/countries.php Use Zen Cart distribution version /YOUR_ADMIN/includes/languages/english/countries.php Use Zen Cart distribution version
The SQL file contains:
Code:# # Use this SQL script to upgrade your Selectable Countries installation to Zen Cart v1.5.2 and later. # # Selectable Countries uses the field named "countries_active" to identify whether/not the associated country is active # while Zen Cart v1.5.2 and later use the field named "status". # # Upgrading your database requires two steps: # 1) Removing the 'status' field from the 'countries' table # 2) Modifying the 'countries_active' field from your Selectable Countries installation to the 'status' format. # Thanks to torvista for providing this SQL fragment! # ALTER TABLE countries DROP status; ALTER TABLE countries CHANGE countries_active status tinyint(1) DEFAULT '1';
v1.1.0 of Selectable Countries is now available in the Plugins. The only change was to incorporate the v1.5.2 upgrade instructions/SQL patch indicated by the previous posting.
Hello,
My DB has prefix ZEN_ ( define('DB_PREFIX', 'zen_');)
I try to install the SQL file by pasting: # Selectable Countries Plugin - Install SQL to add the countries_active field to the countries table.
ALTER TABLE zen_countries ADD countries_active char(1) default 1;
and I get the following message:
WARNING: An Error occurred, please refresh the page and try again
Refreshing, going back and trying again gets the same message. Can anyone offer help?
Regards
Tog
When you see the message "WARNING: An Error occurred, please refresh the page and try again", there's a debug-log file present in either your /logs directory or the /cache directory if your Zen Cart version is v1.5.0 or earlier.
If you simply open the installation SQL file in a text editor, copy its contents to the clipboard and then paste that information into your admin's Tools->Install SQL Patches, Zen Cart "knows" that you've got a non-blank DB_PREFIX and will properly handle those changes.
Thank you but I still couldn't get the plug in to work, so now I have removed the unwanted countries from the database, leaving only one (United Kingdom).
Do you know how I can get rid of the country drop down box, and just have United Kingdom show as static text instead?
Regards
Tog
Bookmarks