Jump to content
VJ

Easy Populate & Products Attributes

Recommended Posts

that was the latest update to the contrib: http://www.oscommerce.com/community/contributions,500

 

 

Nat:

 

I just installed OSC this AM..testing for a possible move from Zencart.

 

I have a bone stock database and install, and I thought I would try that ID hack.

 

The index hack went in fine, and I installed easypopulate3 without any issues..now I get this error when I try to download the stock products listings:

 

1146 - Table 'gemohler_osc.TABLE_PRODUCTS_STOCK' doesn't exist

 

select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '1' and products_stock_attributes = '3-5'

 

[TEP STOP]

 

I _really_ wanna see OSC work better than ZC, just gotta get EP to work fast(er) than it will otherwise..which can take me a day to upload things.

 

Thanks!

Share this post


Link to post
Share on other sites

Hi, sorry but can't really help you - it's not my hack I was just posting the location as someone asked. Perhaps try and PM the person who posted it, user 'UGLi'.

 

I haven't even tried it myself yet.

 

Good luck!

 

Nat:

 

I just installed OSC this AM..testing for a possible move from Zencart.

 

I have a bone stock database and install, and I thought I would try that ID hack.

 

The index hack went in fine, and I installed easypopulate3 without any issues..now I get this error when I try to download the stock products listings:

 

1146 - Table 'gemohler_osc.TABLE_PRODUCTS_STOCK' doesn't exist

 

select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '1' and products_stock_attributes = '3-5'

 

[TEP STOP]

 

I _really_ wanna see OSC work better than ZC, just gotta get EP to work fast(er) than it will otherwise..which can take me a day to upload things.

 

Thanks!

Edited by nat8100

Share this post


Link to post
Share on other sites
Hi, sorry but can't really help you - it's not my hack I was just posting the location as someone asked. Perhaps try and PM the person who posted it, user 'UGLi'.

 

I haven't even tried it myself yet.

 

Good luck!

 

ya..I did. Hes never posted as far as the system can tell, so we'll see.

Share this post


Link to post
Share on other sites
This fix is a smart move...an index, by definition, is unique...

 

Hugh, I'm glad you like my fix. I'm afraid I have to point out that while an index can be unique, that is only the case if you explicitly define it to be. An index can use the optional flags UNIQUE, FULLTEXT, or SPATIAL. The whole point of a MySQL index is to prevent a search from reading the entire row. It's like creating a compressed version of the table with only one column. Since the products table contains a lot of columns (and I've added a few on my custom install), I really don't see any down side to indexing the model column. The speed increase for Easy Populate should go up logarithmically for every column it doesn't have to read when searching to see if a product already exists.

 

Tim

Share this post


Link to post
Share on other sites

Tim:

 

Thanks for your timely first post. :)

 

As soon as I have a sane process to manage 10s of thousands of products in my database, I cant wait to use EP again.

Share this post


Link to post
Share on other sites
...I installed easypopulate3 without any issues..now I get this error when I try to download the stock products listings:

1146 - Table 'gemohler_osc.TABLE_PRODUCTS_STOCK' doesn't exist

 

Jeff, stock osCommerce doesn't have a "products_stock" table, and stock Easy Popluate doesn't look for that table either. If the code is looking for this table, something must have been modified. Are you running a Linux or Windows server? On Linux I would suggest running a 'grep -l -r "TABLE_PRODUCTS_STOCK" *' command to find out where that table is defined, and which pages are looking for it.

 

You also mentioned that you're running version 3 of Easy Populate, which has been "disowned" by the author himself. I would suggest using an older version (between 2.8 and 2.9) that stores the configuration variables in the database like most other user friendly contribs.

 

Tim

 

By the way, I have a HUGE inventory, and to import and update 100,000 products using a heavily modified Easy Populate (it updates a lot more columns in the database, automatically updates pricing according to a table defined through the admin section, updates inventory hourly and checks for new products weekly through cron), it only takes SIX MINUTES to update every field!

