Jump to content
VJ

Easy Populate & Products Attributes

Recommended Posts

you are most likely using php version 5, verify by going to the store admin, tools, server info.

if so, there is a fix here in the thread for that.

 

I just installed the Easy Populate 2.76d-MS2 (with attributes) application, downloaded a complete .txt of all files, deleted the files from the store in admin, then uploaded the .txt file and only ONE PRODUCT was uploaded.

 

Has anyone else had this issue?

 

apparently, everything is in place... but the script just doesn't jump to the next product.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
you are most likely using php version 5, verify by going to the store admin, tools, server info.

if so, there is a fix here in the thread for that.

 

you're the man... i've spent the last 5 hours trying to figure that one out!

 

thank you!!!

 

for anyone else that has the error of only seeing one product uploaded, open your easypopulate.php script and replace this:

 

array_walk($readed, 'walk');

 

with this:

 

foreach ($readed as $readed_record) {

walk($readed_record);

}

Edited by ecreative

Share this post


Link to post
Share on other sites
sounds like you do not have your temp dir set to 777 properties and or the proper path setup for your temp dir via your configure.php file and your easypopulate.php file.

 

What should I be looking for in configure.php? Temp file is set to 777 already and easypop has the full home/etc path for temp1 and temp2


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites
You need to upload the two files: easypopulate.php & easypopulate_functions.php in place of the ones you already have setup, then upload the table_block.php class file (patched for a known bug). Then enable the "excel safe output" in the options at the top of easypopulate.php.

 

When I do the above (I have excel safe output as true), create a file to download, edit the file (keep same headings), upload and import file, I get the following error message:

Filename: test3.csv

##Can not open CSV file for reading. Script will terminate.

I then ftp the file into my temp folder (both folder and file are 777), I still get the error message.

 

When I have the excel at false, I get the following

File uploaded.

Temporary filename: /tmp/php81Bdn3

User filename: test3.txt

Size: 7127

 

However, the data is not imported.

 

Any suggestions?

Share this post


Link to post
Share on other sites

full home path is wrong, should be /catalog/temp/ or whatever you have your store named, if in the $DOCUMENT_ROOT then /temp/ works.

 

What should I be looking for in configure.php? Temp file is set to 777 already and easypop has the full home/etc path for temp1 and temp2

John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

file needs to be saved in tab delimited format. check your easypopulate.php file and make sure it is \t and then with excel do file save as and choose text file.

 

When I do the above (I have excel safe output as true), create a file to download, edit the file (keep same headings), upload and import file, I get the following error message:

Filename: test3.csv

##Can not open CSV file for reading. Script will terminate.

I then ftp the file into my temp folder (both folder and file are 777), I still get the error message.

 

When I have the excel at false, I get the following

File uploaded.

Temporary filename: /tmp/php81Bdn3

User filename: test3.txt

Size: 7127

 

However, the data is not imported.

 

Any suggestions?


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

Hi there

 

i'm considering installing easy populate. I have added one field that does not feature in OSC standard. Which version should I install as I see many many versions.

 

Anyones advice would be apprecaited.

 

Thanks

Share this post


Link to post
Share on other sites
When I do the above (I have excel safe output as true), create a file to download, edit the file (keep same headings), upload and import file, I get the following error message:

 

file needs to be saved in tab delimited format. check your easypopulate.php file and make sure it is \t and then with excel do file save as and choose text file.

 

Here is the error I get doing the above:

Filename: text4.txt

##Can not open CSV file for reading. Script will terminate.

 

It is not making sense. Here is the step by step process I am taking.

 

Option One:

In easypopulate.php I have the folloiwng:

$tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/";

$separator = "\t"; // tab is default

$excel_safe_output = true; // default is: false

 

Here are the steps I take:

1. 'Create and then download files'-Download complete .csv file

2. Edit the file so there is only one product with a unique products_model.

3. Save the file as tab delimited file (text4.txt)

4. I get the error message

##Can not open CSV file for reading. Script will terminate.

 

Why is it saying Can not open CSV file when it is obvious by the extension it is not a CSV file?

 

 

Option Two:

In easypopulate.php I have the folloiwng:

$tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/";

//$separator = ","; // comma

$excel_safe_output = true; // default is: false

 

Here are the steps I take:

1. 'Create and then download files'-Download complete .csv file

2. Edit the file so there is only one product with a unique products_model.

3. Save the file as comma delimited file (text4.csv)

4. I get the error message

##Can not open CSV file for reading. Script will terminate.

 

 

Option Three:

In easypopulate.php I have the folloiwng:

$tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/";

$separator = "\t"; // tab is default

$excel_safe_output = false; // default is: false

 

Here are the steps I take:

1. 'Create and then download files'-Download complete .csv file

2. Edit the file so there is only one product with a unique products_model.

3. Save the file as comma delimited file (text4.csv)

4. I get the following message:

File uploaded.

Temporary filename: /tmp/phpDKw5dM

User filename: test6.txt

Size: 4914

BUT no product was added.

 

Option four:

I have done all of the above but instead put the created text file in the temp directory and done an 'Import" and still not work.

 

I am at a loss of what else to try.

Share this post


Link to post
Share on other sites

what version of EP? try it without the document root setting

 

Here is the error I get doing the above:

Filename: text4.txt

##Can not open CSV file for reading. Script will terminate.

 

It is not making sense. Here is the step by step process I am taking.

 

Option One:

In easypopulate.php I have the folloiwng:

$tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/";

$separator = "\t"; // tab is default

$excel_safe_output = true; // default is: false

 

Here are the steps I take:

1. 'Create and then download files'-Download complete .csv file

2. Edit the file so there is only one product with a unique products_model.

3. Save the file as tab delimited file (text4.txt)

4. I get the error message

##Can not open CSV file for reading. Script will terminate.

 

Why is it saying Can not open CSV file when it is obvious by the extension it is not a CSV file?

Option Two:

In easypopulate.php I have the folloiwng:

$tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/";

//$separator = ","; // comma

$excel_safe_output = true; // default is: false

 

Here are the steps I take:

1. 'Create and then download files'-Download complete .csv file

2. Edit the file so there is only one product with a unique products_model.

3. Save the file as comma delimited file (text4.csv)

4. I get the error message

##Can not open CSV file for reading. Script will terminate.

Option Three:

In easypopulate.php I have the folloiwng:

$tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/";

$separator = "\t"; // tab is default

$excel_safe_output = false; // default is: false

 

Here are the steps I take:

1. 'Create and then download files'-Download complete .csv file

2. Edit the file so there is only one product with a unique products_model.

3. Save the file as comma delimited file (text4.csv)

4. I get the following message:

File uploaded.

Temporary filename: /tmp/phpDKw5dM

User filename: test6.txt

Size: 4914

BUT no product was added.

 

Option four:

I have done all of the above but instead put the created text file in the temp directory and done an 'Import" and still not work.

 

I am at a loss of what else to try.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
I installed EP 2.76d on a install that has the Imagemagic 151 and more pics 6 v1.2c. If I use the Export EP or Froogle Products File or create and download file everything works fine. But after adding additional products to the excel sheet and try to upload, it appears to upload, the screen flashes and returns but with no confirmation, and when I check the database nothing has been uploaded, nor do I get any error messages. I don't know if this will help but here is what I get if I try to create a file in the temp directory

Here is the url for the temp dir http://store.fhceramics.com//catalog/temp

 

I don't know that much about php so any help would be greatly appreciated.. Thanks in advance.

--------------------

 

Your help and suggestions are greatly appreciated.

Thanks

Wayne

 

Actually, you have two problems.

 

Not only do you have a // between your store name and the catalog directory, you have two "catalog"s in the path.

 

The // is probably because you have a trailing / on the http//store.thceramics.com in both your configure.php files (store/catalog/includes/configure.php and store/catalog/admin/includes/configure.php). Neither of the server names or cookie domains (assuming you have a SSL certificate) should have a trailing /

 

The second problem can be taken care of by going to to easypopulate.php file (store/catalog/admin) and near the top of the file, where it defines your two temp directories, remove /catalog from each so you are left with /temp/

 

This should fix it


No Good Deed EVER Goes Unpunished

Share this post


Link to post
Share on other sites
what version of EP? try it without the document root setting

 

I am using the latest version

// Current EP Version

$curver = '2.76d-MS2';

 

I must change the document root setting because OSC is at the root of my server.

 

However, I just thought of something that may be the issue. My database has a prefix. Does the script take into account a prefix? In other words my database iname s database-osc not, database.

Share this post


Link to post
Share on other sites

Druid,

 

Have u enabled display all errors ion php.ini so that you can see if there is a php error that is terminating your scripts?

 

Hal

 

Actually, you have two problems.

 

Not only do you have a // between your store name and the catalog directory, you have two "catalog"s in the path.

 

The // is probably because you have a trailing / on the http//store.thceramics.com in both your configure.php files (store/catalog/includes/configure.php and store/catalog/admin/includes/configure.php). Neither of the server names or cookie domains (assuming you have a SSL certificate) should have a trailing /

 

The second problem can be taken care of by going to to easypopulate.php file (store/catalog/admin) and near the top of the file, where it defines your two temp directories, remove /catalog from each so you are left with /temp/

 

This should fix it

Share this post


Link to post
Share on other sites

I am using the latest version

// Current EP Version

$curver = '2.76d-MS2';

 

Has anyone found any contrib that actually works to import products. I have spent hours working on this problem, reading tons of posts and it seems like there is very little success in importing products into OSC.

 

Listed below are errors I am getting when trying to use this contrib just to import one item:

 

(It appears that it is looking for the tmp, temp folder in the wrong path. I have tried various combinations. It should be straightforward. I have the store installed at the root.

 

line 37: PHP Warning: file(/temp/text7.txt) [function.file]: failed to open stream: Operation not permitted in /var/www/public_html/domain/html/admin/easypopulate.php on line 805, referer: https://www.domain.com/admin/easypopulate.php

line 38: PHP Warning: Invalid argument supplied for foreach() in /var/www/public_html/domain/html/admin/easypopulate.php on line 844, referer: https://www.domain.com/admin/easypopulate.php

line 39: PHP Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/temp/text7.txt) is not within the allowed path(s): (/tmp/:/tmp:/usr/:/var/www/public_html/domain/) in /var/www/public_html/domain/html/admin/easypopulate_functions.php on line 43, referer: https://www.domain.com/admin/easypopulate.php?split=0

line 40: PHP Warning: file() [function.file]: open_basedir restriction in effect. File(/temp/text7.txt) is not within the allowed path(s): (/tmp/:/tmp:/usr/:/var/www/public_html/domain/) in /var/www/public_html/domain/html/admin/easypopulate.php on line 805, referer: https://www.domain.com/admin/easypopulate.php?split=0

 

Here are the lines that come up wit errors.

 

// get the entire file into an array

$readed = file($tempdir . $usrfl_name);

}

if ($localfile){

// move the file to where we can work with it

$file = tep_get_uploaded_file('usrfl');

 

 

// do normal EP input

// now we string the entire thing together in case there were carriage returns in the data

$newreaded = "";

foreach ($readed as $read){

$newreaded .= $read;

}

Share this post


Link to post
Share on other sites
Actually, you have two problems.

 

Not only do you have a // between your store name and the catalog directory, you have two "catalog"s in the path.

 

The // is probably because you have a trailing / on the http//store.thceramics.com in both your configure.php files (store/catalog/includes/configure.php and store/catalog/admin/includes/configure.php). Neither of the server names or cookie domains (assuming you have a SSL certificate) should have a trailing /

 

The second problem can be taken care of by going to to easypopulate.php file (store/catalog/admin) and near the top of the file, where it defines your two temp directories, remove /catalog from each so you are left with /temp/

 

This should fix it

Hi, I got the temp directory fixed but still having the problem of EPEP_v2_76d_MS2 not uploading with no errors showing or confirmation and nothing showing up in the database. I re-installed oscommerce and did a new re-install of oscommerce and installed ep on it still with the same problem with uploading

Edited by FHCeramics

Your help and suggestions are greatly appreciated.

Thanks

Wayne

Share this post


Link to post
Share on other sites
full home path is wrong, should be /catalog/temp/ or whatever you have your store named, if in the $DOCUMENT_ROOT then /temp/ works.

 

Thanks for your help Mibble. It seems to be working now.

 

I have another question though.

 

I'm using EP to update my slave products for the master products contribution. In my product description for the slaves I want to have something like this:

<a target="_blank" href="nov2005/Face1.jpg">Click to See Image</a>

where they click on the link and a pop up of an image appears.

 

but when I go to the listing the link I get is:

http://www.mpm.org.au/shop_dev/"nov2005/Face1.jpg"

 

I know that the http:// etc is appearing as it's the image path in the configure file - but how do I stop it from appearing and just get a normal html link appear.

 

Does this make sense?

Edited by mpm

For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

I just installed EP_v2_76d_MS2 and upgraded more pics to more_pics_6_v1.2c. When I try to "Download Complete tab-delimited .txt file to edit" I get:

 

1054 - Unknown column 'p.products_master' in 'field list'

 

SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_price as v_products_price, p.products_weight as v_products_weight, p.products_master as v_products_master, p.products_master_status as v_products_master_status, p.products_listing_status as v_products_listing_status, p.products_date_available as v_date_avail, p.products_date_added as v_date_added, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, subc.categories_id as v_categories_id, p.products_status as v_status FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND ptoc.categories_id = subc.categories_id

 

[TEP STOP]

 

 

Do I need to change something in easy populate or in more pics or both? It seems to be the extra image fields causing a problem because I can download the other files (except also "Download Froogle tab-delimited .txt file")

Share this post


Link to post
Share on other sites

I just tried easypopulate with a different store, on a different server, with a different path for the store.

 

In my error log there are two commands that are causing errors just like my other store.

 

Error on line 844

// now we string the entire thing together in case there were carriage returns in the data

$newreaded = "";

foreach ($readed as $read){

$newreaded .= $read;

}

Share this post


Link to post
Share on other sites

YOU NEED TO ADD THE FIELD PRODUCTS_MASTER TO EP

 

I just installed EP_v2_76d_MS2 and upgraded more pics to more_pics_6_v1.2c. When I try to "Download Complete tab-delimited .txt file to edit" I get:

 

1054 - Unknown column 'p.products_master' in 'field list'

 

SELECT p.products_id as v_products_id, p.products_model as v_products_model, p.products_image as v_products_image, p.products_price as v_products_price, p.products_weight as v_products_weight, p.products_master as v_products_master, p.products_master_status as v_products_master_status, p.products_listing_status as v_products_listing_status, p.products_date_available as v_date_avail, p.products_date_added as v_date_added, p.products_tax_class_id as v_tax_class_id, p.products_quantity as v_products_quantity, p.manufacturers_id as v_manufacturers_id, subc.categories_id as v_categories_id, p.products_status as v_status FROM products as p, categories as subc, products_to_categories as ptoc WHERE p.products_id = ptoc.products_id AND ptoc.categories_id = subc.categories_id

 

[TEP STOP]

Do I need to change something in easy populate or in more pics or both? It seems to be the extra image fields causing a problem because I can download the other files (except also "Download Froogle tab-delimited .txt file")


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
YOU NEED TO ADD THE FIELD PRODUCTS_MASTER TO EP

 

Pardon me for not understanding, but I looked at easypopulate.php and there is a v_products_master, and later on in the file for the sql section - p.products_master as v_products_master.

 

What exactly am I supposed to add and where?

Share this post


Link to post
Share on other sites

No, I'm using More Pics, Easy populate & Paypal Direct on an otherwise clean install of OSCommerce 2.2 MS2, PHP Version 4.4.4.

Share this post


Link to post
Share on other sites
Is there a way to modify easypopulate to work without master products?

Sorry for the above questions - I installed the wrong easypopulate.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×