Latest News: (loading..)

boingolover

Members
  • Content count

    2
  • Joined

  • Last visited

About boingolover

Profile Information

  • Real Name
    Nathan Johnson
  1. found and fixed a bug, thought I'd post here rather than making a mess of your contrib section. in admin/includes/modules/payment/authorizenet_aim.php, in the constructor, $order should be declared global. otherwise, this line never has any real meaning: if (is_object($order)) $this->update_status(); and update_status() never gets called. this only matters if you're defining zones where you want the module to be run (as I am). So, the simple fix is just to declare $order global like so: function authorizenet_aim() { global $order; Other than this, the module is great so far. Thank you! Nathan
  2. I didn't want to muck up the contrib section with my own additions if nobody else thought them useful, so I'm going to post them here instead. Use them (or not) as you see fit. I had a problem when I installed this contrib where the aspect ratio of images would not be correct. It seems that for thumbnail images, it defaults to using the SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT as absolute widths and heights for the thumbnails, even if this changes the aspect ratio of the original image. I made this change to html_output.php, in the tep_image function (forgive my formatting, I'm new here) if ($image_size) { // NJ -- use the width + heights as suggested maximums // rather than actual dimensions, if available if ($width && $height) { // Measure the deltas, if top heavy, resize height by zeroing width if ( $image_size[1] > $height && ($image_size[1] - $height > $image_size[0] - $width)) { $width=0; } elseif ($image_size[0] > $width) { // Must be too wide, resize width by zeroing height $height=0; } else { // image size is same or smaller than maxes, display as-is $width=0; $height=0; } } // NJ -- end my code // Set the width and height to the proper ratio if (!$width && $height) { <snip> So in any case where it receives an abslolute $width and $height, it will assume that as long as the image dimensions are larger than the width and/or height to scale and preserve aspect ratio using those as maximum values. I also made this change for the popup where I change the tep_image call like this: <?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], MAX_POPUP_IMAGE_WIDTH, MAX_POPUP_IMAGE_HEIGHT); ?> and define these in the Images admin screen with the following sql (again, forgive my formatting, or lack thereof): insert into configuration (configuration_id , configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order) values (2029, 'Max Popup Image Width', 'MAX_POPUP_IMAGE_WIDTH',800,'The maximum width that a popup window image can be',4,20); insert into configuration (configuration_id , configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order) values (2030, 'Max Popup Image Height', 'MAX_POPUP_IMAGE_HEIGHT',600,'The maximum height that a popup window image can be',4,21); This sets a maximum on the popup window. Sometimes it's easy if I have a large image from a digital camera if I just upload at native size rather than having to remember to scale it to a certain size, I can just set maximums and all images will adhere to that.