Share this post


Link to post
Share on other sites
Hugh, I'm glad you like my fix. I'm afraid I have to point out that while an index can be unique, that is only the case if you explicitly define it to be. An index can use the optional flags UNIQUE, FULLTEXT, or SPATIAL. The whole point of a MySQL index is to prevent a search from reading the entire row. It's like creating a compressed version of the table with only one column. Since the products table contains a lot of columns (and I've added a few on my custom install), I really don't see any down side to indexing the model column. The speed increase for Easy Populate should go up logarithmically for every column it doesn't have to read when searching to see if a product already exists.

 

Tim

 

Hi Tim

 

Thanks for the clarification:-) on this. I'm still wondering why EP does not run on product ID instead: it might help to handle the products extra fields pouplation in a separate upload. or maybe I'm missing something. My dream would have to get all the extra fields generated like the categories - even with a 6 or 8 limit -

Share this post


Link to post
Share on other sites

Try: Look for $products_attributes_stock = true; in your easypopulate.php file. Change 'true' to 'false.'

 

Nat:

 

I just installed OSC this AM..testing for a possible move from Zencart.

 

I have a bone stock database and install, and I thought I would try that ID hack.

 

The index hack went in fine, and I installed easypopulate3 without any issues..now I get this error when I try to download the stock products listings:

 

1146 - Table 'gemohler_osc.TABLE_PRODUCTS_STOCK' doesn't exist

 

select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '1' and products_stock_attributes = '3-5'

 

[TEP STOP]

 

I _really_ wanna see OSC work better than ZC, just gotta get EP to work fast(er) than it will otherwise..which can take me a day to upload things.

 

Thanks!

Share this post


Link to post
Share on other sites
Jeff, stock osCommerce doesn't have a "products_stock" table, and stock Easy Popluate doesn't look for that table either. If the code is looking for this table, something must have been modified. Are you running a Linux or Windows server? On Linux I would suggest running a 'grep -l -r "TABLE_PRODUCTS_STOCK" *' command to find out where that table is defined, and which pages are looking for it.

 

You also mentioned that you're running version 3 of Easy Populate, which has been "disowned" by the author himself. I would suggest using an older version (between 2.8 and 2.9) that stores the configuration variables in the database like most other user friendly contribs.

 

Tim

 

By the way, I have a HUGE inventory, and to import and update 100,000 products using a heavily modified Easy Populate (it updates a lot more columns in the database, automatically updates pricing according to a table defined through the admin section, updates inventory hourly and checks for new products weekly through cron), it only takes SIX MINUTES to update every field!

 

..and early in the evening on the third day, God created grep..

 

Results:

 

-jailshell-2.05b$ grep -l -r "TABLE_PRODUCTS_STOCK" *

EasyPopulate 3.00/catalog/admin/easypopulate.php

admin/easypopulate.php

 

 

Soooooo..offto install an earlier version, if adjusting the current one doesnt pan out.

 

thanks to ya both

Edited by gemohler

Share this post


Link to post
Share on other sites
You also mentioned that you're running version 3 of Easy Populate, which has been "disowned" by the author himself. I would suggest using an older version (between 2.8 and 2.9) that stores the configuration variables in the database like most other user friendly contribs.

 

Still having issues..Im seeing other issues in

 

I installed the what appears to be complete 2.9 version..and I get this when I try to make a file to download:

 

1054 - Unknown column 'p.products_price1_qty' 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_price1_qty as v_products_price1_qty, p.products_price1 as v_products_price1, p.products_price2_qty as v_products_price2_qty, p.products_price2 as v_products_price2, p.products_price3_qty as v_products_price3_qty, p.products_price3 as v_products_price3, p.products_price4_qty as v_products_price4_qty, p.products_price4 as v_products_price4, p.products_price5_qty as v_products_price5_qty, p.products_price5 as v_products_price5, p.products_price6_qty as v_products_price6_qty, p.products_price6 as v_products_price6, p.products_price7_qty as v_products_price7_qty, p.products_price7 as v_products_price7, p.products_price8_qty as v_products_price8_qty, p.products_price8 as v_products_price8, p.products_qty_blocks as v_products_qty_blocks, p.products_weight as v_products_weight, 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]

 

 

