Jump to content
Sign in to follow this  
lessliquidation

[Contribution] Adding new fields to Easy Populate

Recommended Posts

I am trying to change the way that the retail price field is displayed in product_info.php to havethe retail price with a line through it. Ithink the html for this is simply '<s>' . however i am unable to place it in the right location. ANY HELP

 

Cheers

Share this post


Link to post
Share on other sites

GREAT!! This could be just what I need!

I have to modify it to instead of

Retail Price $2.00

Our Price $1.00

You Save 50%

It saiys something like

1-100 $1.00

101-200 $0.50

201+ $0.25

 

Has anyone done this that could share what they changed? I dont think I'm competent enough to change the code myself. Obviously the code itself doesnt matter...it's all about what the customer sees. I use volume discounts but I have it set up so that ordering may be done from the products listing. I dont want the customer to have to go into the product pages at all to see the volume discounts.

I was about to go in and add volume discounts BY HAND to a few hundred products but if I can do it with Easy Populate then I could save a TON of time!

Thanks!

Share this post


Link to post
Share on other sites

I added 6 new fields and everything worked great. After adding the 7th new field in the code, everything starting getting confusing and mixed up for EP. EP starting confusing the headers and put model numbers in prices and weights in decription and so on. Is there a limit to the amount of new fields added. Is the location of the new fields in the code relvent?

 

Also, has anybody hacked this contribution and made a User Interface out of it in the Admin section? That would top off EP and make it the best contribution out there. EP should definately be incorporated in the next osCommerce release.

Share this post


Link to post
Share on other sites

After adding 3 new fields in EP I just get the date time stamp in the fields. Anybody got any ideas why? Please help! :blink:

 

Thanks

Share this post


Link to post
Share on other sites
it is most likely how you set up your new fields, i have 25 new ones and have no problems.

 

 

Thanks for the reply,

I have posted the .php code that I changed at this address (the file is just too long to post in the forums) Im sure that it will work and the problem may be self induced but I have started over three times and still end up here. Im loosing my hair on this one. please take a look if you can and let me know if you need more info....http://www.gwdialup.com/filetest/easypopulate.html

easypopulate file

 

Thanks again

Share this post


Link to post
Share on other sites

Hello all

 

As every one know about EP does any one know how to get the BIMAGE column to come up.

 

I have been throught the manual. It just does not work. I get a parse error.

 

Jazz

 

Anyone please

Share this post


Link to post
Share on other sites

hi,

 

has anyone solved this problem yet? i've been searching the forums and many have addressed it, but there doesn't seem to be a solution posted for it...

 

i get the error message when i try to upload a new product through easy populate. i can update items successfully, but am having a hard time adding new ones. please help! this will save me a lot of time if i can get easy populate to work properly!

 

 

1136 - Column count doesn't match value count at row 1

INSERT INTO products ( products_artist, products_title, products_format, products_image, products_model, products_price, products_status, products_last_modified, products_date_added, products_date_available, products_tax_class_id, products_weight, products_quantity, manufacturers_id) VALUES ( 'no.gif', '304', '4', '1', CURRENT_TIMESTAMP, "2004-04-20 01:47:06", CURRENT_TIMESTAMP, '', '0.20', '1', 'SPLIT' 'Murdock / Yum Yum Tree' '4' '241')

[TEP STOP]

 

any help is appreciated!

Share this post


Link to post
Share on other sites

dinocore,

How big is your model number? if it is more than 12 chars. then you have to change the value in EP and in your SQLdatabase model field to match.

Greybeard

Edited by Greybeard

Share this post


Link to post
Share on other sites

greybeard,

 

