Jump to content


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name
    Eric Covert
  1. Good day, Eric...

    Let me first thank you for your add-on Too Many Split Page Results, it solved a product repetition problem when product was listed under 2+ categories.

    However, it seems to work only when you search by specific name...the problem persists when you list products by manufacturer or click on featured products...any hints ?

    Thanks...Gus Collot

  2. e_covert

    MVS V1.0, admin/index.php, lines not found

    Also experiencing this issue.... any feedback much appreciated
  3. e_covert

    Stretch Fix Support Forum

    *stretching* Well... it's been a while since I've been around here... had a new job and wasn't using any osCommerce... self employed now, and working again with an osCommerce installation... came across this post while reading through my old stuff. I agree completely that the absolute best solution is to be found in CSS. In fact, it is my belief that osCommerce should be gutted and rebuilt in a CSS-only, tableless design (as mentioned, I haven't been around for a while... perhaps someone has already tackled this?). Anyway, I just wanted to note that using "min-height" attribute requires a certain bit of hacking to be cross-browser compatible. There are a variety of solutions for this, which I don't have the time to research at the moment, but before using the min-height variable and assuming it will work, make sure you do a little looking around, and test (esp IE6 and Safari)
  4. e_covert

    Stretch Fix Support Forum

    Hi Arimest, Got a bit of bad news for you.... there's no way to accomplish what you want in code without making changes to either your images or the table itself. So, a little comparison for clarification.... Original osCommerce Image Handling - if you have set your height and width variables in the admin, then the images will be displayed with exactly those dimensions. This has advantages in terms of layout, you know you will always have a consistent height and width to your images, and thus you will also have a consistent height and width to the table cells that those images are in. The disadvantage is that if your original images don't match the aspect ratio of your height and width variables from admin, then your image will be distorted along either it's height or it's width Stretch Fix Image Handling - with your height and width variables set in admin, osCommerce will treat these as "maximum" values instead of absolute values. I have described this more in depth in previous posts, and I recommend you read those posts to understand what is being done. The advantage is that your images will sustain little or no distortion when being resized. The disadvantage is that the table cells holding these images now become more "fluid". So.... a few possible solutions to look at: 1. Try just setting the Small Image Height variable, and leaving the Small Image Width variable empty in your admin. This will not fix the problem in all cases, but it looks to me like it would work for the samples you showed. or 2. examine the way the tables are created.... see if there is a way to move the drawing of the surround box up a level in the table heirarchy... a bit difficult to explain, but through a careful process of nesting tables (yuck!), you should be able to accomplish a consistent appearance. This could be difficult work, but I think would give you the best result if you are stuck on keeping the borders around your images. or 3. Revert back to the original image function and pad your images (also yuck) with whitespace to "fake it"... I think this will end up looking weird when you click on the thumbnail to view the actual product, but might be worth it for the sake of a consistent thumbnail view. So, having now written those suggestions, I think that if you have the patience to figure it out, option #2 will be the best solution. Hope this helps... feel free to ask more questions if you'd like :) -Eric Covert
  5. e_covert

    Stretch Fix Support Forum

    Hi bkissi01 :) I did a comparison of my function to the original that comes in 2.2MS2 to make sure I hadn't accidentally changed something while performing other customizations. As far as I can tell, replacing the tep_image function with my new one should not have any adverse effect related to whether or not the image is required. The code that controls this is in two places in the function.... once right at the top, where the first four lines (including the function definition) should read: function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $stretch='false') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } The "if" statement on lines 2-4 are exactly the same as in the original function. It basically says that if this function was called without being passed a filename to look for, and images are not required, then don't output an image tag, and don't do anything else. If we get past this "if" statement, then we have passed in something for the source variable and/or images are required. Then a bit later we have another little structure something like this: if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') ) { if ($image_size = @getimagesize($src)) { //... there are about 50 lines of code in this section which is where I really made the changes in order to calculate the image size.... but the code structure surrounding it is the same as the original function. } elseif (IMAGE_REQUIRED == 'false') { return false; } } This structure basically says: - "If we are supposed to be calculating image sizes, and we are able to determine the original dimensions of the passed in filename, then go ahead and figure out what size it should be." - "If however we are supposed to be calculating image sizes but we are NOT able to determine the original dimensions (probably because the file doesn't exist, or something weird was passed in) then we can safely not create an image tag, as long as images are not required. So.... to sum up, there are two points in the function at which it matters whether or not images are required, and both of those places are intact in the new function within the exact same logical structure as the original. If anyone else is reading this, it would be helpful to have someone double check my logic, but I'm sorry to say bkissi01, that I think your problem lies elsewhere. I wish the problem was in my function so I could help, but I really don't think it is. If anyone has suggestions for how bkissi can debug this problem, feel free to post them here. Unfortunately, my osCommerce site is live and active, and has now been customized to the point that I cannot accurately test whether or not the IMAGE_REQUIRED functionality is working properly... Well, I hope this helps somewhat :) Eric Covert
  6. e_covert

    Stretch Fix Support Forum

    Hi everyone! I know I just released version 1.2, but I decided to re-release it in a different area of the osCommerce Contributions site. It's now under the "Features" section. The old contrib is no longer maintained, and was finished with a note recommending people to get it from the new area. You can find the new contrib at: http://www.oscommerce.com/community/contributions,3629 NOTE: the last package posted on the old contrib and the first package posted on the new contrib are the same. This forum will continue to be the support forum for the new contrib. Thank you all for your kind words... it really isn't all that complicated of a solution... the simpler the better sometimes :) Take care, Eric Covert ps: My previous post mentioned that I would be releasing another version soon. The new contrib is not that version.... it is still coming though :)
  7. e_covert

    Stretch Fix Support Forum

    Hi again Shaytann :) As for the first issue, I guess you would have to find where the tep_draw_separator function is defined (off the top of my head I'd say includes/functions/html_output.php) and in that function somewhere will be a call to the tep_image function. Modify that function call to include "true" for the stretch variable. As for the second issue, it sounds like it's working perfectly. As per my description of the new version of the fix, only images which are too large will be resized. As you have described it, when stretch is set to false, small pictures are not resized. NOTE TO ALL READERS: If people could let me know whether or not they think images which are too small should be expanded to fit I could judge the usefulness of leaving that functionality in place. For my application, I like having them not get expanded. If enough of you think it would be useful, I could control the expanding of small images with another variable, separately from the whole ratio-maintaining thing. ANOTHER NOTE TO ALL READERS: Just to let you know I am planning on releasing another version in the near future which allows you to control the defaults via the admin.
  8. e_covert

    Stretch Fix Support Forum

    Hi all.... just letting you know there is a new version of the Image Stretch Fix. This new version sets the default stretch to false, meaning you no longer have to find all the calls to tep_image (btw Shaytaan, if you change the default on the one you have to "false", that should work for you.... or download the new version and follow the instructions). The new functionality implemented in this fix allows images whose original dimensions are smaller than the passed in dimensions to not be expanded to fit. As before, images will always maintain their original aspect ratio, but only images that are too big will be resized. Installation is much simpler now, requiring you to simply replace the tep_image function.
  9. e_covert

    Free shipping per product 1.0

    Not sure if this helps, but I am having a similar problem and I thought that we might figure it out together. The problem I am having is that when a "free shipping" product and a "non-shippable" (ie downloadable) product are together in the cart, it is calculating the shipping and requesting the user to choose the shipping method. There are problems in the code which I am trying to figure out, but I realized that my package tare weight is what is actually being calculated. So... it isn't actually calculating the shipping on the products which are considered "free shipping", but because they have to be shipped, it goes through the calculations anyway. For weight, it is ignoring the products weight (as it should), but it is using the tare weight (as defined in the Configuration->Shipping/Packaging section of your admin) I'm still working on this... if you have already reached a solution please let me know :)
  10. e_covert

    Stretch Fix Support Forum

    Hi argentice... That line in your file should not have to be changed. All the calls to this function are supposed to pass in the full path to the image (this is not new to my function, that's the way this function has always worked). If what you changed fixed the problem for you, then it seems to me like your config isn't set up properly. In particular, you need to make sure the constant DIR_WS_IMAGES is set properly. Mine (as found in "catalog/includes/configure.php") is set as follows: define('DIR_WS_IMAGES', 'images/'); If you set the default 'stretch' variable in the function definition to "false", it should work as per the description for all images. If you leave the default as "true", then you need to find in your code all the calls to this function which you want to apply the fix to, and modify how they call the function. This is described in the included file as follows: if the old function call looked like this: tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) Then the new function call will be: tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,'','false') In the included file, I have provided a list of the function calls I chose to change, and where to find them. Another poster to this forum recommended just setting the default to "false".... I wasn't sure if that would adversly affect other things, but it sounds like it worked for them. Please read through the examples posted earlier in the forum. It should also be noted that this modification is designed to fix the aspect ratio, not whether or not images are resized. So... if both the height and width of your images are smaller than the related height and width settings in your configuration, then the images will be "stretched" to fit the settings, but the aspect ratio of the image will be maintained. I hope this clarifies a bit :) ecovert
  11. e_covert


    Hi all.... love this contrib... I just wanted to point out two tiny fixes I had to make. In the sections where an affiliate can build their own links to specific categories and products, there are two popup pages for letting them choose the category or product id to build the link for. In these popup pages, the display shows the code ' ' to the left of the id. All that is missing is a ';' after this to make it show a space, not the code. Two files: /affiliate_validcats.php line 51: echo "<td class='infoBoxContents'> ".$row["categories_id"]."</td>\n"; change to: echo "<td class='infoBoxContents'> ".$row["categories_id"]."</td>\n"; /affiliate_validproducts.php line 41: echo "<td class='infoBoxContents'> ".$row["products_id"]."</td>\n"; change to: echo "<td class='infoBoxContents'> ".$row["products_id"]."</td>\n"; This may have already been covered, I just figured it would be easier to re-post than to browse 73 pages of posts to see if someone already mentioned this.... -Eric
  12. e_covert

    Stretch Fix Support Forum

    You are absolutely right... if you want to change the default stretch to false you can... my worry was how that might impact the display of all the other images on the site. I really don't know the code for osCommerce all that well, and I didn't want to make the assumption that setting the default stretch to false would work throughout the site.... If you think it won't affect anything else, or if you think it would be easier to set the default to "false" and change the calls for just the ones I want to be "true", let me know and I'll modify the contribution. Thanks for the feedback :) Eric Covert
  13. e_covert

    Stretch Fix Support Forum

    I should also mention that this modification will currently stretch images whose height and width are both smaller than your defined image height and width variables. It determines which dimension to set to the config size, then sets the other dimension accordingly while maintaining the aspect ratio. Example 1: Config settings: Small image height: 120 px Small image width: 60 px Original image size: height: 120 px width: 120 px Output image size (small): height: 60 px width: 60 px So you can see that the aspect ratio (1:1) has been maintained, but the image fits within the smaller of the two config settings (width: 60 px) Example 2: Config settings: Small image height: 120 px Small image width: 60 px Original image size: height: 200 px width: 100 px Output image size (small): height: 120 px width: 60 px Here, the ratio of 2:1 is maintained, and the image is resized to exactly the config settings, because the ratio of the config settings is also 2:1. Example 3: Config settings: Small image height: 120 px Small image width: 60 px Original image size: height: 10 px width: 10 px Output image size (small): height: 60 px width: 60 px This somewhat extreme example shows what happens when both the width and height of the image are smaller than the config width and height. The image is stretched (while maintaining it's aspect ratio of 1:1), and fits within the size defined in the config. If people feel a need for it, this modification could include in the future the ability to determine if "too small" images get stretched or not.... Eric Covert
  14. Tired of having to decide whether you like your product images better with a standard height or with a standard width, since if you set both you end up with stretched images? This modification allows the existing image wrapper function to consider your configured image width and height variables as maximum values, not absolute values. It's almost like your configured width and height variables define a box within which your images will fit while maintaining their original aspect ratio (instead of stretching one of the images dimensions). View Stretch Fix contribution here
  15. e_covert

    Ship and/or Download

    Thank you for the response... now I just have a couple more questions to make sure I do this right.... I have now set up in Products Attributes one product option (called "Ship / Download") with two option values: - "Ship (adds shipping charges)" - "Download" So for the option "Ship..." I just don't assign a file for it, and for the download option I do (I believe this ability came when I installed a download manager). Question 1: Is there a way for me to do shipping charges "properly" in this scenario? Ie: can I apply shipping charges to a product only when a certain attribute is selected? When I say "properly" I mean can I do it without adding a flat value to the attribute itself? Question 2: I would like to also make available a third option: "Download and Ship". Obviously I would have to assign a download file to this option, but I also need to apply shipping charges. I think there are likely other potential problems with this, but I don't know enough about it yet to predict them.... Any help much appreciated :) Thanks, e_covert