So..I have a busted EP in zencart, and in a stockish OSC.

 

I know..the common element is me, but I dont -mess- with databases..I just report errors FROM them.

Share this post


Link to post
Share on other sites

looks like you don;t have the MOD separate price per customer: you need to deactivate all its references in the code

Share this post


Link to post
Share on other sites
...I'm still wondering why EP does not run on product ID instead: it might help to handle the products extra fields pouplation in a separate upload. or maybe I'm missing something. My dream would have to get all the extra fields generated like the categories - even with a 6 or 8 limit -

 

The products_id is generated by MySQL as an auto-increment field. Its purpose is to tie multiple osCommerce tables together, but outside osCommerce is has no usefulness as there's no way to tie it to a product.

 

I looked at products extra fields, and while it does make adding more detailed product information nice and easy, it's fairly inefficient. I ended up just adding columns to the products table and everything works out much better. If you have a product detail you'd like to add with a small number of values that are common to many products, you could duplicate the functionality of the manufacturers and manufacturers_info tables.

 

Tim

Share this post


Link to post
Share on other sites

I There:

 

I have been using the complete file for Easypopulate successfully for about two weeks.

Only now I had the need to use the Product Attributes and I ran into a problem:

When I add a product option in the Product attributes I can still download the complete file but when I go one step further and add a product option value I can no longer download the complete file.

I get the following error:

 

 

1146 - Table 'loja_menasboutique_com.TABLE_PRODUCTS_STOCK' doesn't exist

 

select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '28' and products_stock_attributes = '1-1'

 

 

I guess I must uncomment something in the file but I can not find where. Please some one help.

Share this post


Link to post
Share on other sites

Hello,

 

 

It seems like the EP doesn't work (can't upload the data) with the PHP 5 version.

 

Can anyoane confirm this?

 

 

Thank you very much,

Clement

Share this post


Link to post
Share on other sites
I looked at products extra fields, and while it does make adding more detailed product information nice and easy, it's fairly inefficient. I ended up just adding columns to the products table and everything works out much better. If you have a product detail you'd like to add with a small number of values that are common to many products, you could duplicate the functionality of the manufacturers and manufacturers_info tables.

Tim

 

