Post by mkp007 » Mon Nov 04, 2013 6:03 am

SQL and phpmyadmin is the way to go. I think this post will help people

http://forum.opencart.com/viewtopic.php?f=20&t=113515

Vorticy, Inc.
Opencart 1.5.6.4, MySQL 5.1.73-5, PHP 5.3.3-46, Plesk v12.0.18, OS CentOS 6


New member

Posts

Joined
Fri May 10, 2013 12:56 am

Post by jsw » Thu Nov 14, 2013 2:15 am

OSWorX wrote:
VaporJedi wrote:This doesn't work in 1.5.5.1 .

Any ideas what to do? I installed the vqmod extension.. but it doesnt make the button for all zones/all countries appear.
Maybe you want to give this mod a try: http://home.osworx.net/en/downloads/cat ... qmod-files
Should work also on slower machines.
I "refused" to add the countries one at a time... :) , this vQmod saved a lot of work. Added all countries in a few seconds and removed a few that I didn't want in the list, then it's done. THANK YOU OSWorX!

jsw
Newbie

Posts

Joined
Wed Jun 12, 2013 11:42 pm
Location - Canada

Post by OSWorX » Thu Nov 14, 2013 5:49 am

jsw wrote:
OSWorX wrote:
VaporJedi wrote:This doesn't work in 1.5.5.1 .

Any ideas what to do? I installed the vqmod extension.. but it doesnt make the button for all zones/all countries appear.
Maybe you want to give this mod a try: http://home.osworx.net/en/downloads/cat ... qmod-files
Should work also on slower machines.
I "refused" to add the countries one at a time... :) , this vQmod saved a lot of work. Added all countries in a few seconds and removed a few that I didn't want in the list, then it's done. THANK YOU OSWorX!
Always a pleasure to help ;D

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by rusly.mices » Tue Feb 11, 2014 9:54 am

from emilpk code i modified into :

Code: Select all

<a onclick="addAllGeoZones();" class="button"><span class="button_left button_insert"></span><span class="button_middle">Add All Countries</span><span class="button_right"></span></a>

<script type="text/javascript">
    function addAllGeoZones() {
		for(i=1;i<=239;i++){ addGeoZone(); $("#country" + (i-1)).val(i); } 
    }
</script>

Newbie

Posts

Joined
Tue Feb 11, 2014 9:53 am

Post by theos17 » Tue Feb 11, 2014 4:40 pm

Hi,

Do you have an extention that can solve OC problem with counties sales tax?

In California, if shipping address is Sausalito then sales tax is 8.5% and rest of California is 7.5%.
So lets say that I want to add tax only when shipping address is from San Francisco, Sausalito and Reno.
San Francisco and Sausalito belongs to California but have different sales tax.

Hope you get my point and you have solution for this.

Thanks

Newbie

Posts

Joined
Sun May 12, 2013 7:10 pm

Post by Ed_Rolla » Wed Feb 19, 2014 3:27 am

ambrosite wrote:I am really surprised that people are trying to do this with JavaScript? That's crazy. You can set up an "All Countries" Geo Zone in a half second by running a SQL query directly against the database.
......

Code: Select all

INSERT INTO oc_zone_to_geo_zone (country_id, zone_id, geo_zone_id, date_added, date_modified)
SELECT oc_country.country_id, 0, 4, NOW(), NOW()
FROM oc_country
WHERE oc_country.name NOT IN ('United States');
Q, what you did totally makes it possible to enable clients to do it in a click. That's a great solution, but it seems nothing happens when the button is clicked (using OC v.1.5.6.1).

Ambrosite, you're I life saver and I feel like a freaking moron! ;D
Thank you! Thank you! Thank you!

Attachments

Give_that_man_a_cookie.jpg

Give_that_man_a_cookie.jpg (9.97 KiB) Viewed 9566 times


WIP Design Publicidade e Marketing Digital


User avatar
New member

Posts

Joined
Sun Jul 15, 2012 12:16 am
Location - Brazil, Rio de Janeiro

Post by Qphoria » Wed Feb 19, 2014 4:29 am

Ed_Rolla wrote: Q, what you did totally makes it possible to enable clients to do it in a click. That's a great solution, but it seems nothing happens when the button is clicked (using OC v.1.5.6.1).
keep in mind that method was from 1.4.x and also takes about a minute for anything to show up because it is trying to use javascript to loop 240 times and load ajax zone info for each. But yes the database insert method is just better overall since it is a one time thing

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Ed_Rolla » Wed Feb 19, 2014 5:01 am

