Guest Posted June 11, 2003 Share Posted June 11, 2003 Does anyone have a working copy of easypopulate.php that has been modified for the multiple image mod that I can take a gander at? I've uncomment what i believe are the right sections, but am getting a parse error on line 1188. Thanks, I'd like to compare the two. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 12, 2003 Share Posted June 12, 2003 Actually the parsing error is on line 1627: "Parse error: parse error in /home/smokeyci/smokeyci-www/adminx/easypopulate.php on line 1627" $query = "INSERT INTO products ( products_image, products_mimage, products_bimage, #products_subimage1, #products_bsubimage1, #products_subimage2, #products_bsubimage2, #products_subimage3, #products_bsubimage3, 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 ( '$v_products_image',"; // unmcomment these lines if you are running the image mods $query .= . $v_products_mimage . '", "' . $v_products_bimage . '", "' . $v_products_subimage1 . '", "' . $v_products_bsubimage1 . '", "' . $v_products_subimage2 . '", "' . $v_products_bsubimage2 . '", "' . $v_products_subimage3 . '", "' . $v_products_bsubimage3 . '", "' $query .=" '$v_products_model', '$v_products_price', '$v_db_status', CURRENT_TIMESTAMP, $v_date_added, $v_date_avail, '$v_tax_class_id', '$v_products_weight', '$v_products_quantity', '$v_manufacturer_id') "; LINE 1627 IS THIS ONE: $query .= . $v_products_mimage . '", "' Quote Link to comment Share on other sites More sharing options...
loxly Posted June 12, 2003 Share Posted June 12, 2003 Are you using the latest version? 2.60 is the latest I think. Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
Guest Posted June 12, 2003 Share Posted June 12, 2003 Sure am. I know it's just syntax. It works like a charm before I un-comment the image stuff. I wish I could light a candle and believe! It's driving me up a wall. :? Love that contribution though... :) Quote Link to comment Share on other sites More sharing options...
mdfst13 Posted June 12, 2003 Share Posted June 12, 2003 $query .= . $v_products_mimage . '", "' The . is a concatenation operator and should not appear between = and the $ variable. What you have here is akin to saying x=*3*2 rather than x=3*2. In case my explanation doesn't help, I think that the code should look like this: $query .= $v_products_mimage . '", "' Hope this helps, Matt Quote I love deadlines. I like the whooshing sound they make as they fly by. ---Douglas Adams Link to comment Share on other sites More sharing options...
Guest Posted June 12, 2003 Share Posted June 12, 2003 No dice. it moved the parse error to line 1188. Still investigating.... (this one has had me stumped for quite awhile) I'd like to see a working copy of easypopulate.php uncommented for image mods. I know it's something stupid and easy. I'm just not familiar w/ php/mysql syntax, so I cant spot the easy stuff... Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 13, 2003 Share Posted June 13, 2003 I am having this same problem. Has anyone found a fix yet? James Quote Link to comment Share on other sites More sharing options...
wasson65 Posted June 13, 2003 Share Posted June 13, 2003 I am having this same problem. Has anyone found a fix yet? James Add a semicolon at the end of the statement that you are uncommenting. It should look something like this: $query .= . 'blah blah' . . ' blah blah ' . . 'blahblah'; Sorry for the problem.... Tim Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 13, 2003 Share Posted June 13, 2003 Tim, Still getting the same error. Here is what my code looks like now. Anything else you see that needs changing? // unmcomment these lines if you are running the image mods $query .= . $v_products_mimage . '", "' . $v_products_bimage . '", "' . $v_products_subimage1 . '", "' . $v_products_bsubimage1 . '", "' . $v_products_subimage2 . '", "' . $v_products_bsubimage2 . '", "' . $v_products_subimage3 . '", "' . $v_products_bsubimage3 . '", "'; $query .=" '$v_products_model', '$v_products_price', '$v_db_status', CURRENT_TIMESTAMP, $v_date_added, $v_date_avail, '$v_tax_class_id', '$v_products_weight', '$v_products_quantity', '$v_manufacturer_id') "; Thanks James Quote Link to comment Share on other sites More sharing options...
wasson65 Posted June 13, 2003 Share Posted June 13, 2003 Remove the leading concatenation operator as well. The fact that it moved the error means it did something. so instead of $query .= . v_blahblah............... it looks like $query .= v_blahblah............... Tim Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 13, 2003 Share Posted June 13, 2003 Ok now it seems to work. However, when I download the tab file there is no space for the multiple images. Do I need to add these fields in manually, or is something still wrong? James Quote Link to comment Share on other sites More sharing options...
wasson65 Posted June 13, 2003 Share Posted June 13, 2003 Did you uncomment them in the filelayout section of the code? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 13, 2003 Share Posted June 13, 2003 I changed my code to look like this: $query .= $v_products_mimage . '", "' . $v_products_bimage . '", "' . $v_products_subimage1 . '", "' . $v_products_bsubimage1 . '", "' . $v_products_subimage2 . '", "' . $v_products_bsubimage2 . '", "' . $v_products_subimage3 . '", "' . $_products_bsubimage3 . '", "'; $query .=" '$v_products_model', '$v_products_price', '$v_db_status', CURRENT_TIMESTAMP, $v_date_added, $v_date_avail, '$v_tax_class_id', '$v_products_weight', '$v_products_quantity', '$v_manufacturer_id') "; Now my parse error has moved to line 1188. I never touched that line so I think I did something wrong in the code above still. Anything stand out? Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 13, 2003 Share Posted June 13, 2003 Tim, I hadn't uncommented the file layout section, but I have now and it still doesnt include the extra image fields. Anything else I could be missing? Thanks James Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 14, 2003 Share Posted June 14, 2003 Anyone? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 14, 2003 Share Posted June 14, 2003 James, did you check the error log on your hosting account? It may tell you somethng. I have not got past the parse 1188 error myself. Email me your easypopulate.php and i'll take a look. I should get the same error as you. [email protected] Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 15, 2003 Share Posted June 15, 2003 Shawn, I am not getting any parse errors anymore, however when I download the the database file, there are no fields for the extra images. I will email you my easypopulatae file so you can compare it to yours. James Quote Link to comment Share on other sites More sharing options...
Guest Posted June 16, 2003 Share Posted June 16, 2003 James emailed me his easypop.php. In the version he mailed me, there was one other section that needed to be uncommented. I am passed all parse errors now but when I download/export data from my DB, i have the same issue as James. None of the image fields are downloaded. Tim, what might cause this? Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 16, 2003 Share Posted June 16, 2003 Shawn, After I emailed the file to you I looked it over again and saw the section you mentioned. Even after uncommenting this, the multiple image fields are still not included in the download file. I can't find anything else related to the images that hasn't been uncommented. Is anyone else having the problem? James Quote Link to comment Share on other sites More sharing options...
Guest Posted June 17, 2003 Share Posted June 17, 2003 Still no luck... :( Does anyone have a WORKING copy of easypopulate.php adjusted for the image module contribution that i can look at? please please. Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 18, 2003 Share Posted June 18, 2003 I FIXED IT!!!! There were a few things that needed changing, but after a little tinkering it works like a charm! I am quite new to PHP, and i'm not sure if my way was the way Tim had it set up in the first place, but it works and I'm happy. If anyone wants a copy of my updated file, email me and I will be happy to send it to you. Thanks again Tim for this great mod, and your efforts in helping us solve our problems. James Quote Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2003 Share Posted June 18, 2003 can you post the solution here please ? Quote Link to comment Share on other sites More sharing options...
♥monte22 Posted June 18, 2003 Share Posted June 18, 2003 Basically what I did was I went through the whole easypopulate.php file and found every instance where "products_image" occurred. Now, in some places I noticed there was no reference to the other images. So all I did was add corosponding references to the other images (products_bimage, products_subimage1, etc...) right after "products_image". There were quite a few places where I needed to do this, so I would wrather not post every bit of code I changed. If you would like a copy of my easypopulate.php file, let me know. James Quote Link to comment Share on other sites More sharing options...
Guest Posted June 19, 2003 Share Posted June 19, 2003 Hello James, can you pm me the easypopulate file please ? so i can compare and try a run again. Thank you Quote Link to comment Share on other sites More sharing options...
loxly Posted June 19, 2003 Share Posted June 19, 2003 Please email a copy to Tim, and I would appreciate a copy also. I am updating to add quantity pricing upload ability. Quote [no external urls in signatures please, kthanks] 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.