Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

easy populate


RobLum

Recommended Posts

I have been trying for days to get easy populate to upload from my text file. It uploads the categories, but doesnt upload the products. It also comes up ith the error:

 

Warning: Invalid argument supplied for foreach() in g:\websites\luminate\htdocs\catalog\admin\easypopulate.php on line 1744

 

I have tried creating sample products via admin, the downloading the files modifying and uploading, this DOES work. However, these dont have the fields i require.. so i have been trying to use only the fields i need (and the necessary fields) without success. Can anybody have a quick glance to see if they can spot an error?

 

v_products_model	v_products_name	v_products_description	v_products_price	v_products_quantity	v_categories_name_1	EOREOR
01	fish1	some fish	100	1	cat1	EOREOR
02	fish2	some fish	100	1	cat1	EOREOR
03	fish3	some fish	100	1	cat1	EOREOR

(these are tab delimited btw).

 

any help would be greatly appreciated

Rob

http://www.luminate.org.uk/

Link to comment
Share on other sites

 

v_products_model v_products_name v_products_description v_products_price v_products_quantity v_categories_name_1 EOREOR
01 fish1 some fish 100 1 cat1 EOREOR
02 fish2 some fish 100 1 cat1 EOREOR
03 fish3 some fish 100 1 cat1 EOREOR

 

First off, you have six columns(fields) defined, and seven columns of data. ("Some" and "fish" seem to be tab delimited- are they supposed to be in the same field?)

 

Are you adding fields that are not in your download file? If so, you need to access your database directly and modify the fields- you can't just change them in your text file and have them appear in your database. (My apologies if this is not the case...although I'm sure there are some out there who are trying to do this. B) )

 

Also, you can leave fields blank, but you can't delete the field in your text file and then upload, because the database still has the fields and your information no longer is going where it needs to be.

 

Hope this helps,

Shari

Link to comment
Share on other sites

Hi, thx for your reply..

 

Interesting. I had assumed (obviously wrongly) that the role of the headers (v_products_model etc) was to indicate which of the database fields were to be filled. I thought i would be able to choose fields from the "complete" set (so long as the products_model and eoreor were present) - since these fields are in my database.

 

So basically, I either have to have all the headers in place in the text file, or remove fields from my database? - if i were to do the latter, would there be modifications i would need to do in the php files? (forgive my ignorance :) )

 

the gap between some and fish wasnt tab delimited btw, just came out that way when i pasted it in :)..

 

thanks again

 

Rob

http://www.luminate.org.uk/

Link to comment
Share on other sites

So basically, I either have to have all the headers in place in the text file, or remove fields from my database? - if i were to do the latter, would there be modifications i would need to do in the php files? (forgive my ignorance  )

 

I'm not really sure of the answer- I haven't tried to delete any fields. I just leave them blank. (My first experience with databases was, ohhhh, 'bout two weeks ago. This is kind of the blind leading the blind, as it were.) :rolleyes:

 

There are several references to the field names in the php files. I would assume (perhaps wrongly) that you would have to change each of these if you were to add a new field or subtract the standard ones.

 

If you are adding different fields, how are you outputting that information?

 

the gap between some and fish wasnt tab delimited btw, just came out that way when i pasted it in ..

 

Ah, I figured as much...but then to overlook the obvious is sometimes a recipe for disaster!

 

 

Shari

Link to comment
Share on other sites

hi, found the error..

 

v_products_model v_products_name_1 v_products_description_1 v_products_price v_products_quantity v_categories_name_1 EOREOR
01 fish1 some fish 100 1 cat1 EOREOR
02 fish2 some fish 100 1 cat1 EOREOR
03 fish3 some fish 100 1 cat1 EOREOR

 

instead of

 

v_products_model v_products_name v_products_description v_products_price v_products_quantity v_categories_name_1 EOREOR
01 fish1 some fish 100 1 cat1 EOREOR
02 fish2 some fish 100 1 cat1 EOREOR
03 fish3 some fish 100 1 cat1 EOREOR

 

i.e. missed the _1 off name and description headers (how stupid do i feel now ;))

 

so one can just use the fields they wish to fill in..

 

thx for your efforts though.

Rob

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...