Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Plugin Contributions
    0

    Default Changing field enclosure symbol for Easy Populate

    Hi guys,

    I have a bit of an issue here.

    I have been working for 2 days getting a .csv ready to upload into my zen cart with over 10,000 products ...

    My issue is this:

    Because so many of the product descriptions had " (quotes) and ' (apostrophes) in them, I changed the field enclosure symbol from " (quotes) to an @ symbol.

    This works perfectly fine if I upload via MySql to a working table I have, but when I attempt to upload to the shop, it's completely screwed up, as Easy Populate only seems to recognize " (quotes) as the field enclosure symbol.

    When I uploaded my CSV (After, thank god, having backed up my entire database), it created a mess, hundreds of new categories added, named after fields like price, weight ...etc, all because of the quotes.

    Could anyone tell me how I could reconfigure Easy Populate to accept csv's with a field enclosure being an @ symbol instead of quotes?

    Thank you in advance!

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Changing field enclosure symbol for Easy Populate

    Quote Originally Posted by jax2 View Post
    Hi guys,

    I have a bit of an issue here.

    I have been working for 2 days getting a .csv ready to upload into my zen cart with over 10,000 products ...

    My issue is this:

    Because so many of the product descriptions had " (quotes) and ' (apostrophes) in them, I changed the field enclosure symbol from " (quotes) to an @ symbol.

    This works perfectly fine if I upload via MySql to a working table I have, but when I attempt to upload to the shop, it's completely screwed up, as Easy Populate only seems to recognize " (quotes) as the field enclosure symbol.

    When I uploaded my CSV (After, thank god, having backed up my entire database), it created a mess, hundreds of new categories added, named after fields like price, weight ...etc, all because of the quotes.

    Could anyone tell me how I could reconfigure Easy Populate to accept csv's with a field enclosure being an @ symbol instead of quotes?

    Thank you in advance!
    Okay, several items of concern related to this, why weren't/ aren't the single and double quotes escaped either by you or by the editor being used to create the CSV file? In other words a ' replaced with \' and a " replaced with \" before saving the file such that each field begins and ends with '? What editor is being used? Have you tried Open Office which is pretty good with working with files that will be CSV?
    For some reason I seem to recall that the read in process isn't exactly picking and choosing what character to use as the start and finish to a field, but rather a "natural" divider like the beginning and end of a string. Otherwise it will basically need to do what. Could have just as easily been done in the file when it was saved or edited. That said, I'd have to look at the code in that specific area to see what would need to be done to have EP do what is already programmed into other freely available utilities.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Changing field enclosure symbol for Easy Populate

    I would prefer using pipe ( | ) as field separator. You can change the settings for EasyPopulate in:
    YOUR_ADMIN/easypopulate.php
    around line 40 find:
    Code:
    $csv_deliminator = ","; // "\t" for tab
    and replace with:
    Code:
    $csv_deliminator = "|"; // "\t" for tab
    Now make sure you save your files with the pipe character as delimiter. As suggested by mc12345678, you should try using OpenOffice Calc - it's a bit better when it comes to handling CSV files and allows you to define delimiters on each save (edit filter settings).

 

 

Similar Threads

  1. v150 Easy Populate 4 vs. Easy Populate CSV - What's going on with so many Easy Populates?
    By oleancomputers in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 20 Jun 2013, 05:58 PM
  2. Easy Populate Custom Field Help
    By wonderbread101 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 12 Feb 2012, 03:22 PM
  3. Easy Populate 1-2-5-6 (how to add a new field?)
    By dropbop in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 19 Oct 2009, 02:28 AM
  4. Easy Populate, without v_products_model field?
    By redrumloa in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 13 Aug 2006, 03:32 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR