Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate & Products Attributes


VJ

Recommended Posts

interesting. someone complained about not getting all languages with the categories.

 

I see, Ok let me share my experience, true is that the extraction from the database wont give you a table/column for (in my case) the second language.

 

However by entering the productname (table/column for productname and product description is included in the extracted .txt-file) the product is also registred for the second language. It might ofcourse have been more crystalclear if categories for extra languages were included.

 

The only thing I have encountered as a bit odd is that when I upload, Easypopulate in admin claims that there is no productmodel enetered and that the data is not imported, I have productmodel for every product and it is also imported to the database and each product.

 

Conclusion: for me it all works as intended and described.

 

Regards,

 

Hans

Link to comment
Share on other sites

Easy Populate 2.76d-MS2 - Default Language : English(1)

 

Hi,

 

I just installed this on an unmodified store. I exported, opened in Excel, saved, and uploaded and am receiving this error...

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's Products'' at line 8

SELECT cat.categories_id FROM categories as cat, categories_description as des WHERE cat.categories_id = des.categories_id AND des.language_id = 1 AND cat.parent_id = 0 AND des.categories_name = 'Adam's Products'

[TEP STOP]

 

I searched this error code and came across this fix...

My solution was to add :

if ($offset < 0)
{
$offset = 0;
}
Between:
$offset = ($max_rows_per_page * ($current_page_number - 1));
and:
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

in the file catalog/admin/includes/classes/split_page_results.php

Taken From http://www.oscommerce.com/forums/index.php?showtopic=124161&hl=

 

However, this did not work for me.

 

Can anyone offer a suggestion on what I may try to correct this?

 

Thanks for any tips:)

 

Adam

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Easy Populate 2.76d-MS2 - Default Language : English(1)

 

Hi,

 

I just installed this on an unmodified store. I exported, opened in Excel, saved, and uploaded and am receiving this error...

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's Products'' at line 8

SELECT cat.categories_id FROM categories as cat, categories_description as des WHERE cat.categories_id = des.categories_id AND des.language_id = 1 AND cat.parent_id = 0 AND des.categories_name = 'Adam's Products'

[TEP STOP]

 

I searched this error code and came across this fix...

My solution was to add :

if ($offset < 0)
{
$offset = 0;
}
Between:
$offset = ($max_rows_per_page * ($current_page_number - 1));
and:
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

in the file catalog/admin/includes/classes/split_page_results.php

Taken From http://www.oscommerce.com/forums/index.php?showtopic=124161&hl=

 

However, this did not work for me.

 

Can anyone offer a suggestion on what I may try to correct this?

 

Thanks for any tips:)

 

Adam

 

Just remove your apostrophe from your category name.

Link to comment
Share on other sites

Easy Populate 2.76d-MS2 - Default Language : English(1)

 

Hi,

 

I just installed this on an unmodified store. I exported, opened in Excel, saved, and uploaded and am receiving this error...

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's Products'' at line 8

SELECT cat.categories_id FROM categories as cat, categories_description as des WHERE cat.categories_id = des.categories_id AND des.language_id = 1 AND cat.parent_id = 0 AND des.categories_name = 'Adam's Products'

[TEP STOP]

 

I searched this error code and came across this fix...

My solution was to add :

if ($offset < 0)
{
$offset = 0;
}
Between:
$offset = ($max_rows_per_page * ($current_page_number - 1));
and:
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

in the file catalog/admin/includes/classes/split_page_results.php

Taken From http://www.oscommerce.com/forums/index.php?showtopic=124161&hl=

 

However, this did not work for me.

 

Can anyone offer a suggestion on what I may try to correct this?

 

Thanks for any tips:)

 

Adam

did you try using the Excel Safe Output option in the settings? (forces quoted-comma delineated fields instead of the default tab delineated)

Link to comment
Share on other sites

oh how so very rude of me, you're looking for the array_walk problem with php 5. :'(

 

Thank you so much! I replaced the code as described and POOF! It was like magic only faster... :D

Edited by web2tech
Link to comment
Share on other sites

oh how so very rude of me, you're looking for the array_walk problem with php 5. :'(

 

Thank you so much! I replaced the code as described and POOF! It was like magic only faster... (so excited, I replied twice!) :D

Edited by web2tech
Link to comment
Share on other sites

Just remove your apostrophe from your category name.

 

@pixclinic...Thanks for the simple tip;) Removing the apostrophe made all the difference! It worked great!

 

@surfalot....Thanks to you for a great contrib!

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

I see, Ok let me share my experience, true is that the extraction from the database wont give you a table/column for (in my case) the second language.

 

However by entering the productname (table/column for productname and product description is included in the extracted .txt-file) the product is also registred for the second language. It might ofcourse have been more crystalclear if categories for extra languages were included.

 

The only thing I have encountered as a bit odd is that when I upload, Easypopulate in admin claims that there is no productmodel enetered and that the data is not imported, I have productmodel for every product and it is also imported to the database and each product.

 

Conclusion: for me it all works as intended and described.

 

Regards,

 

Hans

 

Hi Hans,

 

I too get the error after upload. "No products_model field in record. This line was not imported ". However, the new product shows in the store and everything else seems to be in order.

 

I have inserted a new product with a new model number.

 

Hmmm...

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Hi Hans,

 

I too get the error after upload. "No products_model field in record. This line was not imported ". However, the new product shows in the store and everything else seems to be in order.

 

I have inserted a new product with a new model number.

 

Hmmm...

 

That means Easypopulate has finished his job importing new products: when it reaches a line with no model number, it tells him to stop. that's it, nothing wrong with that (except maybe the way it's presented and confuses the users who didn't read the manual ;)

Link to comment
Share on other sites

Hello,

 

I have installed EasyPopulate 2.76d-MS2 on OSC 2.2-MS2 and am having a small problem loading up new products.

 

I have several products listed under a category. When loaded, the first line is added as a new product within the category and all is good.

 

Subsequent lines merely update the first, instead of adding in as new products.

I have even taken the output of a a particular category from a good database and when imported into a fresh database, the same behavior occurs.Any pointers would be greatly appreciated.

 

Thanks for the contribution! If I can get it to work it will save huge amounts of time.

Link to comment
Share on other sites

That means Easypopulate has finished his job importing new products: when it reaches a line with no model number, it tells him to stop. that's it, nothing wrong with that (except maybe the way it's presented and confuses the users who didn't read the manual ;)

 

Thanks for the clarification pixclinic;)

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Hello,

 

I have installed EasyPopulate 2.76d-MS2 on OSC 2.2-MS2 and am having a small problem loading up new products.

 

I have several products listed under a category. When loaded, the first line is added as a new product within the category and all is good.

 

Subsequent lines merely update the first, instead of adding in as new products.

I have even taken the output of a a particular category from a good database and when imported into a fresh database, the same behavior occurs.Any pointers would be greatly appreciated.

 

Thanks for the contribution! If I can get it to work it will save huge amounts of time.

.... have you read the docs? must have an unique product model number for every product in the first column of the import file. both for the new products and the ones in your database.

Link to comment
Share on other sites

.... have you read the docs? must have an unique product model number for every product in the first column of the import file. both for the new products and the ones in your database.

 

That would make sense.....

I did go through the docs yes, but do not recall seeing this. Must have overlooked it. Thank you for the information.

Link to comment
Share on other sites

HELLO...

I am trying Easy Populate for the first time...

The Download went like a piece of cake..not even one small glitch.

After (trying) to follow all the instructions and saving a Text (Tab Deliminated) file, these are the errors I am getting when trying to import. I have set for excel safe etc and change Document_Root to $Document_Root THEN back as it did no good...

This is a STOCK install of oscommerce-2.2ms2-060817 and easy populate : EP_v2_76d_MS2 I am sure I am not doing something right but thought I would ask for some help before I beat myself to a bloody mess.... I have replaced my actual URL with x's but have NOT changed the number of characters or slashes or anything pertaining to the actual layout... Suggestions and places to look or questions to be answered would really be appreciated... I am set up and ready to import a nice 200-250 item test inventory... oh and I did autopopulate the first field..

 

MANY THANKS !

 

SteveRF..

 

Here are the errors:

 

Warning: move_uploaded_file(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog/admin/easypopulate_functions.php on line 43

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php2YYwUK' to '/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt' in /xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog/admin/easypopulate_functions.php on line 43

 

 

File uploaded.

Temporary filename: /tmp/php2YYwUK

User filename: EP2007Feb07-1111.txt

Size: 9656

 

Warning: file(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.file]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog/admin/easypopulate.php on line 805

 

Warning: fopen(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.fopen]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/htdocs/SRF_TEST/catalog/admin/easypopulate.php on line 831

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

Link to comment
Share on other sites

Warning: file(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.file]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog/admin/easypopulate.php on line 805

 

Warning: fopen(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.fopen]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/htdocs/SRF_TEST/catalog/admin/easypopulate.php on line 831

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

 

check that:

 

1) your temp/ folder exists

2) it is CHMODED to 777

Link to comment
Share on other sites

Pixclinic,

I also noticed this:

See /catalog//catalog/temp ?? It looks like it is picking up a second catalog folder.. structure is: mydomain/catalog etc... there is no second catalog folder..hummmmm

 

Warning: file(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.file]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog/admin/easypopulate.php on line 805

 

steveRF

Link to comment
Share on other sites

Pixclinic,

I also noticed this:

See /catalog//catalog/temp ?? It looks like it is picking up a second catalog folder.. structure is: mydomain/catalog etc... there is no second catalog folder..hummmmm

 

Warning: file(/xxxxxx/xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog//catalog/temp/EP2007Feb07-1111.txt) [function.file]: failed to open stream: No such file or directory in /xxxxxxxxx/xx/xxxxxxxxxx/xxxxxx/xxxxxxxx/catalog/admin/easypopulate.php on line 805

 

steveRF

 

then your configure.php file in admin>includes is not configured correctly

Link to comment
Share on other sites

Concering the configure.php under admin...

Everything in the store works as expected... The only change I noted that shoud be made prior to running easy populate was to change DOCUMENT_ROOT to $DOCUMENT_ROOT

I did this but may have done it incorrectly... I will get a pice of the code and paste it here...

 

ORIGINAL CODE:

define('DIR_FS_DOCUMENT_ROOT', '/xxxxxx/homepages/12/xxxxxxxxxx/htdocs/SRF_TEST/catalog/'); // where the pages are located on the server

 

Changed To:

define('DIR_FS_DOCUMENT_ROOT', '$DOCUMENT_ROOT'); // where the pages are located on the server

 

Maybe I did not do this correctly ?

My understanding is probably a HUGE issue... for which I thank u for your patience.

 

SteveRF

Link to comment
Share on other sites

Concering the configure.php under admin...

Everything in the store works as expected... The only change I noted that shoud be made prior to running easy populate was to change DOCUMENT_ROOT to $DOCUMENT_ROOT

I did this but may have done it incorrectly... I will get a pice of the code and paste it here...

 

ORIGINAL CODE:

define('DIR_FS_DOCUMENT_ROOT', '/xxxxxx/homepages/12/xxxxxxxxxx/htdocs/SRF_TEST/catalog/'); // where the pages are located on the server

 

Changed To:

define('DIR_FS_DOCUMENT_ROOT', '$DOCUMENT_ROOT'); // where the pages are located on the server

 

Maybe I did not do this correctly ?

My understanding is probably a HUGE issue... for which I thank u for your patience.

 

SteveRF

 

a store can (almost) work with wrong paths settings

post your configure.php (without the database access variables), I'll let you know

Link to comment
Share on other sites

Hugh,

Here is a copy ... hope I have not blanked anything that is essential. Characters have been replaced with x's and I have not added nor deleted any characters...

 

Steve

 

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

// define('DIR_FS_DOCUMENT_ROOT', '/xxxxxx/homepages/12/xxxxxxxxxx/htdocs/SRF_TEST/catalog/'); // where the pages are located on the server

 

define('HTTP_SERVER', 'http://www.xxxxxxxxxx.xxxxxxxxxx.xx'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.xxxxxxxxxx.xxxxxxxxxx.xx');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where the pages are located on the server

define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/xxxxxx/homepages/12/xxxxxxxxxx/htdocs/SRF_TEST/catalog/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_FS_CATALOG', '/xxxxxx/homepages/12/xxxxxxxxxx/htdocs/SRF_TEST/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'xxxxx.xxxxxxx.net'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'dboxxxxxxxxx');

define('DB_SERVER_PASSWORD', 'xxxxxxxxx');

define('DB_DATABASE', 'xxxxxxxxxxx');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

Hugh,

The database download into a csv file was perfect.

I added ONE item and autopopulated the first field (model number) with numbers 1-30

 

I really do appreciate your time... Thank You so very much !

 

SteveRF

Link to comment
Share on other sites

Hugh,

Something is working now....

I had an apostrophe in front of and behind $DOCUMENT_ROOT

I removed and while I am writing this there seems to be file upload progress but SLOW SLOW.... blank browser screena nd progress bar at bottom about 1/2 way across...

Seems I remember reading something about creating an INDEX for that Model Number in MySQL... speeding thisgs up... I only have about 30 items here now so am waiting to see if browser times out with an error or just fails again.... earlier, I was getting immediate errors..

SteveRF

Link to comment
Share on other sites

After sitting here for sometime now... looking at my browser sitting there with a progress bar about 50% done..I wonder if I should do a refresh on the browser or just ... sweat...

 

SteveRF

Link to comment
Share on other sites

After sitting here for sometime now... looking at my browser sitting there with a progress bar about 50% done..I wonder if I should do a refresh on the browser or just ... sweat...

 

SteveRF

 

I would pick "sweat" :D

30 products should take 1 second

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