![]() |
![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]() This hack is not supported by Interspire, but it will allow you to add/remove countries & states to your database. This is especially handy if you're from a country that needs more or less options than what ISC currently is defaulting to (UK comes to mind). To use this hack:
1) Unzip the attached folder. 2) Move the unzipped folder to your admin folder. 3) Adjust the authorizations for the ischack folder to 777. 4) Point your browser to: *shoppingcart*/admin/ischack/ (replacing *shoppingcart* with your actual shopping cart location) The script will walk you through the rest. You will need to know your database name, database user's username and password, and host, which I've defaulted to localhost. Enjoy! Last edited by Joshua Walcher; 08-20-2008 at 12:17 AM.. |
#2
|
|||
|
|||
![]() Thanks joshua.
Before I do this, and i know you said it walks you thru, but will it help me delete all the countries we don't ship to? So on the checkout page or anywhere there is a address the only choice will be our country? |
#3
|
|||
|
|||
![]() Yes, you may delete any country you don't want to have in the list. However, once it's gone, it's gone. To get it back again, you'd have to add it back manually using this app.
|
#4
|
|||
|
|||
![]() joshua i finally got around to tying your hack, but it did not work
![]() please see the screen - none of the drop-downs are populated with chioices to delete. i was practicing on a copy of the site on my local server. |
#5
|
|||
|
|||
![]() That screenshot would seem to indicate that the code is connecting to the database, but the table names don't match. You'll need to change the code on index.php to match your table names. My guess? Your tables names probably have a prefix like isc_ instead of just being the straight table name. As in, "isc_countries" instead of just "countries".
|
#6
|
|||
|
|||
![]() Not hardly as versed in PHP and stuff as you, so I tried the following:
on line #97 I changed it to read "while($a = mysql_fetch_assoc($isc_countries)){" to match the country database table. on line #140 I changed it to read "while($a = mysql_fetch_assoc($isc_country_states)){" to match U.S. states database table. I made a couple more changes i thought it needed but the screen looks the same as my last post. |
#7
|
|||
|
|||
![]() Sorry, I should have explained it better.
The changes you made were not correct. Here's an example of what I'm talking about. If your tables are named with an isc_ in front of them, then you would change: $sql = "SELECT * FROM `countries` ORDER by `countryname` ASC"; $country = mysql_query($sql,$connection); while($a = mysql_fetch_assoc($country)){ to: $sql = "SELECT * FROM `isc_countries` ORDER by `countryname` ASC"; $country = mysql_query($sql,$connection); while($a = mysql_fetch_assoc($country)){ The $country should stay the same. You just need to change the table name in the SELECT statements. |
#8
|
|||
|
|||
![]() Hey everyone, I'm going to update this hack for 4.0 and add the db prefix feature and make it a little easier to use. I'll post the update here.
|
#9
|
|||
|
|||
![]() In the next relese why dont you place this into the install....
![]() |
#10
|
|||
|
|||
![]() Finished it off. This is for version 4.0 of the shopping cart. I removed the installation step and it automatically pulls prefixes for you. Read the readme for more detail.
Last edited by Joshua Walcher; 10-23-2008 at 10:39 PM.. |
![]() |
Thread Tools | |
Display Modes | |
|
|