Jump to content

swcharlie

Members
  • Content count

    27
  • Joined

  • Last visited

1 Follower

About swcharlie

  • Birthday 09/01/1992

Profile Information

  • Real Name
    Schalk
  • Gender
    Male

Recent Profile Visitors

3,763 profile views
  1. swcharlie

    Adding a Fee to sub total

    I am trying to add the cost of each payment option on checkout_payment.php in osCommerce 2.3.4, but with the solution given in the v2.2 version of this addon, but some reason (although the code makes sense), no price is retrieved. code used: If you want to display the payment fee in the checkout page, add this code : # go to catalog/includes/classes/payment.php # REPLACE the function selection() around line 125 with the one below: (or ADD the //added for ot_fixed_payment_chg" lines) function selection() { $selection_array = array(); include_once (DIR_WS_MODULES.'order_total/ot_fixed_payment_chg.php'); // added for ot_fixed_payment_chg $pay_chg = new ot_fixed_payment_chg; // added for ot_fixed_payment_chg if (is_array($this->modules)) { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $selection = $GLOBALS[$class]->selection(); $selection['cost'] = $pay_chg->get_payment_cost($class); // added for ot_fixed_payment_chg if (is_array($selection)) $selection_array[] = $selection; } } } return $selection_array; } # go to catalog/checkout_payment.php # find this line (around 257) <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td> # REPLACE with: <td class="main" colspan="3"><b> <?php echo $selection[$i]['module']; if ($selection[$i]['cost']){ echo ' ('.$currencies->format($selection[$i]['cost']).')'; } ?></b></td> Any help would be appreciated :)
  2. swcharlie

    Adding a Fee to sub total

    Just found: http://addons.oscommerce.com/info/7996 Will try this out :)
  3. swcharlie

    Adding a Fee to sub total

    Hi Will this addon work for oscommerce 2.3.x, or are there any similar addons available for 2.3.x? Would I be better off coding a new one?
  4. swcharlie

    Product listing

    Just before seeing your reply I seem to have gotten it working with the following: //$quality = is_null ( $quality ) ? 0 : $quality; $quality = is_null ( $quality ) ? 7 : floor ( $quality / 10 ); $filters = is_null ( $filters ) ? null : $filters; return imagepng( $this->_image, $save_in, $quality, $filters ); break; default : But will raher replace it with the above code. Thanks!
  5. swcharlie

    Product listing

    Thank you for the quick response. Will try it out, and get back here if it does not work :) update: I am now getting: Warning: imagepng() [function.imagepng]: gd-png error: compression level must be 0 through 9 in /includes/modules/kiss_image_thumbnailer/classes/Image.php on line 146 :/
  6. swcharlie

    Product listing

    Hi I am getting the following error at times with Oscommerce 2.3.4 (seems to be with png images and sometimes dissapears when refreshing the page): Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in includes/modules/kiss_image_thumbnailer/classes/Image.php on line 269 My html_output.php code is: // New HTML image wrapper function modified for KISS Image Thumbnailer by FWR Media function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { // If width and height are not numeric then we can't do anything with it if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters ); require_once DIR_WS_MODULES . 'kiss_image_thumbnailer/classes/Image_Helper.php'; $attributes = array( 'alt' => $alt, 'width' => $width, 'height' => $height ); $image = new Image_Helper( array( 'src' => $src, 'attributes' => $attributes, 'parameters' => $parameters, 'default_missing_image' => DIR_WS_IMAGES . 'no_image_available_150_150.gif', 'isXhtml' => true, 'thumbs_dir_path' => 'images/', 'thumb_quality' => 90, 'thumb_background_rgb' => array( 'red' => 255, 'green' => 255, 'blue' => 255 ) ) ); if ( false === $image_assembled = $image->assemble() ) { return tep_image_legacy( $src, $alt, $width, $height, $parameters ); } return $image_assembled; } // end function I would appreciate if anyone could assist with solving this problem :)
×