Blog

« Back

Add all countries into geo zone on OpenCart easily

Author: Milen Hristov
Created on: 09.05.2015 16:37

Open the form to add geo zone.
Open console of the browser and enter the code:

for(i=1;i<=239;i++){ addGeoZone(); $("#country" + (i-1)).val(i); }

Then remove the countries you wish to exclude.

Thant's all.





Comments

From: Dan
Added on: 19.09.2019 10:57

oc 3.0.3.2: for(i=0;i<=257;i++){ document.getElementById("button-geo-zone").click(); $("#zone-to-geo-zone-row" + i + " [data-index]").val(i); }
From: wowowo
Added on: 22.02.2019 17:07

wow man it worked. just had to press f12 of google chrome and go to console and then put the code in there. omg. thanks
From: Vikas Sharma
Added on: 05.10.2018 09:18

Hello, Thank for helping many people out! Could it be possible for you to let us know the working code for OpenCart 3.x ? Thank you in advance!
From: stkontra
Added on: 08.09.2018 13:46

Absolute lifesaver..Many thanks. Works for 2.2.0.0 for(i=1;i<=239;i++){ addGeoZone(); $("#zone-to-geo-zone-row" + (i-1) + " select").val(i); } works with 2.3.0.2 - VERIFIED!! to allow you to copy and paste in the code type: allow pasting then CTRL V....
From: Daniel Stubbs
Added on: 31.08.2018 15:49

for(i=1;i<=239;i++){ addGeoZone(); $("#zone-to-geo-zone-row" + (i-1) + " select").val(i); } works with 2.3.0.2 - VERIFIED!! to allow you to copy and paste in the code type: allow pasting then CTRL V....
From: Dovydas Kaziulis
Added on: 11.04.2018 23:00

it not working on 3 version....
From: TQ
Added on: 11.04.2017 22:37

Thanks man it works!!
From: Chris
Added on: 28.11.2016 03:01

Latest version of opencart I had to change it to for(i=1;i<=239;i++){ addGeoZone(); $("#zone-to-geo-zone-row" + (i-1) + " select").val(i); } Thanks!
From: kevin
Added on: 26.12.2015 19:04

damn, it works for real! you sir, are a master! thanks lots
From: franck
Added on: 20.07.2015 12:53

thanks a lot !
Name

E-mail

Comment

Enter the text from the image

Blog tags