Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Location
    Florida, USA
    Posts
    14
    Plugin Contributions
    0

    help question importing categories from db - using EasyPopulate !

    Thanks in advance for any help !!

    I am trying to use an existing state/county/city database to create those categories and products on the fly in ZenCart using Easy Populate, but having no luck so far.

    My SQL skills are a bit rusty, but I was able to create a query to build a CSV file which looks to be in the same format as the exported EasyPopulate CSV file, I am not sure why EasyPopulate does not read it in properly, and not sure how exactly ZenCart builds categories based on the import file, etc... I know I must be missing something obvious !!

    Here is the message from Easy Populate, usually I get a"blue" listing of the products imported:

    File uploaded.
    Temporary filename: /tmp/phpB9t2ko
    User filename: cart-zipcode-merge.csv
    Size: 147617

    Upload Complete


    And here is the Query I built using a zipcode db and padding with some dummy data:

    SELECT
    ' ' as v_products_model,
    'BuyThisAd.jpg' as v_products_image,
    concat(`zip-codes-database-deluxe-sampl`.State, '-', `zip-codes-database-deluxe-sampl`.CountyName, '-', `zip-codes-database-deluxe-sampl`.City ) as v_products_name_1,
    'This is a 148 x 200 pixel ad... It will consist of your picture or logo, your office information, and a link to either a video, website, your profile... The ad will on the left and right of our main directory site, any logo or picture must be 100x10' as v_products_description_1,
    ' ' as v_products_url_1,
    ' ' as v_specials_price,
    ' ' as v_specials_date_avail,
    ' ' as v_specials_expires_date,
    '250' as v_products_price,
    '0' as v_products_weight,
    ' ' as v_date_avail,
    '9/3/2008 6:09:49 PM' as v_date_added,
    '4' as v_products_quantity,
    ' ' as v_manufacturers_name,
    'Banner Ads' as v_categories_name_1,
    'Personal Use' as v_categories_name_2,
    'Accident & Injuries' as v_categories_name_3,
    `zip-codes-database-deluxe-sampl`.State as v_categories_name_4,
    `zip-codes-database-deluxe-sampl`.CountyName as v_categories_name_5,
    `zip-codes-database-deluxe-sampl`.City as v_categories_name_6,
    '--none--' as v_tax_class_title,
    '1' as v_status,
    'EOREOR' as EOREOR
    FROM
    `zip-codes-database-deluxe-sampl`
    ORDER BY
    `zip-codes-database-deluxe-sampl`.ZipCode ASC


    I think the data may be in the right format, but my export using Navicat into xls may have done something naughty with the conversion, any help will be DEEPLY appreciated :-))))

    I will gladly post more info, I wish I knew more about the ZenCart db structures, but, too many things to learn tonight...
    Last edited by AzureCrystal; 7 Sep 2008 at 06:39 AM. Reason: bad sentence
    Zen Version: v1.3.8, Server: Apache , Operating system: Linux RedHat

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: importing categories from db - using EasyPopulate !

    http://www.zen-cart.com/wiki/index.php/Easy_Populate
    Wiki for EP at above url should help

  3. #3
    Join Date
    Oct 2006
    Location
    Florida, USA
    Posts
    14
    Plugin Contributions
    0

    Default Re: importing categories from db - using EasyPopulate !

    Quote Originally Posted by misty View Post
    http://www.zen-cart.com/wiki/index.php/Easy_Populate
    Wiki for EP at above url should help
    Thanks a million Misty, I didn't know this wiki existed, exactly what I needed, might be my answer !!
    Zen Version: v1.3.8, Server: Apache , Operating system: Linux RedHat

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: importing categories from db - using EasyPopulate !

    No problem...hope your mission proves successful

  5. #5
    Join Date
    Oct 2006
    Location
    Florida, USA
    Posts
    14
    Plugin Contributions
    0

    Default Re: importing categories from db - using EasyPopulate !

    Quote Originally Posted by misty View Post
    No problem...hope your mission proves successful
    Indeed, thanks !!

    Upload Results
    File uploaded.
    Temporary filename: /tmp/php2y4l03
    User filename: cart-zipcode-merge7.txt
    Size: 149998

    NEW PRODUCT! - Model: 1001 | BuyThisAd. | 1001-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | ANSONVILLE | --none-- | 1 |
    NEW PRODUCT! - Model: 1002 | BuyThisAd. | 1002-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | LILESVILLE | --none-- | 1 |
    NEW PRODUCT! - Model: 1003 | BuyThisAd. | 1003-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | MC FARLAN | --none-- | 1 |
    NEW PRODUCT! - Model: 1004 | BuyThisAd. | 1004-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | MORVEN | --none-- | 1 |
    NEW PRODUCT! - Model: 1005 | BuyThisAd. | 1005-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | PEACHLAND | --none-- | 1 |
    NEW PRODUCT! - Model: 1006 | BuyThisAd. | 1006-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | PEACHLAND | --none-- | 1 |
    NEW PRODUCT! - Model: 1007 | BuyThisAd. | 1007-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | PEACHLAND | --none-- | 1 |
    NEW PRODUCT! - Model: 1008 | BuyThisAd. | 1008-NC-AN | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | ANSON | POLKTON | --none-- | 1 |
    NEW PRODUCT! - Model: 1009 | BuyThisAd. | 1009-NC-BE | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | BEAUFORT | PANTEGO | --none-- | 1 |
    NEW PRODUCT! - Model: 1010 | BuyThisAd. | 1010-NC-BE | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | BEAUFORT | PINETOWN | --none-- | 1 |
    NEW PRODUCT! - Model: 1011 | BuyThisAd. | 1011-NC-BE | This is a | | | | | 250 | 0 | | 9/3/2008 6 | 4 | | Banner Ads | Personal U | Accident a | NC | BEAUFORT | WASHINGTON | --none-- | 1
    Zen Version: v1.3.8, Server: Apache , Operating system: Linux RedHat

  6. #6
    Join Date
    Oct 2006
    Location
    Florida, USA
    Posts
    14
    Plugin Contributions
    0

    Default Re: importing categories from db - using EasyPopulate !

    For sake of helping others, here is the revised SQL with a self incrementing number to create the model number: I used Navicat to export the query into a tab delimited text file:

    SELECT
    @rownum:=@rownum+1 v_products_model,
    'BuyThisAd.jpg' as v_products_image,
    concat(`zip-codes-database-deluxe-sampl`.State, '-', `zip-codes-database-deluxe-sampl`.CountyName, '-', `zip-codes-database-deluxe-sampl`.City ) as v_products_name_1,
    'This is a 148 x 200 pixel ad... It will consist of your picture or logo, your office information, and a link to either a video, website, your profile... The ad will on the left and right of our main directory site, any logo or picture must be 100x10' as v_products_description_1,
    ' ' as v_products_url_1,
    ' ' as v_specials_price,
    ' ' as v_specials_date_avail,
    ' ' as v_specials_expires_date,
    '250' as v_products_price,
    '0' as v_products_weight,
    ' ' as v_date_avail,
    '9/3/2008 6:09:49 PM' as v_date_added,
    '4' as v_products_quantity,
    ' ' as v_manufacturers_name,
    'Banner Ads' as v_categories_name_1,
    'Personal Use' as v_categories_name_2,
    'Accident & Injuries' as v_categories_name_3,
    `zip-codes-database-deluxe-sampl`.State as v_categories_name_4,
    `zip-codes-database-deluxe-sampl`.CountyName as v_categories_name_5,
    `zip-codes-database-deluxe-sampl`.City as v_categories_name_6,
    '--none--' as v_tax_class_title,
    '1' as v_status,
    'EOREOR' as EOREOR
    FROM
    (SELECT @rownum:=1000) numDummy, `zip-codes-database-deluxe-sampl`
    ORDER BY
    `zip-codes-database-deluxe-sampl`.State,
    `zip-codes-database-deluxe-sampl`.CountyName,
    `zip-codes-database-deluxe-sampl`.City ASC
    Zen Version: v1.3.8, Server: Apache , Operating system: Linux RedHat

 

 

Similar Threads

  1. v154 Easypopulate not importing
    By widget50 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 Oct 2015, 12:33 PM
  2. Replies: 1
    Last Post: 18 Jan 2013, 09:52 PM
  3. Using EasyPopulate to remove categories
    By w2e in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 28 Jul 2010, 06:35 PM
  4. Importing categories products & customers from 1.3.6
    By deshojo in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 21 Dec 2007, 11:44 PM
  5. importing data via EasyPopulate
    By sentinel555 in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 25 Jun 2006, 05:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg