Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy populate


bwprice100

Recommended Posts

Hi there

 

I am new to the forum and am currently evaluating ?osCommerce? for my web site. I am now trying to get to grips with the ?Easy Populate? and I am experiencing the same problems that lots of people seem to have already had but after exhaustive searching for solutions on th forum and trying all sorts of things I still cannot get it to upload.

 

Version info

oscommerce-2.2ms2-051113

Easy Populater 2.79a

 

I am able to download the file from the database but surprised to find it only contains the product information but is still useful. Is it supposed to download the complete database or only the product information?

 

I have changed line 38 to which gives me a csv text file

**********code start*******

global $separator;

if (EP_DELIMITER == '\t') {

$separator = "\t"; // oscommerce stores escaped delimeters in mySQL as a string and not an actual tab.

} else {

//$separator = EP_DELIMITER;

$separator = ",";

}

**********code end*******

 

I have created the directory catalog/temp and CHMOD 777 and check it is so but when I try to upload the same file I downloaded, which I have converted to a tab delimited file and made sure the EOREOR are present, I get the following error messages.

 

*********start of error message****

Warning: move_uploaded_file(/home/bwprice100/public_html/catalog/EP_TEMP_DIR/test.txt): failed to open stream: No such file or directory in /home/bwprice100/public_html/catalog/admin/includes/functions/easypopulate_functions.php on line 32 Warning: move_uploaded_file(): Unable to move '/tmp/phpvn8wHy' to '/home/bwprice100/public_html/catalog/EP_TEMP_DIR/test.txt' in /home/bwprice100/public_html/catalog/admin/includes/functions/easypopulate_functions.php on line 32

File uploaded.

Temporary filename: /tmp/phpvn8wHy

User filename: test.txt

SIZE_EP17938

Warning: file(/home/bwprice100/public_html/catalog/EP_TEMP_DIRtest.txt): failed to open stream: No such file or directory in /home/bwprice100/public_html/catalog/admin/easypopulate.php on line 621 Warning: Invalid argument supplied for foreach() in /home/bwprice100/public_html/catalog/admin/easypopulate.php on line 643

*******end of error message******

 

I can see from the error message that it seems to be looking for a director ?EP_TEMP_DIR? and not a directory called ?temp?. I have tried various things but if I change all text in ?easypopulate.php? from ?EP_TEMP_DIR? to temp and the one on line 621 to ?temp/? all the errors disappear but the file still does not upload.

 

I have read all the documentation I can find until my head is spinning, so any help would be very much appreciated.

 

Brian

Link to comment
Share on other sites

Hi there

 

I am new to the forum and am currently evaluating ?osCommerce? for my web site. I am now trying to get to grips with the ?Easy Populate? and I am experiencing the same problems that lots of people seem to have already had but after exhaustive searching for solutions on th forum and trying all sorts of things I still cannot get it to upload.

 

Version info

oscommerce-2.2ms2-051113

Easy Populater 2.79a

 

I am able to download the file from the database but surprised to find it only contains the product information but is still useful. Is it supposed to download the complete database or only the product information?

 

I have changed line 38 to which gives me a csv text file

**********code start*******

global $separator;

if (EP_DELIMITER == '\t') {

$separator = "\t"; // oscommerce stores escaped delimeters in mySQL as a string and not an actual tab.

} else {

//$separator = EP_DELIMITER;

$separator = ",";

}

**********code end*******

 

I have created the directory catalog/temp and CHMOD 777 and check it is so but when I try to upload the same file I downloaded, which I have converted to a tab delimited file and made sure the EOREOR are present, I get the following error messages.

 

*********start of error message****

Warning: move_uploaded_file(/home/bwprice100/public_html/catalog/EP_TEMP_DIR/test.txt): failed to open stream: No such file or directory in /home/bwprice100/public_html/catalog/admin/includes/functions/easypopulate_functions.php on line 32 Warning: move_uploaded_file(): Unable to move '/tmp/phpvn8wHy' to '/home/bwprice100/public_html/catalog/EP_TEMP_DIR/test.txt' in /home/bwprice100/public_html/catalog/admin/includes/functions/easypopulate_functions.php on line 32

File uploaded.

Temporary filename: /tmp/phpvn8wHy

User filename: test.txt

SIZE_EP17938

Warning: file(/home/bwprice100/public_html/catalog/EP_TEMP_DIRtest.txt): failed to open stream: No such file or directory in /home/bwprice100/public_html/catalog/admin/easypopulate.php on line 621 Warning: Invalid argument supplied for foreach() in /home/bwprice100/public_html/catalog/admin/easypopulate.php on line 643

*******end of error message******

 

I can see from the error message that it seems to be looking for a director ?EP_TEMP_DIR? and not a directory called ?temp?. I have tried various things but if I change all text in ?easypopulate.php? from ?EP_TEMP_DIR? to temp and the one on line 621 to ?temp/? all the errors disappear but the file still does not upload.

 

I have read all the documentation I can find until my head is spinning, so any help would be very much appreciated.

 

Brian

 

I strongly recommand you read the 1readmefirst file in the download package. There are more steps you need to do.

Link to comment
Share on other sites

Hi Jack

 

Please see following comments, surprising what a day away from the problem can help

UPDATED FEB 28, 2006

by Ryan Hobbs (hobbzilla)

 

UPDATED DECEMBER 27, 2005

by Deborah Carney, based on many frequent q/a from the forums.

Includes patch by Ian Corner, w3it.com for SQL UPDATE not functioning correctly 2003-08-10

 

These instructions are also in the Easy Populate manual, but people tend to not open that apparently :) There is more extensive documentation available in the manual, included in a variety of formats. Please read them!

 

IMPORTANT NOTES:

EasyPopulate requires the use of the product_model field (model number). This is the FIRST column. IT WON'T WORK without the model number. It will create duplicate products if you do not use the model number. The model numbers you assign must be unique, i.e. you can't give all your products a product_model of "test". HINT: In your spreadsheet program, put a number in the first cell and autofill the column.

Checked this OK

 

Each row MUST end with EOREOR, see the example.txt file. If the row doesn't end in EOREOR you will have one product and only one. HINT: After you add all your products, copy and autofill the last column.

Checked this OK

 

Each EP file must have the header row in place. If you upload a file without the headers, EP will throw out your first row of data.

Checked this OK

 

HINT: After you install make sure you have at least on test product in your catalog and download the ep file to edit.

Done and checked this OK

 

Installation and Configuration Instructions

 

1. The files in the EasyPopulate contribution are:

/catalog/admin/easypopulate.php - the code

/catalog/admin/includes/functions/easypopulate_functions.php - some functions that Pre-Nov-01-2002 2.2 OSC snapshots will need

easypopulate_functions-oldersnaps.php - if you get failed functions and have a MS1 2.2 version that is pre-May 2003 or is the Loaded 5 from phesis.co.uk, then reanme this file to easypopulate_functions.php

license.txt - the GPL license text that EasyPopulate (EP) is released under.

readmeFIRTS.txt - you are reading this now :)

and the instruction manual in various formats.

Done and checked this OK no renaming required

 

2. Copy file easypopulate.php and easypopulate_functions into admin/ and admin/includes/functions, respectively.

Done and checked this OK

 

3. For adding link to the Admin, edit file admin/includes/boxes/catalog.php by adding this line:

 

// Easy populate

'<a href="' . tep_href_link(FILENAME_IMP_EXP_CATALOG, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_IMP_EXP . '</a><br>' .

// END Easy populate

 

After:

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '"

class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES .

'</a><br>' .

Done and checked this but the above is incorrect and differs from what is said in EasyPopulate_Manual.txt which is also incorrect. I believe it should be

'<a href="' . tep_href_link(FILENAME_IMP_EXP_CATALOG, '', 'NONSSL') . '" class="menuBoxContentLink">Easy Populate</a><br>'.

 

5. Create a directory called catalog/temp, (see below if your catalog isn't in a 'catalog' directory) and that it's permissions are set to allow writes to that directory, that would be 777 or rwxrwxrwx (in shell access - while you're in the catalog directory, execute "chmod 777 temp").

Done and checked this

 

If you have changed the directory structure of your OSC install (i.e. you don't have /catalog/temp/ in your document root anymore), then you'll need to go into easypopulate.php and change the setting of "$tempdir". It is located right after the version history.

Directory structure not changed but there is no variable named $tempdir in the file easypopulate.php

 

6. Edit file \admin\modules\filenames.php and add in bottom before ?> :

 

// Easy polulate //

define('FILENAME_IMP_EXP_CATALOG', 'easypopulate.php');

// END

Done and checked this but the file filename.php is in the directory \admin\includes\ and there is no directory called \admin\modules\

 

7. Edit files \admin\includes\languages\english.php and \admin\includes\languages\italian.php and add in bottom before ?> :

 

// Easy polulate

define('BOX_CATALOG_IMP_EXP', 'Utility Import Export');

// END

Done and checked OK

 

8. Copy file \admin\includes\languages\italian\easypopulate.php and \admin\includes\languages\english\easypopulate.php

Done and checked OK

 

9. Run update.sql against your mysql database. Once the database is updated, you can set the configuration variables in the admin side under Configuration->Easy Populate. It is here where you adjust EP's operation for your store. I meant what I said, Please, Pretty please, do read the entire configuration stuff. Really. You'll be glad you did. You'll find all kinds of neat configurable stuff there. The instructions for using the various image mods and other supported contribtion variables are in there.

Done and checked OK but took some time to figure out how to do via PHPmyAdmin it but now able to configure via configure menu in osCommerce.

 

10. For M-S or when using Admin with Access levels, Don't forget to update admin/includes/functions/administrators.php

 

'easypopulate.php' => 'catalog.php', //rmh M-S_easypopulate

Not using Admin with Access levels so not done

 

Cheers Brian

Link to comment
Share on other sites

Brian,

 

I have installed EP as you explained, but when I do a (Complete) download there are no categories. Any idea what do I ned to fix?

 

Regards,

 

Graham

Link to comment
Share on other sites

Brian,

 

I have installed EP as you explained, but when I do a (Complete) download there are no categories. Any idea what do I need to fix?

 

Regards,

 

Graham

 

Hi Graham

 

Not sure exactly what you mean but I tested first with the default data that is put in when I installed osCommerce but when I went to upload my own product data I had first to create the categories via the osCommerce admin page, and then use those categories in my master tab delimited file created by easy populate

 

Easy populate, as far as I can tell, does not create the categories for you it will only map to the categories if they already exist and match what is in your tab delimited txt file; it will however download the category mapping data if it exists in the first place.

 

I hope this is of some help, if not feel free to ask. I am off now to try and sort out the VAT stuff.

 

Brian

Link to comment
Share on other sites

Brian,

 

When I use Download .txt file with TAB delimited to edit ( Complete ) to download a txt file off all the default contents, the file headers are:

 

v_products_model v_products_image v_products_name_1 v_products_description_1 v_products_url_1 v_products_head_title_tag_1 v_products_head_desc_tag_1 v_products_head_keywords_tag_1 v_products_price v_products_weight v_date_avail v_date_added v_products_quantity v_manufacturers_name v_tax_class_title v_status EOREOR

 

When I try to use Import catalog's file: I get this error message:

 

File uploaded.

Temporary filename: C:\Program Files\xampp\tmp\php736.tmp

User filename: EP_TEMP_DIREP2006Mar12-1212.txt

SIZE_EP19319

 

Warning: file(C:/Program Files/xampp/htdocs/catalog/EP_TEMP_DIREP_TEMP_DIREP2006Mar12-1212.txt) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\easypopulate.php on line 628

 

Warning: Invalid argument supplied for foreach() in C:\Program Files\xampp\htdocs\catalog\admin\easypopulate.php on line 650

 

Any ideas?

 

Regards,

 

Graham

Link to comment
Share on other sites

Brian,

 

I have installed EP as you explained, but when I do a (Complete) download there are no categories. Any idea what do I ned to fix?

 

Regards,

 

Graham

 

Do you get the catagorie headers but not any products you have entered? If you do a product attribute export does it include the products you entered?

 

That is what I'm running into right now. I get no products in the complete export, but I get them in the attribut export. This doesn't exactly help because you cannot enter all the info for each product into the attribut export.

 

Scott

Link to comment
Share on other sites

Brian,

 

When I use Download .txt file with TAB delimited to edit ( Complete ) to download a txt file off all the default contents, the file headers are:

 

v_products_model v_products_image v_products_name_1 v_products_description_1 v_products_url_1 v_products_head_title_tag_1 v_products_head_desc_tag_1 v_products_head_keywords_tag_1 v_products_price v_products_weight v_date_avail v_date_added v_products_quantity v_manufacturers_name v_tax_class_title v_status EOREOR

 

The headers look fine, I assume you are only using English i.e. no multi language descriptions but do you have data and if yes does it line up with the headers; you can check the alignment by importing into Excel

 

When I try to use Import catalog's file: I get this error message:

 

File uploaded.

Temporary filename: C:\Program Files\xampp\tmp\php736.tmp

User filename: EP_TEMP_DIREP2006Mar12-1212.txt

SIZE_EP19319

 

Warning: file(C:/Program Files/xampp/htdocs/catalog/EP_TEMP_DIREP_TEMP_DIREP2006Mar12-1212.txt) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\easypopulate.php on line 628

 

Warning: Invalid argument supplied for foreach() in C:\Program Files\xampp\htdocs\catalog\admin\easypopulate.php on line 650

 

I am not sure why the error code is showing a path to your C: drive.

 

Some pointers that may help you:

 

Have you altered the data in the database directly using PHP MyAdmin? It is very easy to break the database and data should only be changed via the osCommerce and Easy Populate admin pages. If you have, perhaps consider doing a reinstall of osCommerce and start with a clean slate.

 

Have you changed any of the code in the osCommerce or Easy Populate PHP files other than those mentioned in the installation notes? For example, see my first post on this topic; I changed the code for the delimiter in easypopulate.php line 38 don?t do this. The delimetor can be changed via the Easy Populate configuration menu under the configuration menu in osCommerce admin area but I would recommend staying with TAB as the delimetor because the data can contain elements that are the same as other delimiters and they will corrupt the data.

 

Have you done step 9 in the 1readmeFIRST.txt ? It is the only bit of direct manipulation of the database using PHP MyAdmin and was the main thing I had not done.

 

One final tip; if you write down the procedure you are going through, words and pictures, so that it can be understood by someone, else invariably you will find the problem.

Edited by bwprice100
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...