my model number is anywhere from 1 to 4 charachters (i'm using the serial # filemaker creates automatically.. i have a little over 1000 items in my inventory that's why there's 4 charachters right now).

 

it seems like i can update my products through easy populate, but i can't create them. i don't know why this is. please help!

 

-dinocore

Share this post


Link to post
Share on other sites

Hi,

 

I'm using Easy Populate v2.73 with the master products update and I'm using the multi stores mod. I want to add the stores_id from table products_to_stores to the EP ouput file. I went through this contribution and got it to the point where it will export the store_id, but it doesn't export any products that don't have a store_id set yet. Here's the stuff I added maybe someone with more sql experience can help me.

 

line 1299 to 1325

// now do a query to get the record's current contents
$sql = "SELECT
                                //next line added
                               p2s.stores_id as v_stores_id,
 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_added as v_date_avail,
 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
 FROM
                               //next line added
                               ".TABLE_PRODUCTS_TO_STORES." as p2s,
 ".TABLE_PRODUCTS." as p,
 ".TABLE_CATEGORIES." as subc,
 ".TABLE_PRODUCTS_TO_CATEGORIES." as ptoc
 WHERE
 p.products_id = ptoc.products_id AND
                               //next line added
                               p.products_id = p2s.products_id AND
 p.products_model = '" . $items[$filelayout['v_products_model']] . "' AND
 ptoc.categories_id = subc.categories_id
 ";

 

line 1532 to 1534

if ($v_stores_id =''){
       $v_stores_id ="0";
   }

 

lines 1691 to 1697 right above the insert to products table

$query = "INSERT INTO ".TABLE_PRODUCTS_TO_STORES." (
                   products_id,
                   stores_id)
                       VALUES (
                            '$v_products_id',";
                   $query .="     '$v_stores_id')
                   ";

 

I've probably just missed something or my syntax is wrong. Please be kind :rolleyes:

 

Thanks for any help,

 

Tim

Share this post


Link to post
Share on other sites

dinocore, doesnt look like the product insert you are making matches the data you are inserting. the first one you have is product_artist and you have 'no.gif' for what is going in . . .


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

Would you happen to know how to rewrite it using those variables? What I want to do is insert the values products_id as v_products_id and stores_id as v_stores_id into the table products_to_stores.

 

This wouldn't explain why the script is only pulling the products with the stores_id value into the export. Seems like it's something in the database calls or my syntax in that area.

 

Sorry for my lack of SQL knowledge, but when I can get this website going hopefully I will have more time to learn SQL and PHP and contribute.

 

Thanks for your help. I'll look at but it's a lot of greek to me, although it makes more sense every day.

 

Tim

Share this post


Link to post
Share on other sites

Tim, prior to modifying EP, did you test a download? I would take a stock EP and try the download, see what you get.

 

Then, figure out what fields you want added, and start a few at a time.


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

Yes I did test it. I modified about half my titles and uploaded them back in worked fine and I can go back to a backup so its no problem. I'm just asking about sql syntax or if I'm missing anything to add this table call and insert statements.

 

Thanks for the help,

 

Tim

Edited by nyderrn

Share this post


Link to post
Share on other sites

Mibble/John,

 

Thanks for pointing this out...

 

dinocore, doesnt look like the product insert you are making matches the data you are inserting. the first one you have is product_artist and you have 'no.gif' for what is going in . . .

 

 

I've been looking at easypopulate.php and I think I may know where the problem is coming from (maybe) but I'm not sure how to fix it.. I think the code I need to change is around line 1676-1716.. I've been messing with it and now I get this when I try to insert a new product with easypopulate..

 

 

| 808 | no.gif | PORTER HAL | Ten Month | LP | Porter Hal | Condition: | 8 | 0.70 | 2004-04-27 | 2004-04-27 | 1 | 24/7 | Vinyl Reco | --none-- | Active !New Product!
1136 - Column count doesn't match value count at row 1

INSERT INTO products ( products_model, products_image, products_artist, products_title, products_format, products_price, products_weight, products_date_added, products_date_available, products_quantity, products_tax_class_id, products_status, manufacturers_id) VALUES ( '808', 'no.gif', 'PORTER HALL' 'Ten Month Soundtrack' 'LP' '8', '0.70', "2004-04-27 20:15:26", "2004-04-27 20:15:26", '1', '', '1', '78')

[TEP STOP]

 

Can you help me? I can attach my easypopulate.php file in a PM if you (or anyone else) are willing to help..

 

Thanks!

aasha

Share this post


Link to post
Share on other sites

you are getting the products_artist twice, which is throwing things off, after the lp. you are also putting a contition of the record/whatever into there and i dont see that in your sql statement. those two things will throw it all off


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites
Hello all

 

As every one know about EP does any one know how to get the BIMAGE column to come up.

 

I have been throught the manual. It just does not work. I get a parse error.

 

Jazz

 

Anyone please

I have this same problem, I want to use the bi_image contribution and would like to upload a large image with my thumbnail image but I always get this parse error when I uncomment the required areas of ep, I am no expert but it isnt that clear on the uncomment bit perhaps I am not uncommenting the right areas.

RTFM doesnt work here as the instructions assume you now how to do things, so muppet proof instructions would be for me and plz can someone run through it for me. :D


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Hi!

 

I was thinking (since it's been a couple months since I've addressed the 1136 error problem and still haven't been able to find a solution to it) that the instructions/contribution for adding new fields to easy populate should be updated.

 

Many people are having trouble adding new products to their oscommerce store and they're not being helped. I think an update to the contribution would help us all.

 

Thanks!

Share this post


Link to post
Share on other sites

same 1136 problem here... only added three fields, everything matched up in the right order, same amount of fields and values declared. I really do not want to have to add every item (over 700!) by hand!!!

 

From what I understand the problem occurs when the easypopulate.php tries to insert the records in the database, it just does not manage to match the amount of fields going in to the fields in the database itself.. Now I have a feeling it's because the fields are declared wrongly in the database, or something like, that prevents osCommerce from seeing the db properly, and thus makes it say that the counts do not match... But what do I know, i'm a PHP/MySQL n00b :P

 

So of anyyyyone has an inkling of an idea of what to do... please let me know!

Share this post


Link to post
Share on other sites

Well, managed to fix it by going back to EP version 2.62-MS2... I don't use attributes, and the rest of the updates are not too important, so it's ok. Works like a charm now!

 

But if someone could find a surefire way of working it with 2.74, I am sure it would be appreciated.

Share this post


Link to post
Share on other sites

Ok everything seems to work fine for adding fields for products, now what about for categories? anyone know the steps to add variable like categories_descriptions, categories_accessories, categories included features? anyone know how to do this so I can edit everything from my spreadsheet, I've re-written my catefories pages code to allow php so i can call up these variables... now I just need to know how to add them to EP..

 

Many thanks !

Share this post


Link to post
Share on other sites

Currently, i have a price list that has the color attributes written out wihtout the ! and 0's. Just the acual word. it there an alternative for easy populate to recognize teh color and add it as a attribute automatically without the old way of doing it. If you need for detailed info ask .

 

Thanks,

Danny

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
Sign in to follow this  

×