Import Export


Import

It is inconvenient to manually add a large number of business listings at once to a fresh installation of GoClixy. Inserting categories, locations, and listings one by one will take a long time especially when you have hundreds or thousands of such information. In such situations, you need a solution to automatically add all those listings to your Online Business Directory.

  • To view all the existing imports and their status, go to Settings->Import/Export->Importer
  • Click the file name under the File Name column to download.
  • To delete the existing imported file, select the file by marking the checkbox to the left of the Data Imported column and click the Delete button.

Note: For security reasons, it is the best practice to delete all existing imported files.

How to import categories?

Create a excel file with the following fields:

  • id - sequence number from 1,2,3,4,5 and so on.
  • parent_id - if the category is a child of some other category, enter the parent category id here or enter 0 for default.
  • name - the name of the category

Import the file and map fields to the appropriate columns.

After bulk import, visit Content->Categories and click on the Tweak Bulk Import tab in the upper right corner. Continue to click on the Submit button until you see a message:

There is nothing to update.

How to import listings?

Mandatory Fields

  • user_id: ID of the user, keep it 1 for bulk users generate
  • package_id: ID of the package that will be assigned to listings after import.
  • title: Title of the listing
  • country_iso: Two-digits country code of the listing. E.g. US
  • country: E.g. United States
  • state: E.g. California
  • city: E.g. San Diego

Optional Fields

  • keywords
    • Separator: , (comma)
    • E.g. Business Directory Script, Yellow Pages Script
  • categories
    • Separator: ### (triple hashes)
    • Relation Separator: => (equal with greater sign)
    • E.g. Beauty and Spa=>Skin Care=>Cosmetics###Beauty and Spa=>Body Care=>Perfumes###Beauty
  • metas (Custom Fields)
    • Separator: ### (triple hashes)
    • Relation Separator: => (equal with greater sign)
    • E.g. company_name=>Skin Care###license_no=>DEMO
  • logo: Name of the image only. The image name must be without space and special characters.
  • cover: Name of the image only. The image name must be without space and special characters.
  • images: Name of the images. Use a comma to separate multiple images.
  • status: 1 to make listings active.

After listings import, visit Settings->Import/Export->Importer and click on the Bulk Import Tweak tab in the upper left corner. Select Listings as the module and enter the ids range. You can find ids information via Content->Listings. Click on the Submit button to organize the information, in other words, this will add your imported data to specific tables.

https://<YOUR DOMAIN URL>/<ADMIN STRING>/settings/migrate/bulk_import_tweak

How to import bulk data?

To import bulk listings, login to the admin panel and go to Settings->Import/Export->Importer, fill the information as described below and click the Save & Exit button.

  • Import: Select the import type
    • Listings: To import bulk listings. NOTE: AFTER LISTING BULK IMPORT, GO TO CONTENT->LISTINGS AND CLICK THE UPDATE CATEGORIES. ESSENTIAL FOR MULTI-LEVEL CATEGORIES
    • Categories: To import bulk categories
    • States: To import bulk states
    • Cities: To import bulk cities
  • File Type: Select file format
    • CSV: Tested with 2,00,000 rows, you can have more than that.
    • Excel 97-2003: Support up to 10,000 rows
    • Excel 2007: Support up to 10,000 rows
  • Transaction Type:
    • Insert Only: Insert new rows only
    • Insert and update: Insert new rows and update existing
    • Import File: Click the Browse button to upload the file

Recommended: If you have a slow Internet connection and the size of your file is larger than 5MB, then upload the file on your Hosting Server and type its name in the Specify File Name textbox.
## NOTE: After purchase, download your license copy and you will find the sample import files and other useful instructions in the Documentation folder ##

  • After clicking the Save & Exit button, a page for field mapping will open.
  • This shows you the database field in one column and your Excel fields in the second column. Match your excel fields correctly to the database colums.
  • Click the Save button to start the import process.

Export

The export option allows you to download the information from your existing website for backup and other purposes.

To download an existing exported file, click the file name under the File Name column.

To delete the exported data information, select the file by marking the checkbox to the left of the Data Exported column and click the Delete button.

How to export existing data?

To export bulk listings, login to the admin panel and visit Settings->Import/Export->Exporter, fill the information as described below and click the Save button.

  • Export: Select the export type
    • Listings: To export listings
    • Categories: To export categories
    • States: To export states
    • Cities: To export cities
  • File Type: Select file format
    • CSV: No limit but special permissions are required on your Hosting server.
    • Excel 97-2003: Support up to 10,000 rows
    • Excel 2007: Support up to 10,000 rows
  • Start ID: ID of the start row
  • End ID: ID of the end row
  • Compress File: Save and download file in ZIP format.

How to Migrate Data from phpMyDirectory to GoClixy?

  • Install GoClixy on your Server by following our installation manual.
  • Go to Developer->Database->Maintenance and click the Remove Sample Data button.
  • Use FTP and open the application/config/database.php file in your text/code editor.
  • Copy the $db['default'] array and paste it to the end of the file.

Migrate DB

Note: The username and password must be same for both databases.

  • Get your phpMyDirectory DB information from the defaults.php file on your server and make the changes as per the screenshot.
  • Save and close the file.
  • Use cPanel/FTP and copy the files folder from your existing PMD directory to public_html/assets/pmd/ folder.
  • Login to the Admin Panel and visit the URL https://YOUR DOMAIN NAME/admin/settings/migrate/migrate.
  • Fill the details:
    • Country - Name of the country
    • Website - Enter your existing website URL
    • ID Limit - Number of records to be processed at a time
    • ID From - ID of the starting row, leave 0 for default
    • ID To - ID of the ending row, leave 20000 for default
  • Click the Submit button.

Migrate Form

  • This will take time depending on the size of your database. If you see a Timeout error, again fill the form and click the Submit button, it will start from the last saved configuration. Do this until you see a success message.
  • After completion, edit the application/config/database.php file and remove the copied lines.
  • Also delete the pmd folder from the public_html/assets/ folder.
  • Go to Financial->Packages, edit all packages and set the Limit as per your requirements.
  • Go to Settings->Locations and activate your default country.
  • Go to Settings->Settings->Advanced tab and set the default city.
  • Login to the Admin Panel, go to Content->Listings->Tweak Fields and click the Submit button to tweak search fields.
  • Do this for all listings. Change the IDs and repeat the step.
  • Go to Content->Categories and click the Update Listings Count tab in the upper right corner.
  • Storing PMD Routes and Links (Developer Edition Customers only)
  • Replace the public function location method inside the application/modules/listings/controllers/Listings.php file with the code below:

public function location($slug, $city = null) {
$id = (int)substr( $slug, strrpos( $slug, '-' ) + 1);
$module = 'listings';
if(empty($id)) {
if(!empty($city)) {
$city = escape($city);
$location = $this->db->where('slug', $city)->get('cities')->row();
if($location) {
$slug = $location->slug . '-' . $location->id;
$this->listings_model->category_location_tag_search(false, 'listings', 'cities', $this->session->userdata('search_country'), $slug, $this->limit);
} else {
$_GET['l'] = escape($city);
$_GET['tl'] = 1;
$this->listings_model->category_location_tag_search(false, $module, 'search', NULL, NULL, $this->limit);
}
} else {
$_GET['l'] = escape($slug);
$_GET['tl'] = 2;
$this->listings_model->category_location_tag_search(false, $module, 'search', NULL, NULL, $this->limit);
}
} else {
$this->listings_model->category_location_tag_search(false, 'listings', 'cities', $this->session->userdata('search_country'), $slug, $this->limit);
}
}

  • Add a new method to the end of the same file as follows:

/**
* Browse By Category and Location
*/
public function browse($category, $state, $city = null) {
$category = $this->db->get_where('categories', array('slug' => escape($category)))->row();
if($category) {
$_GET['cg'] = $category->id;
}
if(!empty($state)) {
$_GET['l'] = escape($state);
$_GET['tl'] = 2;
}
if(!empty($city)) {
$_GET['l'] = escape($city);
$_GET['tl'] = 1;
}
$module = 'listings';
$this->listings_model->category_location_tag_search(false, $module, 'search', NULL, NULL, $this->limit);
}

Add the below lines to the application/config/routes.php file after line number 269.

$route['category/(:any)/location/(:any)/(:any)'] = 'listings/browse/$1/$2/$3';
$route['category/(:any)/location/(:any)'] = 'listings/browse/$1/$2';

Add the below lines to the public_html/.htaccess file after line number 192:

# DETAIL PAGE REDIRECT
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+([^&\s]+)\.html [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ https://www.locallid.co.uk/detail/%1 [L,R=301,NE]