Hi all,
Probably an old question (I did search without result).
I want to remove countries from the list that appears in the drop down on the estimate shipping and taxes section of the shopping cart.
Reason: We only ship standard to the USA, however will ship overseas but need to quote on a case by case basis. We have modified the Free Shipping module to allow non US GeoZones to select the option 'contact me for a shipping quote blah blah'.
We only want the following countries to appear in the Estimate Shipping area, USA and NON USA (we created the latter as a new country).
All countries apart from the USA are currently disable in OC, yet they all still appear in the list. The only GeoZones we have defined are also US only.
Any help appreciated.
Sorry about that. In the end it was as simple as clearing the browser cache after making the changes... We live and learn Dohaurevilly wrote:Solved, but it would be nice if you'd post what solved your problem
Cheers,
aurevilly.
So model/localisation/country.php has a line wich explain that the getCountries() function used on the checkout cart.php file just retrieve the STATUS=1 countries from the database:
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name ASC");
Wich means that we don't need to remove any country or zone to remove them from the estimate shipping block on the opencart cart view.
For example, to enable just Australia (ID:13) and Spain (ID:195), is enough with a query like:
UPDATE `oc_zone` SET `status` = '0' WHERE `oc_zone`.`status` = 1;
UPDATE `oc_country` SET `status` = '0' WHERE `oc_country`.`status` = '1'
UPDATE `oc_country` SET `status` = '1' WHERE `oc_country`.`country_id` = '13'
UPDATE `oc_country` SET `status` = '1' WHERE `oc_country`.`country_id` = '195'
UPDATE `oc_zone` SET `status` = '1' WHERE `oc_zone`.`country_id` = 13
UPDATE `oc_zone` SET `status` = '1' WHERE `oc_zone`.`country_id` = 195
Your country list will look like: http://prntscr.com/jb1nr7
Simple.
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name ASC");
Wich means that we don't need to remove any country or zone to remove them from the estimate shipping block on the opencart cart view.
For example, to enable just Australia (ID:13) and Spain (ID:195), is enough with a query like:
UPDATE `oc_zone` SET `status` = '0' WHERE `oc_zone`.`status` = 1;
UPDATE `oc_country` SET `status` = '0' WHERE `oc_country`.`status` = '1'
UPDATE `oc_country` SET `status` = '1' WHERE `oc_country`.`country_id` = '13'
UPDATE `oc_country` SET `status` = '1' WHERE `oc_country`.`country_id` = '195'
UPDATE `oc_zone` SET `status` = '1' WHERE `oc_zone`.`country_id` = 13
UPDATE `oc_zone` SET `status` = '1' WHERE `oc_zone`.`country_id` = 195
Your country list will look like: http://prntscr.com/jb1nr7
Simple.
Pedro Martin - websitesbuilder.com.au
Checkout my free extensions: https://www.opencart.com/index.php?rout ... r=comprido
Who is online
Users browsing this forum: No registered users and 29 guests