Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EZ Populate error: Can anyone decipher???? Help please!


Gata

Recommended Posts

I am having trouble converting my database to match EZ populate. I can successfully download and upload the test file, but when I try to add a new product via the same file- I get the following message.

 

Also, the product does not show up in the store, although it will create a new manufacturer and catalog.

 

 

File uploaded. 

Temporary filename: /tmp/phpJmQvHh 

User filename: EP2003Apr30-17-28.txt 

Size: 1214 

| J00891 |  | Quest for  | Olshansky, |  W.W. Nort |  |  |  |  |  |  |  |  |  | 40.00 | 1.5 | 4/30/03 | 4/30/03 | 1 | Alternativ | Used, Rare | Alternativ |  |  |  |  |  | Taxable Go | Active Updated 

1136 - Column count doesn't match value count at row 1 



INSERT INTO products_description                                                                 (products_id,                                                                 language_id,                                                                 products_name,                                                                 products_author,                                                                 products_description,                                                                 products_url)                                                                 VALUES (                                                                         '1086',                                                                         1,                                                                         'Quest for Immortality: Science at the Frontiers of Aging',                                                                         ' W.W. Norton and Company New York 2001 

SIGNED by both authors on title page with personal note to Oprah signed by Olshansky front flyleaf. Survey of current scientific thought on aging. Authors are leading research scientists in the fields of aging and biodemography. Separates fact from fiction in many theories of prolonging life. 

First Edition Fine/ Near Fine Hardcover 8vo isbn # 393048365 

Alternative Health $40',                                                                         ''                                                                         ) 



[TEP STOP]

Link to comment
Share on other sites

Shot in the dark here, Catherine

 

My version of EP is not the newest one, but does EP still require EOREOR at the end of EVERY line and do you have it in place?

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Thanks Muggity- but I do have EOREOR in place at the end of each line. I have duplicated each field in my Filemaker Pro DB-

v_products_model (unique number, starts with letter J with number behind it))

v_products_image (empty)

v_products_name_1 (book title)

v_products_author_1 (author)

v_products_description_1 (book information)

v_products_url_1 (empty)

v_products_name_2 (empty)

v_products_author_2 (empty)

v_products_description_2 (empty)

v_products_url_2 (empty)

v_products_name_3 (empty)

v_products_author_3 (empty)

v_products_description_3 (empty)

v_products_url_3 (empty)

v_products_price (number with 2 decimal)

v_products_weight (number)

v_date_avail (DD/MM/YY)

v_date_added (DD/MM/YY)

v_products_quantity (1)

v_manufacturers_name (Book section)

v_categories_name_1 (Catalog Name)

v_categories_name_2 (Book section)

v_categories_name_3 (empty)

v_categories_name_4 (empty)

v_categories_name_5 (empty)

v_categories_name_6 (empty)

v_categories_name_7 (empty)

v_tax_class_title (Taxable Goods)

v_status (Active)

EOREOR (EOREOR)

 

I export this from FMPro to Excel, then save tab delimited text....

I have added the field v_products_author to the database, to EZ poplulate files, and the relevant admin and catalog files.

Link to comment
Share on other sites

There are 3 places in the easypopluate.php to add the new field information, did you add it in all 3? I do a search for an existing field to find the occurances and add the new ones.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

OK I could be wrong. But you have 30 fields there and EP (mine at least has 21) and in your error I see Language_id but not in your list. The way I understand it. Dont know if that helps point ya in the right direction.

Link to comment
Share on other sites

Ok for not being able to edit your posts when ya typo. What I meant to say is the way I see it you might be trying to import 31 fields in your EP set up but your file only has 30. Usually that error means just that. Trying to import less values then the number of tables.

 

 

OK I could be wrong. But you have 30 fields there and EP (mine at least has 21) and in your error I see Language_id but not in your list. The way I understand it. Dont know if that helps point ya in the right direction.
Link to comment
Share on other sites

Still can't figure it out....Downloading the current tab delimited text file to edit works fine- I can re-upload it with no problem. It contains my new field as well. But if I add a product to the downloaded file and attempt to re-upload it- I get the error message.

 

Loxly-

There are 3 places in the easypopluate.php to add the new field information, did you add it in all 3? I do a search for an existing field to find the occurances and add the new ones.

 

I did a search in easypopulate.php for products_name, and added my new field products_author to each occurance. I have also added this field to the database in the correct table- products_description. I think that is what you mean right?

 

 

