Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ChrisW123

Pioneers
  • Posts

    301
  • Joined

  • Last visited

Everything posted by ChrisW123

  1. If you use the "On The Fly Thumbnail" contrib, it doesn't show the watermark. In addition, I also added an IF statement around the code that adds the watermark so that other small .jpgs don't get the watermark. I've rearranged the original code so here is all of it. Watermark_Image.php: <?php //watermark program //Show that a jpeg image is going to be returned //echo $QUERY_STRING; //exit; header("Content-type: image/jpeg"); //File names $MainImage=$QUERY_STRING; $main_img = imagecreatefromjpeg($MainImage); $Main_Image_width = imageSX($main_img); $Main_Image_height = imageSY($main_img); if ($Main_Image_height >= 150) { $WaterMark='watermark3.gif'; $WaterMark_Transparency = "50"; $watermark_img = imagecreatefromgif($WaterMark); imagecolortransparent($watermark_img,0); $wmrk_size = getimagesize($WaterMark); $WaterMark_width = imageSX($watermark_img); $WaterMark_height = imageSY($watermark_img); // This will be the position of the WaterMark $MaterMark_x = ($Main_Image_width - $WaterMark_width) / 2; $MaterMark_y = ($Main_Image_height - $WaterMark_height) / 2; //Merge the 2 buffers imagecopymerge($main_img,$watermark_img,$MaterMark_x,$MaterMark_y,0,0,$wmrk_size[0],$wmrk_size[1],$WaterMark_Transparency); //or //imagecopy($main_img,$watermark_img,0,0,0,0,$wmrk_size[0],$wmrk_size[1]); //Release our watermark image imagedestroy($watermark_img); } //Output file to browser imagejpeg($main_img); imagedestroy($main_img); ?>
  2. I have a problem where .jpg images won't show on my secure web pages I think it may have something to do with "On The Fly Watermark" that I'm using. I you think this contribution could be causing the problem, please read my other post in General forum. Thanks!: http://www.oscommerce.com/forums/index.php?showtopic=118520
  3. Jack are you familiar with the "Category Meta Tags" contribution? That's the contrib I'm using now. If so, can you give a quick summary of what features "Header Tags Controller" has over that one? I'm thinking about switching to this one. Thanks, -Chris.
  4. It's because the "Required..." phrase is messed up. Here's some code I fixed today to fix this problem. Note, don't use this exact code, just use the general layout): <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td> <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td> </tr> </table></td>
  5. Thanks Keith, I'll checkout your website and look at the rates, etc., and then see if this is for me. -Chris.
  6. Did any of these issues regarding the order being updated back to the osCommerce database after an order, etc., get resolved? I'd like to try 2CheckOut but I'm hesitent if it doesn't work fully with osCommerce. Any updates on the status? Thanks, -Chris.
  7. In admin check your "Small Image Height" and "..Width" values. Then make sure your images are not drastically smaller in size then your settings. If they are a lot smaller, this could cause the "grainy" look. Ideally, your product image sizes should have an aspect ratio = to the settings in Admin. Example: if your settings are 200 x 160 in admin, your images should be no smaller then this, and if larger, have the same aspect ratio such as: 400 x 360, or 800 x 720, etc. If you follow these rules you should no problems. :) If you check this, and still have problems, post your website link.
  8. I don't know if this is a PayPal issue or an issue with the contrib: I'm unable to get the "optimized" checkout screen at PayPal when a customer makes a payment from my website. The full login screen is displayed with all the tabs at the top, etc., like you normally see when you go to paypal.com. I was getting the optimized screen a few weeks ago so I don't know why it's no longer being displayed. I've double checked my Profile features on PayPal to make sure the "Optimized Checkout" feature is selected. Does anyone know what could be wrong? Has anyone else noticed this problem? Thanks, -Chris W.
  9. Robert, here's mine: RewriteEngine on RewriteRule ^(.*)\.jpg /images/watermark_image.php?%{REQUEST_FILENAME} My "images" folder is off of my Root. So if your images folder is under catalog which is off your Root, for example, then you'd use "/catalog/images/watermark..." instead.
  10. I noticed in contribs, Calvin has mentioned a new version 2.0 coming soon? If so, should I wait for it, or go ahead with the current version 1.4 and then upgrade later? Will upgrading be a pain? Should I just wait for 2.0 instead? Thanks! -Chris.
  11. No idea how to make it work... I'm sure I installed it correctly (checked it twice) and it just doesn't work for me. Plus with the post by Druide about search engines stopping their search because of it, I'm going to completely uninstall it. :(
  12. Sam, Can you explain the problem you had a little more? Did you mean you made your changes to catalog/include/language/english/login.php when you should have made them to catalog/login.php? I made my changes to catalog/login.php but I still can't get this to work! It seems that in Autologin.php, the function tep_autologincookie() is only called when $on is false (logoff). But it never gets called when @on is true. Any ideas please! Thanks, -Chris.
  13. BTW, Greg, please post a PayPal link or email address where I can send you a donation, if you are excepting donations... I'm very impressed with this contribution and how much effort you put in to answering people's questions, replying so quickly, etc. Thanks again, -Chris.
  14. No problem! That was driving me crazy also. I couldn't figure out why it wasn't working. BTW, my other problem where I wanted to highlight "PayPal" in the payment selection screen during checkout, thanks to Greg's reply I was able to find the spot to modify. Others may be interested also, since this is a PayPal thread in a way, so I'll post the change even tho it's not really realated to this AWESOME contribution (Thanks again, Greg): I have two payment options, PayPal and Check/Money Order. I have PayPal sorted (from Admin) so that it is first in the list. Then make these changes which will always highlight the first item no matter how many items you have. Edit .../includes/classes/payment.php file: Change: if ( (tep_count_payment_modules() == 1) && (!isset($GLOBALS[$payment]) || (isset($GLOBALS[$payment]) && !is_object($GLOBALS[$payment]))) ) { And replace "== 1" with ">=1" :rolleyes:
  15. I think this is a topic for the "osC General Descussion" forum, since it sounds like you want to enable the standard "Check/Money Order" payment option in osC, right? Anyway, go into your admin screen (Use IE to go to .../catalog/admin/index.php). Then from there select Modules > Payment. Now "Install" the "check/money order" option if it isn't already. Once installed, make sure it is "Enabled". Click the Edit button if you have to to Enable the feature. Then it should show up on the user (store) screen. Good luck. :)
  16. Also I forgot to mention... When the user gets to the payment screen, I want the "PayPal" payment option to be selected by default when they see this screen. Currently none of the options are selected. I tried to find the code to change but I'm lost. It's probably a simple matter of tweaking a setting to "checked = true" or something but I just can't find it. Thanks in advance for the help!
  17. Question: I want to change this line in catalog/includes/languages/english/module/payment/paypal.php from: define('MODULE_PAYMENT_PAYPAL_TEXT_TITLE', 'PayPal'); //Do not change!!! To: define('MODULE_PAYMENT_PAYPAL_TEXT_TITLE', 'Credit Card or PayPal'); //Do not change!!! But I noticed the comment "Do not change!!" :) Luckily. So I did a "grep" on all the files for "paypal" and for 'MODULE_PAYMENT_PAYPAL_TEXT_TITLE' to see if I could determine what would be effected if I changed it. But the word "paypal" is assigned in a lot of places, almost like it's "hard-coded" instead of using the variable, and 'MODULE_PAYMENT_PAYPAL_TEXT_TITLE' is not in as many places. But I'm still not sure what mods I'd have to make. Has anyone changed this successfully (correctly)? What places need to be changes?
  18. Homewetbar, I just figured out a few days ago that in test mode for PayPal (ie. "Cart Test" = true, "Use sandbox.com", etc.), you don't seem to get IPN data back from PayPal when you make your transaction. Nor does PayPal send you any emails, nor do you get emails from osC. Also Greg said that under test mode the "INVALID RESPONSE" in your test file is normal. So to find this out I read the first 20 pages of this this thread last night. :D So today I turned off all the test settings in my PayPal setup in admin (live now) and the IPN data works perfectly so far as I can tell. I setup a .10 product so I don't go broke testing it. Hope this helps! Anyone, let me know if I'm wrong here. :) PS. The thing about PayPal that bugs me is all the restrictions they have regarding "There's already an email address that exists in another account.", etc. a few message that really bug me and make me think that PayPal is going to frustrate some potential buyers. We'll see... Or NOT see is more like it. :D
  19. First off, Randy, thanks for this contribution... It's one of the easiest and most usefull contribs to install/use. Your "takes 1 minutes to install" is absolutely true. Well it took me about 10 minutes because I like to compare things first. :) Helply, You need to get a program to tell you the differences between your existing .php and his .php. Try "ExamDiff Pro". Then from that, it's up to you to make the decision as to whether you are going to copy the new file in, or make the changes to your existing file by hand. I don't think the standard osc comes with columns, unless they have added it in the last 3 weeks. :) It's nice to have step by step, thorough instructions, but remember that this is a *contribution*. The author didn't have to post this contrib, but did to share it with others, so you shouldn't complain about the instructions. -Chris.
  20. Pretty cool contribution. Works fine except for the problem in step 7 that others have already pointed out. Couple things to improve it: 1) If your site doesn't show up in the top xx sites, add something at the end that says "Your site is 1,298,000th in the Google listing". That way you know WERE it is at least. 2) Maybe a "Tips" link to give clues about how to increase your ranking. Although you can find that elsewhere easy enough. Thanks for the contrib!
  21. One other thing if the 2 steps above don't work.... I noticed your image settings in admin for "small image width/height" are 100 x 80 (or something) and I've read somewhere that "100x100 or smaller may cause...". So since my install works and my settings are 150x120, try setting yours the same for a test to see if it makes a diff. Good luck.
  22. Drew here's something else to do: 1) Concentrate your attention on this line in the tep_image() function: It's the piece of code that is supposed to redirect your image through the thumbnail processing. Add some debug stuff, etc., to see why it isn't handling the image. 2) This has tripped up a lot of people (me included).... Check all functions and contribution code that you paste into your .php for TAB characters. They will cause problems and the code won't work sometimes. So for every line in the tep_image() function, use your Del key to remove all leading chars from each line and then use spaces to get the lines back into alignment. In particular I noticed in the readme.txt file that the line above was indented a LOT with tab characters probably. Give it a try!
  23. if ($image_size = @getimagesize($src)) { I can't tell from looking at the code whether the IF statement should do a comparison (you would use "==") or should do a boolean check (using "="). Maybe one of the creators of osCommerce who wrote this part of the code would know if it should be "==" or "=". Or someone who is familiar with this section of the code would also be able to tell which is right. I'm not very familiar with it, nor do I know PHP well at all. :) I know C# so that's how I spotted the "=" / "==" thing. -Chris.
  24. I thought IF statements are supposed to use use "==" to see if something is equal to something else? Although my code also uses just "=" and my installation works fine. Not sure if this will help you but in my Admin > Images settings I have: small width: 150 small height: 120 heading width: 90 heading height: 60 subcat width: 60 subcat height: 40 calc image size: true image req: true Then the images I upload for my products are all 500 x 400 px. .jpg files. In my store, the "thumbnails" are correctly sized at 150 x 120 (tested this by downloading them and checking the size) and when I click "Enlarge Image" they are 500 x 400. The product_thumb.php file is in my /catalog/ folder, and I replaced the tep_image() function in html_output.php like the instructions say. Here's what function looks like: function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { ? ?if (($src == '' || $src == 'images/') && IMAGE_REQUIRED == 'false') { ? ? ? ?return; ? ?} ? ?$image = '<img src="' . $src . '" border="0" alt=" ' . htmlspecialchars(StripSlashes($alt)) . ' ?" title=" ' . htmlspecialchars(StripSlashes($alt)) . ' "'; ? ?if ((strstr($width,'%')!='') || (strstr($height,'%')!='')) { ? ? ? $dont_calculate = 1; ? ?} ? ?if (CONFIG_CALCULATE_IMAGE_SIZE && (!$width || !$height) && !$dont_calculate) { ? ? ? ?if ($image_size = @getimagesize($src)) { ? ? ? ? ?if (!$width && $height) { ? ? ? ? ? ? ? ?$ratio = $height / $image_size[1]; ? ? ? ? ? ? ? ?$width = $image_size[0] * $ratio; ? ? ? ? ? ?} elseif ($width && !$height) { ? ? ? ? ? ? ? ?$ratio = $width / $image_size[0]; ? ? ? ? ? ? ? ?$height = $image_size[1] * $ratio; ? ? ? ? ? ?} elseif (!$width && !$height) { ? ? ? ? ? ? ? ?$width = $image_size[0]; ? ? ? ? ? ? ? ?$height = $image_size[1]; ? ? ? ? ? ?} ? ? ? ?} elseif (IMAGE_REQUIRED == 'false') { ? ? ? ?return ''; ? ? ? ?} ? ?} ? ?if (CONFIG_CALCULATE_IMAGE_SIZE && !$dont_calculate) { ? ? ? ?if ($image_size = @getimagesize($src)) { ? ? ? ? ? ?$ratio = $image_size[1] / $image_size[0]; // real ratio ? ? ? ? ? ?$orig_width = $image_size[1]; ? ? ? ? ? ?$orig_height = $image_size[0]; ? ? ? ? ? ?// do we need scaling ? ? ? ? ? ?if ($image_size[0] > $width || $image_size[1] > $height) { ? ? ? ? ? ? ? ?$rx = $image_size[0] / $width; ? ? ? ? ? ? ? ?$ry = $image_size[1] / $height; ? ? ? ? ? ? ? ?if ($rx < $ry) { ? ? ? ? ? ? ? ? ? ?$width = $height / $ratio; ? ? ? ? ? ? ? ?} else { ? ? ? ? ? ? ? ? ? ?$height = $width * $ratio; ? ? ? ? ? ? ? ?} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Generate thumbnail on the fly ? ? ? ? ? ? ? ?$image = '<img src="product_thumb.php?img='.$src.'&w='.intval($width).'&h='.intval($height).'" border="0" alt=" ' . htmlspecialchars(StripSlashes($alt)) . ' " title=" ' . htmlspecialchars(StripSlashes($alt)) . ' "'; ? ? ? ? ? ?} ? ? ? ?} ? ?} ? ?if (!$dont_calculate) { ? ? $width = intval($width); ? ? $height = intval($height); ? ? ?} ? ?if ($width && $height) { ? ? ? ?$image .= ' width="' . $width . '" height="' . $height . '"'; ? ?} ? ?if ($params != '') { ? ? ? ?$image .= ' ' . $params; ? ?} ? ?$image .= '>'; ? ?return $image; }
  25. I added a watermark. :) I used the watermark feature in the "On The Fly Images 1.0 - Watermark and Thumbnail Generation" contribution. Works great... it uses .htaccess to redirect all .jpg access through a .php page which automatically merges in my watermark. This is the best way because no matter what process tries to access the images, the watermark will always be added. And it works great with your thumbnailer contrib... the watermarks aren't added to the thumbnails at all. :) Thanks again, it works GREAT!
×
×
  • Create New...