That's what I did first (add new fields to the product table) but when my need to add more fields as my business inventory diversified, I found the MOD that installs extra fields in a separate table much more elegant, until I found that EP doesn't directly take care of that, and that these fields are not duplicated when copying a product (I'm working on this)

Share this post


Link to post
Share on other sites

Hi mates,

I've searched in the forum but I did not find the answer. I'm running EP 2.79b MS2 and everything's fine except when I download an excel file to my computer, each

"

are replaced with

& # 3 4 (I have to put space between each characters else the code is interpreted!!

Have you a trick for me to correct it ?

The "Replace quotes" option in the admin is FALSE. If I put True, the result is the same.

 

Hopefully When I upload an ep file to the db the quotes are still corrects.

Any idea ?

thanks.

Seb

Edited by concorde44

Osc 2.2 MS2

Share this post


Link to post
Share on other sites

I'm not sure. Have you looked at the option in your easypopulate.php file?

 

// **** Quote -> Escape character conversion ****
// If you have extensive html in your descriptions and it's getting mangled on upload, turn this off
// set to 1 = replace quotes with escape characters
// set to 0 = no quote replacement
global $replace_quotes;
$replace_quotes = true;

 

You could try a different setting there.

 

 

Hi mates,

I've searched in the forum but I did not find the answer. I'm running EP 2.79b MS2 and everything's fine except when I download an excel file to my computer, each

"

are replaced with

& # 3 4 (I have to put space between each characters else the code is interpreted!!

Have you a trick for me to correct it ?

The "Replace quotes" option in the admin is FALSE. If I put True, the result is the same.

 

Hopefully When I upload an ep file to the db the quotes are still corrects.

Any idea ?

thanks.

Seb

Share this post


Link to post
Share on other sites

Hi all

 

I have just opened a new store using easy populate 2.9 and have managed to get products uploaded.....

 

However when i come to downloading in any setting eg. complete,froogle etc all i get is the heading line! Any ideas? pleases!!!!

Share this post


Link to post
Share on other sites

I There:

 

I have been using the complete file for Easypopulate successfully for about two weeks.

Only now I had the need to use the Product Attributes and I ran into a problem:

When I add a product option in the Product attributes I can still download the complete file but when I go one step further and add a product option value I can no longer download the complete file.

I get the following error:

 

 

1146 - Table 'loja_menasboutique_com.TABLE_PRODUCTS_STOCK' doesn't exist

 

select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '28' and products_stock_attributes = '1-1'

 

This only happens when I add a value to the product option. I have downloaded over 2000 products up to now but in oder to continue I have to delete the value.Once I do that It works again. Any ideas?????

Share this post


Link to post
Share on other sites

Hi is there anyway that I could change EP so that it could read the text file that I recieve, the text file contains data on stock availability, but it has different headings to that used in OSC.

 

here is an example of the text file:

 

**START

IB 0702026174

BI hardback

AU EVANS, WILLIAM CHARLES

BC MMG

CO UK

EI 15REV ED

IU 275ILLS

PD 20011213

NP 600

RP 62.99

RI 62.99

RE 62.99

DI 286 x 229

PU ELSEVIER HEALTH SCIENCES

YP 2001

RC Y

RS ACADEMIC/SPECIALIST

TI TREASE AND EVANS PHARMACOGNOSY

DE Serves as the encyclopaedic reference work on pharmacognosy, the study of those natural substances, principally plants, that find a use in medicine. This book balances between classical and modern aspects of this branch of science, and covers the importance of complementary medicines, including herbal, homeopathic and aromatherapy.

EA 9780702026171

RF R

WE 1780

SG 1

GC O00

**

IB 0862726921

BI paperback

AU BURTON, JOHN

BC PSVW7

CO UK

IL OLIVER, WILLIAM

IU ILLUSTRATIONS, COLOUR PHOTOS

PD 19911130

NP 192

RP 10.99

RI 10.99

RE 10.99

DI 225 x 123

PU KINGFISHER BOOKS LTD

YP 1991

RC G

RS GENERAL

SR FIELD GUIDES

TI FIELD GUIDE TO THE MAMMALS OF BRITAIN AND EUROPE

DE A guide to over 160 species of mammals from Britain and Europe. Concise descriptions summarize the key physical features, behaviour and range of each main animal, as well as distinguishing similar species. Also included is information on life cycles and conservation status.

EA 9780862726928

RF R

WE 378

SG 3

GC C05

**

 

As you can see it is set out differently from the normal EP file and it has different headings. Each book is seperated by the **

 

Any ideas ?

 

Iain

Share this post


Link to post
Share on other sites

Hi,

 

Is anyone usign QT Pro with EP? I know they are compatible (later verisons anyway).. I originally posted in the QT Pro forum but not having much luck with responses..

 

Just want to know how QT Pro works. Can you assign a unique model number to each product-attribute combination.. i.e. 'product A small' has model number 3984 and 'product A medium' has model number 02844.

I need to be able to assign these model numbers myself as my supplier assigns seperate model numbers in the same way.

 

Thanks,

Natalie

Share this post


Link to post
Share on other sites

I have a strange problem with importing some html codes in my product description with easypopulate latest version

 

All my " is converted to "
Which destroys the html layout. f.ex.  COLSPAN="2" to COLSPAN=Ŗ"

Any way to fix this?...

 

Please help I'm waiting to enter many product descriptions using easypopulate

 

Thanks alot friends

Edited by shaytaan

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

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

×