Difference between revisions of "CSV Importer Geocoder Exporter XML Exporter"

From Documentation | Viadat Creations
Jump to: navigation, search
(When I try to upload a CSV file, nothing happens, I get no error message and remain on the "Add Locations" page, or I get a blank screen)
(When I try to upload a CSV file, nothing happens, I get no error message and remain on the "Add Locations" page, or I get a blank screen)
Line 65: Line 65:
 
=== When I try to upload a CSV file, nothing happens, I get no error message and remain on the "Add Locations" page, or I get a blank screen ===
 
=== When I try to upload a CSV file, nothing happens, I get no error message and remain on the "Add Locations" page, or I get a blank screen ===
  
# Most likely solution:
+
1. '''Most likely solution:'''
Go to your pull-out admin dashboard, and click the 'Server Properties' link --- what version of PHP are you on? If it's greater than PHP v5.3.9 and your web host uses cPanel (or at least isn't GoDaddy) ...
+
<div style='padding-left:45px'>Go to your pull-out admin dashboard (Store Locator v2.0+), and click the 'Server Properties' link --- what version of PHP are you on? If it's greater than or equal to PHP v5.3.9 and your web host uses cPanel (or at least isn't GoDaddy) ...
  
1) add the following to the 'php.ini' file in your website's root directory, public_html (or create the 'php.ini' file if it doesn't exist):
+
a) Add the following to the 'php.ini' file in your website's root directory, '/public_html/' (or create the 'php.ini' file if it doesn't exist):<br>
'''max_input_vars = 50000
+
'''max_input_vars = 50000'''<br>
suhosin.post.max_vars = 50000
+
'''suhosin.post.max_vars = 50000'''<br>
suhosin.request.max_vars = 50000'''
+
'''suhosin.request.max_vars = 50000'''
  
2) then, in the '.htaccess' file in the same directory, add the following (replacing "{your_username}" with the actual username in the path):
+
b) Then, in the '.htaccess' file in the same directory, add the following (replacing "{your_username}" with the actual username in the path):<br>
'''suPHP_ConfigPath /home/{your_username}/public_html
+
'''suPHP_ConfigPath /home/{your_username}/public_html'''<br>
<Files php.ini>
+
'''<Files php.ini>'''<br>
order allow,deny
+
'''order allow,deny'''<br>
deny from all
+
'''deny from all'''<br>
</Files>'''
+
'''</Files>'''
  
