Page 1 of 7 123 ... LastLast
Results 1 to 10 of 317

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Idea or Suggestion Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Warning: The supplied file is for showing examples only, do not use it in your store since it will cause errors if you don't have all of the add-on mods installed that this file includes. Make the changes shown here in your copy of easypopulate.php!

    This is how you do it for easy populate v1.2.5.4 or 1.2.5.5, it's similar for other versions but there might be more or fewer additions of fields as described below.

    Find the name of the field that you would like to add if you don't already know it. To do this, go to phpMyAdmin, click on the zen_products table, on the Structure tab you will see all of the fields that easy populate is able to use. If you don't use phpMyAdmin you can query the structure of the products table.

    Now that you know what field names you need, open your copy of admin/easypoplulate.php in a text editor and search for v_products_weight. It will appear 7 times throughout this file. It's part of an array of fields that will be used, you can see that all of the one starting with v_ are in the database table zen_products.

    The order of the fields in that array correspond to where in the csv file the field will appear. So copy the entire line including v_products_weight and paste it where you want in the array. Make sure you copy everything, if you forget a comma you'll cause an error. Replace v_products_weight to v_yourfield (the field name using underscores instead of spaces), as well as p.products_weight to p.yourfield when it's in the line(3 of the 7 lines).

    After your first 5 alterations (around line 388, 455, 598, 1286, and 1434) you will come to the lines around line 1925. They look different, but still just copy and paste like the other 5 lines.

    On around line 1959 copy only this part of the line:

    '", products_weight="'.zen_db_input($v_products_weight) .

    and paste it where you want, changing products_weight and v_products_weight. That is your last alteration. Save the file and upload to the admin folder on your server.

    Navigate to easy populate in the tools drop down in the admin panel. Download a complete tab-delimited file and open in your spreadsheet app to see the new fields that you added.

    You'll notice that I have added map_enabled to the included file. In the product creation page in the admin this is a radio button, so you can check boxes and select radio buttons, 0 is off and 1 is on.

    The mods that are used in the included file are msrp, map price, auction sites attributes (ASA), and dual pricing.

    The version that the included admin/easypopulate file is from is 1.2.5.4
    Attached Files Attached Files
    Last edited by lankeeyankee; 21 Dec 2008 at 07:36 AM.

    Zen Cart and it's community are the best!!

  2. #2
    Join Date
    Dec 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Hi,

    Getting the below when trying to import after modifying the various lines per your instruction. The first record will update correctly but the others will not (the subsequent records were new items). I have triple checked the mods and they are correct. Downloading the file gives me the correct columns I want.
    They are "products_sort_order" and "default_subcontractor" (from another mod). Tried it also with just "products_sort_order"
    and same problem. Below is the error log.

    Thanks for any help!

    Art

    MySQL error 1136: Column count doesn't match value count at row 1
    When executing:
    INSERT INTO zen_products (
    products_image,
    products_model,
    products_price,
    products_status,
    products_last_modified,
    products_date_added,
    products_date_available,
    products_tax_class_id,
    products_weight,
    products_quantity,
    manufacturers_id)
    VALUES (
    'no_picture.gif','3R1919-14B-CW',
    '349.99',
    '1',
    CURRENT_TIMESTAMP,
    "2009-01-09 13:59",
    NULL,
    '1',
    '28',
    '20',
    '',
    '0',
    '13')

  3. #3
    Join Date
    Dec 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    One more thing: This is the message after trying to update:

    UPDATED! - Model: 3R1919-14B-EW | | Roto Mil-S | Empty - Pu | | | | | 279.99 | 23 | 10 | | | 1/9/2009 1 | 0 | SKB | Shockmount | SKB - Mil | Roto Cases | 3R Series | | | | Taxable Go | 1 |
    ADD NEW PRODUCT FAILED! - Model: 3R1919-14B-CW - SQL error. Check Easy Populate error log in uploads directory
    ADD NEW PRODUCT FAILED! - Model: 3R2216-15B-E - SQL error. Check Easy Populate error log in uploads directory
    ADD NEW PRODUCT FAILED! - Model: 3R2217-10B-EW - SQL error. Check Easy Populate error log in uploads directory

    Thanks again.

    Art

  4. #4
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Art,

    It looks like, in your first post, that there are more VALUES being added than there are rows in the table, thus the error message you received:

    MySQL error 1136: Column count doesn't match value count

    In your second post, it looks like you don't have EOREOR at the end of your row which is why the only one added is the first record, or since the column count and value count don't match it is throwing it off.

    This often happens with a quote ending up throwing things off. If you look at the VALUES you were trying to insert you will see after the weight and quantity values there is a '', followed by '0', '13'. I'd look at the spreadsheet file to make sure all values are in their correct columns and that you have EOREOR at the end of each row.

    Please let me know if you are still having trouble. You can post your spreadsheet file and your easypopulate file so I can see what's going on.

    Zen Cart and it's community are the best!!

  5. #5
    Join Date
    Dec 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Thanks for the reply lankeeyankee. Everything imports correctly if the product already exists. It only throws the error if it is a new product in the import file. I can take an existing product code that imports properly, change it by one character and when I try to import it again it throws that error.

    Thanks for the help!

    Art

  6. #6
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    I assume this would work for adding meta tags for products?

  7. #7
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Quote Originally Posted by artmuns View Post
    Thanks for the reply lankeeyankee. Everything imports correctly if the product already exists. It only throws the error if it is a new product in the import file. I can take an existing product code that imports properly, change it by one character and when I try to import it again it throws that error.

    Thanks for the help!

    Art
    was this working correctly with the default EP install? Or just since you made the changes that I outlined?

    Zen Cart and it's community are the best!!

  8. #8

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Quote Originally Posted by lankeeyankee View Post
    Art,

    It looks like, in your first post, that there are more VALUES being added than there are rows in the table, thus the error message you received:

    MySQL error 1136: Column count doesn't match value count

    In your second post, it looks like you don't have EOREOR at the end of your row which is why the only one added is the first record, or since the column count and value count don't match it is throwing it off.

    This often happens with a quote ending up throwing things off. If you look at the VALUES you were trying to insert you will see after the weight and quantity values there is a '', followed by '0', '13'. I'd look at the spreadsheet file to make sure all values are in their correct columns and that you have EOREOR at the end of each row.

    Please let me know if you are still having trouble. You can post your spreadsheet file and your easypopulate file so I can see what's going on.

    The answer is found at line 1916. You have to dupe products_weight and then change to products_yourfield. Otherwise, you are trying to insert more lines than what the code is willing to handle. MSGSTACK_ERROR_SQL fixed this way for me!
    http://www.ExtremaHosting.com

    Favorite Quote: "If your output exceeds your input, then your upkeep will be your downfall." (anon.)

  9. #9
    Join Date
    Apr 2009
    Location
    Los Angeles, California
    Posts
    128
    Plugin Contributions
    0

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    Quote Originally Posted by artmuns View Post
    Hi,

    Getting the below when trying to import after modifying the various lines per your instruction. The first record will update correctly but the others will not (the subsequent records were new items). I have triple checked the mods and they are correct. Downloading the file gives me the correct columns I want.
    They are "products_sort_order" and "default_subcontractor" (from another mod). Tried it also with just "products_sort_order"
    and same problem. Below is the error log.

    Thanks for any help!

    Art

    MySQL error 1136: Column count doesn't match value count at row 1
    When executing:
    INSERT INTO zen_products (
    products_image,
    products_model,
    products_price,
    products_status,
    products_last_modified,
    products_date_added,
    products_date_available,
    products_tax_class_id,
    products_weight,
    products_quantity,
    manufacturers_id)
    VALUES (
    'no_picture.gif','3R1919-14B-CW',
    '349.99',
    '1',
    CURRENT_TIMESTAMP,
    "2009-01-09 13:59",
    NULL,
    '1',
    '28',
    '20',
    '',
    '0',
    '13')

    i am pretty much having the same problem as this, except my added fields are MSRP & Cost.

    everythign works fine except when i try and add a new product.

    all my values are there, but there is no colum for msrp or cost

    Anyone ever come up with a fix for this?

  10. #10
    Join Date
    Apr 2009
    Location
    Los Angeles, California
    Posts
    128
    Plugin Contributions
    0

    Default Re: Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

    nm all those posts. got it working

 

 
Page 1 of 7 123 ... LastLast

Similar Threads

  1. Basic Description of EasyPopulate database fields?
    By Ben-B in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 7 Feb 2008, 05:56 PM

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