Forums / All Other Contributions/Addons / Here's a quick tutorial on how to add fields to easypopulate v1.2.5.4 or 1.2.5.5

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

Started by lankeeyankee on 21 Dec 2008, 6:31 AM · Views: 83,718

Results 121 to 140 of 318
25 Oct 2009, 5:57 AM
#121
rgme avatar

rgme

New Zenner

Join Date:
Oct 2009
Posts:
33
Plugin Contributions:
0

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

I finally was able to write a VB program that reads the tab-delimited export of a distributor file and massage it into format that EP 1.2.5.4 was able to get into ZC. At a smidge over 3k products, my 1st ever store is stocked & priced and I'm very nearly done with the visual & functional changes. Almost ready to go live with it.

Did have trouble with (35s limit?) timeouts trying to get EP to import, but breaking the file into 4 equal sized ones did the trick. Had to do many attempts before could get EP to pull stuff out of ZC then, again due to timeouts. Seems to me I should be able to get 3k of products into a FULL file before 35 seconds go by and I get a timeout, but perhaps this is really a GoDaddy host caused problem?

8 Jan 2010, 4:39 PM
#122
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

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

For anyone that gets the following error message:

Unknown column 'p.EASYPOPULATE_CONFIG_CUSTOM_FIELDS' in 'field list'

As suggested above, installing a fresh zen cart and then re-installing easy populate will solve your problem BUT if this is not an option for you (ie you've got a working website you can't delete!), simply do the following:

  1. Carefully go through your FTP and remove every file that was installed by Easy Populate.
  2. Go into your PhpMyAdmin and search the database for the word POPULATE
  3. Delete all rows in the database referring to easy populate
  4. Re-install easy populate.

It would be a good idea to backup all your files and database before doing this, just in case ;)

Hopefully that helps!

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

20 Jan 2010, 6:39 AM
#123
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

Using EP 1.2.5.4 and all products are added successfully. I need to control the sort order because of similarity in the Product Names; Admin,All Listing, Display Product Display - Default Sort Order set to “8” doesn’t give the desired result.
I added the extra field to my Excel .txt file called v_products_sort_order as per the sample.txt file (from lankeeyankee) for adding fields. Saving as .txt file and importing this does not give an error, but doesn’t do anything either, as far as any sorting.

I read in another thread http://www.zen-cart.com/forum/showthread.php?t=34970&page=270
Post #2693 8th December 2009, 05:25 from schoolboy, and wonder if I need to get into the zen_products_description table in phpMyAdmin and add an extra field called products_sort_order ? If so, any advice on specific details on adding this extra field (I know enough MySQL to be dangerous and don’t want to take any chances on corrupting the database). Thank you in advance.

20 Jan 2010, 12:56 PM
#124
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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

Jaybird:

... and wonder if I need to get into the zen_products_description table in phpMyAdmin and add an extra field called products_sort_order ?

Well the good news is that this field is ALREADY part of the ZC schema and is in the PRODUCTS TABLE too.

