Jump to content

ttown

Members
  • Content count

    7
  • Joined

  • Last visited

  1. Think I'm hosed as well. Been running for 2 years, no problems, just updated to the 24 Oct 2008 download, but no luck... error_message=%20-%20Your+credit+card+could+not+be+authorized+for+this+reason.+Please+correct+any+i nformation+and+try+again+or+contact+us+for+further+assistance.&osCsid=fobfu1akjno9i5p0bmlf3mfs40
  2. I had a lot of trouble getting this contribution to take a fixed discount. So, I modified the discount_coupon.php file located in catalog/includes/classes/ and things seemed to start working the way I would expect while I was testing... I took most of this code from a previous post in this forum... but got things working by replacing function calculate_discount with the following (the part I added has been bolded): function calculate_discount( $product, $product_count ) { //if there's a maximum order amount to apply the discount to, determine the percentage of this product's final price we should apply the discount to //$max_applied_percentage = ( $this->coupon['coupons_max_order'] == 0 ? '1.00' : $this->coupon['coupons_max_order'] / ( tep_add_tax( $product['final_price'] * $product['qty'], $product['tax'] ) * $product_count ) ); $max_applied_percentage = ( $this->coupon['coupons_max_order'] == 0 ? '1.00' : $this->coupon['coupons_max_order'] / ( $product['final_price'] * $product['qty'] ) * $product_count ); //$applied_discount = tep_add_tax( $product['final_price'] * $max_applied_percentage * $this->coupon['coupons_discount_percent'], $product['tax'] ) * $product['qty']; $applied_discount = $product['final_price'] * $max_applied_percentage * $this->coupon['coupons_discount_percent'] * $product['qty']; //don't allow the discount amount to be more than the product price //if( $applied_discount > ( tep_add_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) ) $applied_discount = tep_add_tax( $product['final_price'], $product['tax'] ) * $product['qty']; if( $applied_discount > ( $product['final_price'] * $product['qty'] ) ) $applied_discount = $product['final_price'] * $product['qty']; $_max = $this->coupon['coupons_max_order']; $_min = $this->coupon['coupons_min_order']; //if max amount equals min amount, we have a fixed discount and should be using it rather than calcluating if($_max == $_min) { $applied_discount = ( $_max * $this->coupon['coupons_discount_percent'])/$product_count; } return $applied_discount; }
  3. ttown

    [Contribution] STS v4

    I'm running into the same issue. Does anyone have a suggestion?
×