PHP 5.3.9 created a restriction on the max array size that can be handled in PHP to a default of 1000 array elements (city, state, zip, etc).  When importing many locations, you need a lot more than 1000, so the above steps increases your limit to 50000 array elements --- so you should now be able to do your imports (or alternatively, you would just need to break up your big CSV import file into smaller approx 9KB files [~1000 array elements])
+
PHP 5.3.9 created a restriction on the max array size that can be handled in PHP to a default of 1000 array elements (city, state, zip, etc) (Ref. #1: http://stackoverflow.com/questions/9807100/post-max-array-size | Ref. #2: http://anothersysadmin.wordpress.com/2012/02/16/php-5-3-max_input_vars-and-big-forms/).  When importing many locations, you usually need a lot more than 1000, so the above steps increases your limit to 50000 array elements --- so you should now be able to do your imports. Alternatively, you would just need to break up your big CSV import file into smaller approx 9KB files [~1000 array elements]</div>
  
# chmod the '/store-locator/' folder to 775  
+
2. chmod the '/store-locator/' folder to 775  
# Or [http://docs.viadat.com/Main_Page#I.27ve_placed_the_shortcode_on_the_page.2C_and_I_see_the_address_search_form.2C_but_why_is_the_map_area_blank_and_not_loading.3F perform Step #3 here]
+
3. Or [http://docs.viadat.com/Main_Page#I.27ve_placed_the_shortcode_on_the_page.2C_and_I_see_the_address_search_form.2C_but_why_is_the_map_area_blank_and_not_loading.3F perform Step #3 here]
#'''Other Troubleshooting Steps You Can Take:'''
+
4.'''Other Troubleshooting Steps You Can Take:'''
  
 
<ol><ul><ul style='padding-left:20px;'><li>Make sure your '/tmp/' folder is writeable</li>
 
<ol><ul><ul style='padding-left:20px;'><li>Make sure your '/tmp/' folder is writeable</li>

Revision as of 23:35, 4 March 2014

Installation

How to use (before version 1.2.37):

  1. Put this directory into /wp-content/plugins/store-locator/addons/ folder
  2. Activate license on the 'News & Upgrades' page of the 'wp-admin' interface

How to use (version 1.2.37 - 1.9.7):

  1. Put this directory into /wp-content/uploads/sl-uploads/addons/ folder
  2. Activate license on the 'News & Upgrades' page of the 'wp-admin' interface

(This change in version 1.2.37 in the location of where you place addon folders allows you to update your main Store Locator plugin without worrying about losing your addons in the updating process the plugin)

How to use (version 2.0 and later):

  1. Put this directory into /wp-content/uploads/sl-uploads/addons/ folder
  2. Activate license from the LotsOfLocales™ Dashboard interface

(LotsOfLocales™ Dashboard can be accessed from any page in Store Locator's admin section -- it's a tab on the top right of your screen)

How to prepare your CSV file:

  1. Make sure to save your file in "Windows Comma Separated" format instead of "Common Format CSV" (for more recent versions of Microsoft Excel). In older versions of Excel, pick the option of "CSV (Comma delimited)".
  2. Follow these steps to avoid having distorted columns on import


Purchase CSV Importer & Geocoder / Exporter & XML Exporter Now »

Frequently Asked Questions

Do I need to arrange the columns in my CSV file in any special order?

No, the best feature about this addon is that it allows you to match the columns in your CSV file to the fields (which are database columns) in the store locator database

I need to upload thousands of locations, what's the limit of your CSV importer?

There is no limit specifically with the CSV importer's capabilities.

However, It appears that there is a limit of 15,000 geocodes per day per IP address, according to Google, so that's the main constraint to consider --- usually 15,000 is plenty for most people.

Suggestion: Consider breaking up your CSV file into smaller chunks of locations, and do your import in pieces. The speed and settings of your server may also sometimes affect how many locations can be handled at once.

After uploading my addon files to the "addons/" folder, I'm not seeing the option to activate it on the "News & Upgrades" page

When you extract you addon folder (e.g. "csv-xml-importer-exporter/") from your zip file, make sure that you upload the entire extracted folder and its contents to the "addons/" folder, not just the files. Your directory structure should look like this: "addons/csv-xml-importer-exporter/"

For details on where the proper "addons/" folder is for your version go here: http://docs.viadat.com/CSV_Importer_Geocoder_Exporter_XML_Exporter#Installation

It seems that my columns are all out of place and distorted after the initial step of the CSV import

This simply happens due to having symbols (&,#,", etc.) in your CSV file. Do the following:

  1. Open your CSV file and do a 'Find and Replace' (press Ctrl + H) … Then perform these steps below in the following order …
  2. Replace all ampersand (&) symbols with it's character entity (&amp;)
  3. Replace all pound (#) symbols with it's character entity (&#35;)
  4. Replace all commas (,) with it's character entity (&#44;) or with nothing ()
  5. Replace all apostrophes (') with it's character entity (&#39;) or with nothing ()
  6. Replace all colons (:) with it's character entity (&#58;)
  7. Replace all hyphens (-) with it's character entity (&#46;)
  8. Perform the import again, and you should get clean columns now

If you still receive distorted columns, even after the above steps, continue to search your CSV spreadsheet for any non-alphanumeric characters (anything that is not A-Z, a-z, or 0-9) and convert these non-alphanumeric characters into their proper entity symbols. A good place to search for a specific entity symbol is Google.com.

When I try to upload a CSV file, nothing happens, I get no error message and remain on the "Add Locations" page, or I get a blank screen

1. Most likely solution:

Go to your pull-out admin dashboard (Store Locator v2.0+), and click the 'Server Properties' link --- what version of PHP are you on? If it's greater than or equal to PHP v5.3.9 and your web host uses cPanel (or at least isn't GoDaddy) ...

a) Add the following to the 'php.ini' file in your website's root directory, '/public_html/' (or create the 'php.ini' file if it doesn't exist):
max_input_vars = 50000
suhosin.post.max_vars = 50000
suhosin.request.max_vars = 50000

b) Then, in the '.htaccess' file in the same directory, add the following (replacing "{your_username}" with the actual username in the path):
suPHP_ConfigPath /home/{your_username}/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

PHP 5.3.9 created a restriction on the max array size that can be handled in PHP to a default of 1000 array elements (city, state, zip, etc) (Ref. #1: http://stackoverflow.com/questions/9807100/post-max-array-size | Ref. #2: http://anothersysadmin.wordpress.com/2012/02/16/php-5-3-max_input_vars-and-big-forms/). When importing many locations, you usually need a lot more than 1000, so the above steps increases your limit to 50000 array elements --- so you should now be able to do your imports. Alternatively, you would just need to break up your big CSV import file into smaller approx 9KB files [~1000 array elements]

2. chmod the '/store-locator/' folder to 775 3. Or perform Step #3 here 4.Other Troubleshooting Steps You Can Take:

      • Make sure your '/tmp/' folder is writeable
      • Also, to debug, in 'add-locations.php' you can add the line:

        print_r($_FILES);

        before the line:

        if (move_uploaded_file($_FILES['csv_import']['tmp_name'], "$newfile")) {

        if you see "[error] => 0″ in the array, then the upload is occuring properly, and it has something to do with your server, otherwise, you can find information are uploaded files error codes here: http://www.php.net/manual/en/features.file-upload.errors.php

      • Add the line "define('WP_DEBUG', true);" to the "wp-config.php" file in your WordPress root directory (this may provide additional error messages, details as to what may be occuring. Make sure to comment out this line after you have finished debugging).

I'm receiving a "404 File Not Found" / "404 Page Not Found" error message on export

Option 1:

In your store-locator/mgmt-buttons-links.php file …


… Copy & paste the following line:

$sl_real_base=$sl_base; $sl_base=$sl_upload_base;


… Before this line (approx line 9):

include($sl_upload_path."/addons/csv-xml-importer-exporter/export-links.php")


… then, after the above line (line 9), copy & paste:

$sl_base=$sl_real_base;


Option 2:

Undo the coding changes in Option 1, then copy & paste the CSV Importer folder from the "uploads/sl-uploads/addons/" folder to the "plugins/store-locator/addons/" folder so that you have it in 2 places


(Note: it appears that this affects versions 1.2.37 - 1.2.39.3, so should be fixed by the next version after 1.2.39.3)


Purchase CSV Importer & Geocoder / Exporter & XML Exporter Now »