So, if you want this field to be incorporated into your Easy Populate functionality (this giving you a COLUMN in the spreadsheet called:

v_products_sort_order

... then you just need to CAREFULLY follow the instructions that are given in the first post of this thread, to MODIFY EasyPop to accommodate that field.

(In fact I think I did this on one of my shops already... If so I will zip up the easypopulate.php file and attach it to another post later (with instructions...)

20 years a Zencart User

20 Jan 2010, 1:23 PM
#125
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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

schoolboy:

(In fact I think I did this on one of my shops already... If so I will zip up the easypopulate.php file and attach it to another post later (with instructions...)

Yes, I do have it:- NB: this is for EP 1.2.5.4

  1. UNZIP this file onto your hard drive
  2. Using FTP, navigate to your ADMIN FOLDER (whatever you have called it)
  3. FIND: easypopulate.php
  4. RE-NAME that file (on the server) to easypopulate.bak (this preserves the ORIGINAL file in case mine does not work - so you can restore it if necessary)
  5. FTP my version to your admin folder.
  6. RUN easy Populate in your admin panel to get a spreadsheet, and use this to see where the v_products_sort_order column appears.

Away you go.

20 years a Zencart User

22 Jan 2010, 9:03 AM
#126
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

Thank you, schoolboy. Followed instructions, but getting errors:

ADD NEW PRODUCT FAILED! - Model: 72396 - SQL error. Check Easy Populate error log in uploads directory
SKIPPED! - Model: - No category provided for this product

Error log:
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,
master_categories_id,
manufacturers_id)
VALUES (
'products/LiftLidHeadATA.jpg','72366',
'189',
'1',
CURRENT_TIMESTAMP,
"2009-11-03 23:35",
NULL,
'',
'2',
'26.73',
'8',
'9',
'NULL')

Tried many variations . . . any idea where these errors are originating from?
Jay

22 Jan 2010, 4:13 PM
#127
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

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

Jaybird,

Make sure you've got a column for the product categories, should be named "v_categories_name_1"

For product #72396, make sure that space is filled in.

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

22 Jan 2010, 7:57 PM
#128
simondirect avatar

simondirect

New Zenner

Join Date:
Nov 2009
Posts:
4
Plugin Contributions:
0

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

did you ever figure out the:

Warning: array_flip() [function.array-flip]: The argument should be an array in /home/content/c/m/a/cmaccess/html/store/admin/easypopulate.php on line 1222

having same issue here?
thx
geoff

22 Jan 2010, 8:07 PM
#129
simondirect avatar

simondirect

New Zenner

Join Date:
Nov 2009
Posts:
4
Plugin Contributions:
0

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

JHouse:

Hi,

I'm using the latest version of Easy Populate CSV and I'm having a couple issues.

  1. It installed fine, but I'm having troubles getting the products to import successfully.

  2. This is the error I get:
    Warning: array_flip() [function.array-flip]: The argument should be an array in /home/xxxxxx/public_html/xxxxxx/admin/easypopulate.php on line 1222. I haven't messed with any of these files.

Here are the csv files I'm trying to upload:

http://groundedgroup.com/data/EPTest10.csv
http://groundedgroup.com/data/EPTest9.csv

Both files contain the same data, however, I tried saving them differently to see if that would make a difference. No dice.

Any help would be appreciated. Thanks.

I got the same issue how did you fix it?

23 Jan 2010, 8:45 PM
#130
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

jackie.taferner:

Jaybird,

Make sure you've got a column for the product categories, should be named "v_categories_name_1"
For product #72396, make sure that space is filled in.

Jackie -
All fields are filled in. I believe I've isolated the problem to Column A v_products_model. I can successfully make changes to other columns (leaving Column A as is) and the .txt spreadsheet will be updated correctly. The entries in Column A are numbers formatted as TEXT; any change, either entering a new number and formatting it as TEXT, or even editing the existing number, gives this error:

When executing:
MySQL error 1136: Column count doesn't match value count at row 1
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,
master_categories_id,
manufacturers_id)
VALUES (
'products/LiftLidComboATA4C.jpg','92408',
'1500',
'1',
CURRENT_TIMESTAMP,
"2009-11-03 23:35",
NULL,
'',
'5',
'19.73',
'8',
'8',
'NULL')
I think EP is ignoring Column A and this is throwing off the Column count vs. the value count.
Any ideas?

25 Jan 2010, 4:26 PM
#131
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

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

When you save the excel file into a csv or txt document, it removes the excel-specific formatting.

What are your reasons of formatting for text? What do your product #s look like when you do not format as text?

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

26 Jan 2010, 3:26 PM
#132
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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

Make v_products_model the FIRST column, (if it isn't already the FIRST column), in the spreadsheet.

Then, when you have saved as Tab-delimited TXT, open it in another plain text editor (Emerald editor, or Notepad++). See if the tabs are there, or if " " have been inserted.

20 years a Zencart User

28 Jan 2010, 10:59 AM
#133
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

schoolboy:

Make v_products_model the FIRST column, (if it isn't already the FIRST column), in the spreadsheet.

Then, when you have saved as Tab-delimited TXT, open it in another plain text editor (Emerald editor, or Notepad++). See if the tabs are there, or if " " have been inserted.

V_products_model is the first column (A). I opened the .txt file in notepad and it is tabbed.
Experimented with switching back to the original easypopulate.php file, and trying a test file with the extra columns (per schoolboy). File updated and added new product and model #’s correctly – obviously left out the v_products_sort_order column. Switched back to schoolboy’s easypopulate.php file. Uploaded the same test file (with v_products_sort_order column). This now updated the Sort Order correctly, I was also able to make changes to the model # (Column A), but ONLY if the new cel was all letters, NOT any combination of letters + numbers! A new line could NOT be updated no matter what I put in Column A (v_products_model).

My conclusion after a week of struggle is that I’m unable to add new products UNLESS they had been previously uploaded using the original easypopulate.php file. Then, switching to schoolboy’s easypopulate.php file, they could then be updated to include the sort order.

Could there be something in the schoolboy easypopulate.php file that’s only allowing existing products to be updated with the extra fields? I looked at the .php file, but my meager knowledge of php wasn’t any help. The only extra field I’m concerned with is v_products_sort_order. Thank you in advance for any clues.
Jay

28 Jan 2010, 4:06 PM
#134
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

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

Jaybird,

Can you please upload your easypopulate.php file? I will edit this for you to include the new field.

Let me know what column you want the new field in (ie after the weight field, or after the price field, etc etc)

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

28 Jan 2010, 7:26 PM
#135
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

jackie.taferner:

Jaybird,

Can you please upload your easypopulate.php file? I will edit this for you to include the new field.

Let me know what column you want the new field in (ie after the weight field, or after the price field, etc etc)

Thank you, Jackie. Here’s the .php file from schoolboy (saved as easypopulate_schoolboy.php to distinguish from the original):
zip.gif easypopulate_schoolboy.zip (25.7 KB)[Attachment no longer available]

I ftp’d it to my admin folder and renamed it easypopulate.php.

In ZenCart, admin, tools, Easypopulate, I downloaded the Complete tab-delimited .txt file to edit.
It contained all ~800 items I had previously entered, with the columns in the following order:
A v_products_model
B v_products_image
C v_products_name_1 Product Name
D v_products_description_1 Product Description
E v_products_url_1 blank
F v_specials_price blank
G v_specials_date_avail blank
H v_specials_expires_date blank
I v_products_price $ Price
J v_products_sort_order * * *
K v_products_weight Shipping charge
L v_products_quantity_order_min 1
M v_date_avail blank
N v_date_added ########
O v_products_quantity 8
P v_manufacturers_name blank
Q v_categories_name_1 Amp Heads LIFT LID
R v_categories_name_2 blank
S v_categories_name_3 blank
T v_categories_name_4 blank
U v_categories_name_5 blank
V v_categories_name_6 blank
W v_categories_name_7 blank
X v_tax_class_title --none--
Y v_status 1
Z EOREOR EOREOR

If you wanted the original easypopulate.php file without schoolboy's added fields, here 'tis:
Attachment #6957

Thank you,
Jay

28 Jan 2010, 7:35 PM
#136
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

The easypopulate_schoolboy.php zip file attachment should have been:
zip.gif easypopulate_schoolboy.zip (25.7 KB)

Jay

28 Jan 2010, 7:44 PM
#137
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

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

OK, see if this works for you.

I started with the fresh easypopulate file, and using the same method as posted in the first post of this thread, I added the new v_products_sort_order field.

NOTE: if anyone else is looking to add a new field to their easypopulate... you can simply download this file, and do a "Find and Replace" like so:

Find "products_sort_order" and replace with "YOUR_NEW_FIELD" (without the v_)

This file is for EasyPopulate v1.2.5.4 only!

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

29 Jan 2010, 9:12 AM
#138
jaybird avatar

jaybird

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

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

jackie.taferner:

OK, see if this works for you.

I started with the fresh easypopulate file, and using the same method as posted in the first post of this thread, I added the new v_products_sort_order field.

NOTE: if anyone else is looking to add a new field to their easypopulate... you can simply download this file, and do a "Find and Replace" like so:

Find "products_sort_order" and replace with "YOUR_NEW_FIELD" (without the v_)

This file is for EasyPopulate v1.2.5.4 only!

Thanks, Jackie, installed your easypopulate.php file, noted where you placed the additional v_products_sort_order column, but I still get the dreaded error:
MySQL error 1136: Column count doesn't match value count at row 1

Maybe my problem is simply not having the EXACT correct number of spreadsheet columns matching up with the .php file . . . I've looked at your .php file and see where you added the v_products_sort_order, and inserted it right after v_products_price in my spreadsheet. Beyond that, I'm not sure if I have the rest of the columns in the proper order.
Could you possibly upload a sample spreadsheet with the correct column configuration that works with your .php file? Or just a list of the correct columns in the correct order? That would rule out any spreadsheet layout error on my part.

Thank you so much for all the time you're putting in to help . . .
Jay

29 Jan 2010, 4:33 PM
#139
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

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

Now that the easypopulate.php is edited, go back to easy populate in the zen admin and download a new spreadsheet.

Anything that was able to export out of there, should import into it just fine.

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

29 Jan 2010, 5:51 PM
#140
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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

Hmmmm... I find the problem currently experienced by Jaybird interesting...

My original zip of easypopulate.php is being used on several stores with standard installs of both ZC and EP 1.2.5.4 - and its use does not throw up the error described...

I'll have another careful look to see if I overlooked something, but this was a straight-forward ZIP of a file that is being used successfully...

Hmmm... interesting... If I see the blindly obvious, I'll come back here...

20 years a Zencart User