For now, the easiest way is to run this sql in your phpmyadmin:
Code: Select all
delete from country where `name` != 'United States' and `name` != 'Canada';
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
I get this error when I follow those instructions:fido-x wrote: Have a look at this thread http://forum.opencart.com/index.php/topic,1613.0.html, since it deals with pretty much the same subject.
Notice: Undefined variable: error_country in /home/x/x/catalog/template/default/content/account_create.tpl on line 86
Code: Select all
$view->set('error_country', @$this->error['country']);
Code: Select all
$view->set('error_city', @$this->error['city']);
EDIT:
Added line should read --
Code: Select all
$view->set('error_country', @$this->error['country_id']);
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Okay, and by making these modifications it will block all countries except U.S. and Canada?fido-x wrote: Add the following line:-after or beforeCode: Select all
$view->set('error_country', @$this->error['country']);
in "/catalog/controller/account_create.php" (somewhere around line 89)Code: Select all
$view->set('error_city', @$this->error['city']);
EDIT:
Added line should read --Code: Select all
$view->set('error_country', @$this->error['country_id']);
Thanks.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
No error pops up when I attempt to create an account with an address outside the U.S. or Canada. It just does not continue.fido-x wrote: This will not necessarily "block" countries other than US or Canada, but will flag an error and prevent the creation of an account if the address is outside the US or Canada.
Isn't there supposed to be an error?
If you have followed the instructions properly, you should be getting an error message.Andrew_M wrote: No error pops up when I attempt to create an account with an address outside the U.S. or Canada. It just does not continue.
Isn't there supposed to be an error?
You stated earlier in this thread that you were getting an error--
The original line 86 in RC5 reads --Andrew_M wrote: Notice: Undefined variable: error_country in /home/x/x/catalog/template/default/content/account_create.tpl on line 86
Code: Select all
</select></td>
Code: Select all
</select><?php if ($error_country) { ?><span class="error"><?php echo $error_country; ?></span><?php } ?></td>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Code: Select all
</select><?php if ($error_country) { ?><span class="error"><?php echo $error_country; ?></span><?php } ?></td>
All I can suggest is to go over what you've been told and make sure you have followed the instructions properly.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
LOLQphoria wrote: HOW DARE YOU! WE ARE DOCKING YOUR PAY


Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Thanks.
Further down the page that the link goes to (http://forum.opencart.com/index.php/top ... ml#msg7959), you will find this bit of code --Andrew_M wrote: That page (http://forum.opencart.com/index.php/topic,1613.0.html) blocks every country except the United States. How do you unblock Canada?
Thanks.
Code: Select all
if ($request->get('country_id') != 38 || $request->get('country_id') != 223) {
$this->error['country_id'] = $language->get('error_country');
}
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!

bthirsk has a great contrib for country & zone enable/disable status here:
http://forum.opencart.com/index.php/topic,2887.0.html
Works perfect!
I'm getting this error when I go to Localization > Country:Qphoria wrote: forget this manual nonsense
bthirsk has a great contrib for country & zone enable/disable status here:
http://forum.opencart.com/index.php/topic,2887.0.html
Works perfect!
Code: Select all
Error: Unknown column 'country_status' in 'field list'
Error No: 1054
select country_id, name, country_status, iso_code_2, iso_code_3 from country order by name asc limit 0, 20
First you need to post in "that" thread as that would be the support thread. Second, you need to read the included readme on the steps needed to execute the included sql file needed to use it.Andrew_M wrote:I'm getting this error when I go to Localization > Country:Qphoria wrote: forget this manual nonsense
bthirsk has a great contrib for country & zone enable/disable status here:
http://forum.opencart.com/index.php/topic,2887.0.html
Works perfect!
Code: Select all
Error: Unknown column 'country_status' in 'field list' Error No: 1054 select country_id, name, country_status, iso_code_2, iso_code_3 from country order by name asc limit 0, 20
How do you "execute" country.sql?Qphoria wrote:First you need to post in "that" thread as that would be the support thread. Second, you need to read the included readme on the steps needed to execute the included sql file needed to use it.Andrew_M wrote:I'm getting this error when I go to Localization > Country:Qphoria wrote: forget this manual nonsense
bthirsk has a great contrib for country & zone enable/disable status here:
http://forum.opencart.com/index.php/topic,2887.0.html
Works perfect!
Code: Select all
Error: Unknown column 'country_status' in 'field list' Error No: 1054 select country_id, name, country_status, iso_code_2, iso_code_3 from country order by name asc limit 0, 20
Could you PLEASE give me step by step instructions? Thanks.
You will get a confirmation that the query has updated 240 row in country and 3841 in zone.
You are done.
Just logout and have a beer.
Brent
Users browsing this forum: No registered users and 3 guests