Salvo Posted January 19, 2003 Share Posted January 19, 2003 Hi all, I am trying to make a "send as a post card lagnagues supported" contribution for osc adapting some script... All is working fine, image with all details shown and sent to email given. but when the card "the details are inserted in a table" is viewed, all the details are there less the image... the image can not be viewed because the last link (image name is missing). if someone EXPERT like to have a look at it, I will forward a zip file (only a few files) with instruction. installation takes a few minutes and easy. Salvo Quote Link to comment Share on other sites More sharing options...
Salvo Posted January 19, 2003 Author Share Posted January 19, 2003 Ops! sorry for posting again... (no edit facilities) :-) Maybe he/she doesn't have to be expert to resolve this little problem. its me that I am still learning and not be able to resolve it. Anybody with an better understanding than me in php and osc could resolve it with ease... Thanks again Sal Quote Link to comment Share on other sites More sharing options...
Salvo Posted January 20, 2003 Author Share Posted January 20, 2003 I see that there is not much request for a postcard module added to the product images. So I presume that I must try to resolve the problem on my own in the best way... Here we go: Using the popup image system, I retrieve the image in a pop up window as follow. $pod_id = $HTTP_GET_VARS['pID']; $products_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $pro_id . "'"); $products_values = tep_db_fetch_array($products_query); $image = DIR_WS_IMAGES . $products_values["products_image"]; all works fine, the image shows up in the window and below the image I have input fields that works fine and therefore I don't put them here.. Now, the $image above translates as follow: DIR_WS_IMAGES = image/ //which is the directory where the images are located. $products_values["products_image"]; = // this translate into ie. image.gif I like to insert $image into a field (new table) as follow at moment $insert = "INSERT into $table (emailto, emailfrom, nameto, namefrom, image, comment, sessionID, seencard)"; $insert .="VALUES ('$email[to]', '$email[from]', '$name[to]', '$name[from]', '$image',"; $insert .="'$comment', '$sessionID', 'false')"; $result = mysql_query($insert); if($result){ $cardnumber =mysql_insert_id(); all the fields are inserted into the respected fields correctly... only the $image is NOT inserted in full.. the only thing that is inserted is: DIR_WS_IMAGES = image/ //which is the directory where the images are located. Is part: $products_values["products_image"]; = // this translate into ie. image.gif is NOT inserted... WHY? I need the image name into the field in order to retrieve it to show the image.... can someone help in solving this mistery? Salvo PS> I am sorry if I am persistend on this one. but it would be my first contribution Quote Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2003 Share Posted January 20, 2003 Hi Salvo, I reviewed your codes but mysql syntax is really out of my boundaries. So I am just leaving you this notice to say that your contribution will be meaningful to my site (still under development) which sells over a hundred thousand oil paintings. Chow from Hong Kong Quote Link to comment Share on other sites More sharing options...
Salvo Posted January 20, 2003 Author Share Posted January 20, 2003 chow, thanks for you interest. I will (sooner or later) make it. :-) Sal Quote Link to comment Share on other sites More sharing options...
loxly Posted January 22, 2003 Share Posted January 22, 2003 I would also be interested in this mod, but like the last post, I don't know much about code yet. Please let us know if you get this resolved. Debbie Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
sowens Posted March 3, 2003 Share Posted March 3, 2003 hi this is a really useful contribution, do you still need help? Regards Sean Owens Quote Sean Owens Link to comment Share on other sites More sharing options...
Salvo Posted March 3, 2003 Author Share Posted March 3, 2003 Yes, I would need help... I just left it on the side becuse I coundn't make it work... If you are good in php ( it might be just an easy work with someone with some good knowleadge in php) which I don't have, and you like it to finish it, I can post you a zip with files of what I have....... Thanks Salvo Quote Link to comment Share on other sites More sharing options...
jon_l Posted March 4, 2003 Share Posted March 4, 2003 If I read this correctly....everything is working except for the insert? Are the rest of the fields being inserted correctly? Or is it just the image field that is not being inserted? Jon. Quote Link to comment Share on other sites More sharing options...
jon_l Posted March 4, 2003 Share Posted March 4, 2003 I just read through it again.... Why do you need to put the DIR_WS_IMAGES in to the database? This shouldn't be necessary, you should only need to store the actual image file name. Jon. Quote Link to comment Share on other sites More sharing options...
Salvo Posted March 4, 2003 Author Share Posted March 4, 2003 yes, jon, that is what I was trying to do.. just insert the image file name... but it doesn't.. I don't know why... Quote Link to comment Share on other sites More sharing options...
Riedborn Posted August 5, 2003 Share Posted August 5, 2003 Hi, I solved the problem. Look at www.riedborn-apotheke.de/catalog and use some image to send as a postcard. When it is useful, I can post the code here! Wolfgang Quote Link to comment Share on other sites More sharing options...
Salvo Posted August 5, 2003 Author Share Posted August 5, 2003 beautfulllll it works nicely............. I had left the progect becauce I coundn't make it work I would appreciate if you could send the code me or upload it here if you like... Please Thanks Salvo Quote Link to comment Share on other sites More sharing options...
loxly Posted August 5, 2003 Share Posted August 5, 2003 I would like this to, if you are not able to package as a contribution you can email it to [email protected] and I would be glad to post it for you! Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
loxly Posted August 5, 2003 Share Posted August 5, 2003 I can't translate though, so if it isn't in English perhaps someone can translate it so it can be posted as a contribution? Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
Riedborn Posted August 5, 2003 Share Posted August 5, 2003 When you click on an image there opens a popup-window with this image. Instead of this you import this image into a postcard-program and send the image to a friend, customer... 1. Have a look at www.riedborn-apotheke.de/catalog to see if it is useful 2. Install a postcard-program like postcard-direct (pd) (http://www.ginini.com/software/postcard-direct) 3. Add your domain into the file cgi-bin/pd/admin/remotesites.txt 4. Make some changes inside catalog/product_info.php: --> change function popupWindow(url): <link rel="stylesheet" type="text/css" href="stylesheet.css"> <!-- BOF Einbau von Postcard direct - changed: scrollbars, width, height //--> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resiza ble=yes,copyhistory=no,width=800,height=600,screenX=150,screenY=150,top=150,left= 150') } //--></script> <!-- EOF Einbau von Postcard direct //--> </head> --> change the call of this function about line 100: <!-- BOF use of Postcard direct - don't forget to change the function popupWindow: scrollbars, width, height //--> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow('/cgi-bin/pd/pd.cgi?image=' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '&title=' . $product_info['products_name'] . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="/cgi-bin/pd/pd.cgi?image=' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> <!-- EOF use of Postcard direct //--> ---------- Wolfgang Quote Link to comment Share on other sites More sharing options...
Salvo Posted August 5, 2003 Author Share Posted August 5, 2003 Hi, the postcard script to be downloaded it is not in php? Thanks Quote Link to comment Share on other sites More sharing options...
Riedborn Posted August 5, 2003 Share Posted August 5, 2003 Hi Salvo, seems no - its not from me, I only adapted it into osC (for my purpose). Wolfgang Quote Link to comment Share on other sites More sharing options...
loxly Posted August 5, 2003 Share Posted August 5, 2003 I am very familiar with Postcard Direct and do not want to use cgi solutions with my php stores. Thanks for the update though, guess we will keep looking! 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.