surfalot Posted June 4, 2009 Share Posted June 4, 2009 I am using Easy Populate 2.76h-MS2 (with attributes) surfalot 13 Feb 2009, works excellent out of the box with all functions.What I am trying to do is make a cron job that exports the products automatically at certain intervals to a tab-separated file. sounds to me like you need to brush up on your html forms. The custom export form uses the GET method which passes the parameters in the url. what you needed to do is dissect the form and build your url. this will produce a file in the temp folder will only the active products: easypopulate.php?download=tempfile&dltype=custom&epcust_status_filter=active Additional Options you would add, each separated with an ampersand: epcust_name=show epcust_description=show epcust_url=show epcust_image=show epcust_attributes=show epcust_category=show epcust_manufacturer=show epcust_price=show epcust_quantity=show epcust_weight=show epcust_tax_class=show epcust_avail=show epcust_date_added=show epcust_status=show if you need anything more (or less), you would have to hack the code. Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 4, 2009 Share Posted June 4, 2009 (edited) I almost got it now! For anyone looking for a partial solution: Find at line 1653: case 'full', and one some lines below comment out: $filelayout['v_products_url_'.$lang['id']] = $iii++; $filelayout['v_products_weight'] = $iii++; $filelayout['v_date_avail'] = $iii++; $filelayout['v_date_added'] = $iii++; $filelayout['v_categories_image_' . $i] = $iii++; $filelayout['v_manufacturers_name'] = $iii++; However, I am unsure how to only include the categories v_categories_name_1_1 and v_categories_name_2_1, and how to only include active products. Any solution? that's an overkill, see why you need to brush up on html forms? (not to mention a little patience) Edited June 4, 2009 by surfalot Quote Link to comment Share on other sites More sharing options...
JangoF Posted June 6, 2009 Share Posted June 6, 2009 that's an overkill, see why you need to brush up on html forms? (not to mention a little patience) Thanks for the help surfalot, I guess I was half-way sleeping! :blush: One more question: How can I export only products that have 2 or more quantity? Would this require some modification in the code? If so, where? Quote Link to comment Share on other sites More sharing options...
wizzard308 Posted June 8, 2009 Share Posted June 8, 2009 I have a major problem. Sorry if this has been answered elsewhere but I didnt find it. I am uploading a product feed. This feed takes one ceartain product and makes multiple categories for it. 1 product in each category. I noticed the database category description had a var char of like 32 I think (the feed was 36). I increased that to 40 and solved the problem of getting multiple cats. now I have a new problem. It says that there are 56 items in the category but when you go to the category it only shows one product. Any suggestions? Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 8, 2009 Share Posted June 8, 2009 Thanks for the help surfalot, I guess I was half-way sleeping! :blush: One more question: How can I export only products that have 2 or more quantity? Would this require some modification in the code? If so, where? you'll have to hack the code for that. look for "case 'category':" just ABOVE that is the SQL that need to be hacked. Change the WHERE clause to this WHERE p.products_id = ptoc.products_id AND p.products_quantity > 2 AND ptoc.categories_id = subc.categories_id Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 8, 2009 Share Posted June 8, 2009 now I have a new problem. It says that there are 56 items in the category but when you go to the category it only shows one product. sorry, that's not enough information. If you are using a version I uploaded, you'll find a section in the docs that describes how to ask for help. Most of the problems come from incorrectly formatted CSV file. Quote Link to comment Share on other sites More sharing options...
wizzard308 Posted June 8, 2009 Share Posted June 8, 2009 (edited) sorry, that's not enough information. If you are using a version I uploaded, you'll find a section in the docs that describes how to ask for help. Most of the problems come from incorrectly formatted CSV file. Well I dont know what else information to give you other than what its doing. I can give you an example of the feed Im using. Other than that Im not sure what to do. The feed is from an adult store so I dont wanna post it outright. I dont know if thats acceptable here or not. Edited June 8, 2009 by wizzard308 Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 8, 2009 Share Posted June 8, 2009 Well I dont know what else information to give you other than what its doing. I can give you an example of the feed Im using. Other than that Im not sure what to do. The feed is from an adult store so I dont wanna post it outright. I dont know if thats acceptable here or not. if you read the how to ask for help section of the docs, you would know what else to post. :rolleyes: you can pm me the link to the CSV. Quote Link to comment Share on other sites More sharing options...
wizzard308 Posted June 8, 2009 Share Posted June 8, 2009 Ok I think I fixed it. First off some of the problem was stupidity as I overlooked the fact that the other items were in a subcat. So I increased the subcat count to 10 instead of the default 7. That made my other products show up. So three problems down and back to testing. Quote Link to comment Share on other sites More sharing options...
dansino Posted June 9, 2009 Share Posted June 9, 2009 Hi, I downloaded the EP EP_v2_76h_MS2, working fine, but got one problem, which is product URL's get blanked out, Please see the pic of the csv file. How to resolve this problem? Thanks! :huh: Dansino Quote Link to comment Share on other sites More sharing options...
galey1981 Posted June 9, 2009 Share Posted June 9, 2009 I am building a shop for a client who uses easy populate to upload a csv to add products. They now want to put all the catalog on to a specials price so you see the cross out price on the product info page. But they have hundreds of products and are reluctant to add specials one by one to the admin area. I have googled this but i was wondering if it's possible to add the specials price to the main upload feed of easy populate, sat next the normal price column???? I know it's in a different table, but if the product_id can be linked to specials price and expiary date that would be amazing!! Quote Link to comment Share on other sites More sharing options...
JangoF Posted June 9, 2009 Share Posted June 9, 2009 I am building a shop for a client who uses easy populate to upload a csv to add products. They now want to put all the catalog on to a specials price so you see the cross out price on the product info page. But they have hundreds of products and are reluctant to add specials one by one to the admin area. I have googled this but i was wondering if it's possible to add the specials price to the main upload feed of easy populate, sat next the normal price column???? I know it's in a different table, but if the product_id can be linked to specials price and expiary date that would be amazing!! You could always use this excellent contribution: http://www.oscommerce.com/community/contributions,5273 Quote Link to comment Share on other sites More sharing options...
galey1981 Posted June 9, 2009 Share Posted June 9, 2009 You could always use this excellent contribution: http://www.oscommerce.com/community/contributions,5273 Sadly they want to exclusively use the feed and be done with it. I'll keep investigating. Thanks for the link though. Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 9, 2009 Share Posted June 9, 2009 I downloaded the EP EP_v2_76h_MS2, working fine, but got one problem, which is product URL's get blanked out,Please see the pic of the csv file. can't access that Quote Link to comment Share on other sites More sharing options...
aj23 Posted June 9, 2009 Share Posted June 9, 2009 Can anyone help me fix my problem? Here it is in the quote below which I posted in another thread, I ended up getting excel and it works now, but can anyone tell me why it isn't working? I tried one product as a test and it didn't go onto the site. BTW, how do I put images into easypopulate way of adding products? Here is the error. Warning: move_uploaded_file(/home/aj23/public_html/temp/EZ Populate Test.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/aj23/public_html/admin/easypopulate_functions.php on line 44 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpNkXd4B' to '/home/aj23/public_html/temp/EZ Populate Test.csv' in /home/aj23/public_html/admin/easypopulate_functions.php on line 44 File uploaded. Temporary filename: /tmp/phpNkXd4B User filename: EZ Populate Test.csv Size: 197426 Warning: file(/home/aj23/public_html/temp/EZ Populate Test.csv) [function.file]: failed to open stream: No such file or directory in /home/aj23/public_html/admin/easypopulate.php on line 1076 Warning: fopen(/home/aj23/public_html/temp/EZ Populate Test.csv) [function.fopen]: failed to open stream: No such file or directory in /home/aj23/public_html/admin/easypopulate.php on line 1101 ##Can not open file for reading. Script will terminate. Anyone know the problem? Quote Link to comment Share on other sites More sharing options...
FrostyFred Posted June 9, 2009 Share Posted June 9, 2009 sounds to me like you need to brush up on your html forms. The custom export form uses the GET method which passes the parameters in the url. what you needed to do is dissect the form and build your url. this will produce a file in the temp folder will only the active products: easypopulate.php?download=tempfile&dltype=custom&epcust_status_filter=active Additional Options you would add, each separated with an ampersand: epcust_name=show epcust_description=show epcust_url=show epcust_image=show epcust_attributes=show epcust_category=show epcust_manufacturer=show epcust_price=show epcust_quantity=show epcust_weight=show epcust_tax_class=show epcust_avail=show epcust_date_added=show epcust_status=show if you need anything more (or less), you would have to hack the code. Hi Is it possible to run a cron job to import a csv file from the temp directory on an rc2a instalation that has user name and password access protection but no .htaccess file? Thanks FF Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 9, 2009 Share Posted June 9, 2009 Can anyone help me fix my problem? Here it is in the quote below which I posted in another thread, what version are u using? Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 9, 2009 Share Posted June 9, 2009 Is it possible to run a cron job to import a csv file from the temp directory on an rc2a instalation that has user name and password access protection but no .htaccess file? that form uses a post method. It won't work that way unfortunately. Quote Link to comment Share on other sites More sharing options...
aj23 Posted June 10, 2009 Share Posted June 10, 2009 Hi Is it possible to run a cron job to import a csv file from the temp directory on an rc2a instalation that has user name and password access protection but no .htaccess file? Thanks FF I am using version 2.76h, with 2.2 rc2 Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 10, 2009 Share Posted June 10, 2009 I am using version 2.76h, with 2.2 rc2 you will find a section in the docs call how to ask for help. There you will find a link to this thread and all the information I would like to see before I can help. Quote Link to comment Share on other sites More sharing options...
aj23 Posted June 10, 2009 Share Posted June 10, 2009 you will find a section in the docs call how to ask for help. There you will find a link to this thread and all the information I would like to see before I can help. 1.EP vers: 2.76h-MS2 osCommerce Online Merchant v2.2 RC2a OS: Linux 2.6.28.9 HTTP: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 DB: MySQL 5.1.30 PHP: 5.2.9 (Zend: 2.2.0) Temp Directory: /home/aj23/public_html/temp/ Temp Dir is NOT Writable Magic Quotes is: off register_globals is: on Split files on: 300 records Model Num Size: 12 Price with tax: false Calc Precision: 2 Replace quotes: false Field seperator: comma Excel safe output: true Preserve tab/cr/lf: false Category depth: 7 Enable attributes: true SEF Froogle URLS: false More Pics: false Unknown Pics: false HTC: false SPPC: false Extra Fields: false 2. Windows vista Ultimate 64bit. Excel. 3. Warning: move_uploaded_file(/home/aj23/public_html/temp/EZ Populate Test.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/aj23/public_html/admin/easypopulate_functions.php on line 44 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpySTBn3' to '/home/aj23/public_html/temp/EZ Populate Test.csv' in /home/aj23/public_html/admin/easypopulate_functions.php on line 44 File uploaded. Temporary filename: /tmp/phpySTBn3 User filename: EZ Populate Test.csv Size: 197426 Warning: file(/home/aj23/public_html/temp/EZ Populate Test.csv) [function.file]: failed to open stream: No such file or directory in /home/aj23/public_html/admin/easypopulate.php on line 1076 Warning: fopen(/home/aj23/public_html/temp/EZ Populate Test.csv) [function.fopen]: failed to open stream: No such file or directory in /home/aj23/public_html/admin/easypopulate.php on line 1101 ##Can not open file for reading. Script will terminate. 4. I can provide a download link to the upload file if needed, but I'd prefer not to put it up on my site to be public. Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 10, 2009 Share Posted June 10, 2009 Temp Directory:/home/aj23/public_html/temp/ Temp Dir is NOT Writable All initial indications lead me to believe you have not performed all the installation steps listed in the docs. You should take another look at those installation steps. If there is a step there you don't understand please ask about that specific issue. Quote Link to comment Share on other sites More sharing options...
aj23 Posted June 10, 2009 Share Posted June 10, 2009 (edited) All initial indications lead me to believe you have not performed all the installation steps listed in the docs. You should take another look at those installation steps. If there is a step there you don't understand please ask about that specific issue. Oh, I got it working. I had catalog/temp set up with the right permissions (since that is what it said,) but it should just be temp. Anyways it works now. How can I add pictures through easy populate though? EDIT:Actually the product comes up, but none of the info I put in shows up on the product page. Actually I don't think I put the data in the right way. Is there a sample model I can look at to see how to put in all my data? Thanks Edited June 10, 2009 by aj23 Quote Link to comment Share on other sites More sharing options...
surfalot Posted June 10, 2009 Share Posted June 10, 2009 Oh, I got it working. I had catalog/temp set up with the right permissions (since that is what it said,) but it should just be temp. Anyways it works now. How can I add pictures through easy populate though? EDIT:Actually the product comes up, but none of the info I put in shows up on the product page. Actually I don't think I put the data in the right way. Is there a sample model I can look at to see how to put in all my data? Thanks Have you seen the example file included in the easy populate package? Or looked at the "How to use Easy Populate" section of the docs that walks you through creating your own sample file to reference? Or the "EasyPopulate File Format" and "Description of Column Headers" sections of the docs that describes the format of the file? the images go in the catalog/images/ folder the same as with the standard shop's product edit page. Quote Link to comment Share on other sites More sharing options...
JangoF Posted June 10, 2009 Share Posted June 10, 2009 you'll have to hack the code for that. look for "case 'category':"just ABOVE that is the SQL that need to be hacked. Change the WHERE clause to this WHERE p.products_id = ptoc.products_id AND p.products_quantity > 2 AND ptoc.categories_id = subc.categories_id Thanks again. I think I found another weird issue. When I try to export using the following url, it exports only inactive products. Any idea why? easypopulate.php?download=tempfile&dltype=custom&epcust_status_filter=active&epcust_name=show&epcust_description=show&epcust_image=show&epcust_category=show&epcust_price=show&epcust_quantity=show&epcust_status=show Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.