OK I could be wrong. But you have 30 fields there and EP (mine at least has 21) and in your error I see Language_id but not in your list. The way I understand it. Dont know if that helps point ya in the right direction.

 

Orlando Guy- do you mean I should have a field called Language_id in my database?

 

Thanks for your replies and help! I am pulling all of my hair out at this point- almost ready to go live if I can get the products into the database.

Link to comment
Share on other sites

It "seems' that your ep program has the command line in it. Which would be around line 1606 or if you are using header control then around line 1620. I checked my database and I do have that field. But I just checked my download file and upload file neither have it and the database is populated with 1 for that field so that is not it. However :) in your list you show author_1 author_2 author_3 and same for product_name. Do you have those fields both in your database and in the right spots in the EP program? Remember that even if there is nothing to go in a field a value must be sent even if its null. The error you are getting from what I can understand means just that. Just for example database has 31 fields but ep is uploading 27. Then you will get that error.

Link to comment
Share on other sites

What happens if you edit a product in the file you download (don't add any new products) and then upload it? If you can do that without any problems then it is something in the product creation part of the code.

 

If that is the case you need to look at your easypopulate.php file beginning around line 1500 and add your missing row to both the insert into products area and the values immediately below.

 

I assume it is the v_products_author row that is causing the problem. I think it should look something like this:

 	 $query = "INSERT INTO products (

  	 products_image,

  	 products_author,

  	 #products_mimage,

  	 #products_bimage,

  	 #products_subimage1,

  	 #products_bsubimage1,

  	 #products_subimage2,

  	 #products_bsubimage2,

  	 #products_subimage3,

  	 #products_bsubimage3,

  	 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 (

    	 '$v_products_author',

    	 '$v_products_image',";



	 // unmcomment these lines if you are running the image mods

	 /*

   $query .=  . $v_products_mimage . '", "'

    	 . $v_products_bimage . '", "'

    	 . $v_products_subimage1 . '", "'

    	 . $v_products_bsubimage1 . '", "'

    	 . $v_products_subimage2 . '", "'

    	 . $v_products_bsubimage2 . '", "'

    	 . $v_products_subimage3 . '", "'

    	 . $v_products_bsubimage3 . '", "'

	 */



	 $query .="    '$v_products_model',

       '$v_products_price',

       '$v_db_status',

       CURRENT_TIMESTAMP,

       $v_date_added,

       $v_date_avail,

       '$v_tax_class_id',

       '$v_products_weight',

       '$v_products_quantity',

       '$v_manufacturer_id')

    	 ";

   $result = tep_db_query($query);

Link to comment
Share on other sites

Ok...thanks for the help on this. I found out where the problem was. I had added the new product field for the author to easypoplute.php but missed a spot. The code now works. The missing portion was where the information is to be inserted into the table products_description. The fixed code is as follows:

result = tep_db_query($sql);

  	 if (tep_db_num_rows($result) == 0) {

     // nope, this is a new product description

     $result = tep_db_query($sql);

     $sql =

    	 "INSERT INTO products_description

       (products_id,

       language_id,

       products_name,

       products_author,

       products_description,

       products_url)

       VALUES (

      	 '" . $v_products_id . "',

      	 " . $key . ",

      	 '" . $name . "',

      	 '". $v_products_author[$key] . "',

      	 '". $v_products_description[$key] . "',

      	 '". $v_products_url[$key] . "'

      	 )";

     // support for Linda's Header Controller 2.0

     if (isset($v_products_head_title_tag)){

    	 // override the sql if we're using Linda's contrib

    	 $sql =

       "INSERT INTO products_description

      	 (products_id,

      	 language_id,

      	 products_name,

      	 products_author,

      	 products_description,

      	 products_url,

      	 products_head_title_tag,

      	 products_head_desc_tag,

      	 products_head_keywords_tag)

      	 VALUES (

         '" . $v_products_id . "',

         " . $key . ",

         '" . $name . "',

         '". $v_products_author[$key] . "',

         '". $v_products_description[$key] . "',

         '". $v_products_url[$key] . "',

         '". $v_products_head_title_tag[$key] . "',

         '". $v_products_head_desc_tag[$key] . "',

         '". $v_products_head_keywords_tag[$key] . "')";

 

anyway- thanks for pointing me in the right direction!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...