Yeap. I clicked on it and nothing actually happened. The browser didn't even crash... almost as the button had no action. :/
But, no sweat. I went around it with SQL. ;)

Again, great job!

WIP Design Publicidade e Marketing Digital


User avatar
New member

Posts

Joined
Sun Jul 15, 2012 12:16 am
Location - Brazil, Rio de Janeiro

Post by mzcreative » Wed Oct 01, 2014 11:48 am

I just wanted to say a big thank you to @OSWorX for the great vqmod. It was exactly what I needed and was really quick to install on my end :D

Newbie

Posts

Joined
Wed Oct 01, 2014 10:52 am

Post by rch » Thu Jan 15, 2015 11:44 pm

Hi,

I have updated this great script for opencart 2.0 and created a VQMOD.

Attachments


rch
Newbie

Posts

Joined
Wed Dec 24, 2014 6:31 pm

Post by vitalvintage » Sun Mar 01, 2015 3:03 pm

:crazy:
rch wrote:Hi,

I have updated this great script for opencart 2.0 and created a VQMOD.
I put your xml file into my directory and it didn't work or do anything as far as i can see. I have opencart 2.0.1.1

New member

Posts

Joined
Tue Oct 14, 2014 5:47 pm

Post by jthrongard » Fri Apr 17, 2015 4:56 am

I am also not able to get this to work on Opencart 2.0+. Can someone walk us through using it on the new versions?

Small Business Joomla! Website Design - Simple CMS Design
http://www.simplecmsdesign.com


User avatar
New member

Posts

Joined
Fri Jun 08, 2012 12:22 am
Location - Boise, ID

Post by Dana » Sat Apr 25, 2015 1:13 am

jthrongard wrote:I am also not able to get this to work on Opencart 2.0+. Can someone walk us through using it on the new versions?
The .xml that rch posted has wrong path to the file:

Replace:

Code: Select all

<file name="zowa/view/template/localisation/geo_zone_form.tpl">
with

Code: Select all

<file name="admin/view/template/localisation/geo_zone_form.tpl">
and it works. :)

User avatar
New member

Posts

Joined
Tue Jun 29, 2010 8:13 pm

Post by kec » Fri Jan 22, 2016 10:28 pm

Works fine but you have to change the line in the previous post indeed.

Note: it will add ALL countries, so If you already had some other GEO zones set, then you have to delete them manually from this list.

kec
New member

Posts

Joined
Sat Apr 20, 2013 6:06 pm

Post by vandenbrande » Sat Oct 29, 2016 12:55 am

Hi, i know this is a old post, but i need it for 2.1.0.1 is there any way to get it to work? Its not working for me. I see the button but nothing happens.

Sensors for arduino http://www.arduinosensors.nl


User avatar
Newbie

Posts

Joined
Wed Dec 30, 2015 2:58 pm
Location - netherlands

Post by vandenbrande » Sat Oct 29, 2016 5:21 am

This code below still works on 2.1.0.1

Code: Select all

<a onclick="addAllGeoZones();" class="button"><span class="button_left button_insert"></span><span class="button_middle">Add All Countries</span><span class="button_right"></span></a>

<script type="text/javascript">
    function addAllGeoZones() {
      for(i=1;i<=239;i++){ addGeoZone(); $("#country" + (i-1)).val(i); } 
    }
</script>

Sensors for arduino http://www.arduinosensors.nl


User avatar
Newbie

Posts

Joined
Wed Dec 30, 2015 2:58 pm
Location - netherlands

Post by jannietan » Wed Jul 26, 2017 12:35 pm

Hi,
May i know does this code able to apply to OpenCart Version 2.3.0.2? I have tried it, but seem doesn't work, hopefully there is someone that can guide me on this.
Thank you.

Newbie

Posts

Joined
Tue Feb 07, 2017 4:10 pm

Post by f1br3opt1c » Thu Oct 19, 2017 12:53 am

Tried and it works on 2.3.0.2. Here is the edited working file with Dana's line of customization.

Credit goes to rch and Dana. Thank you so much guys, solved me a big headache!

Attachments


New member

Posts

Joined
Fri May 24, 2013 5:36 pm
Who is online

Users browsing this forum: No registered users and 45 guests