Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

Profile Information

  1. After this call from "classes\order.php" "$this->info['total']" is not updated: //end kgt - discount coupon //kgt - discount coupon if( is_object( $this->coupon ) ) { $this->info['total'] = $this->coupon->finalize_discount( $this->info ); } //end kgt - discount coupon The above code calls this code in "classes\discount_coupon.php": if( $this->coupon['coupons_discount_type'] == 'shipping' ) { //discount shipping if the coupon type is shipping $this->applied_discount['shipping'] = $info['shipping_cost'] * $this->coupon['coupons_discount_amount']; // $this->applied_discount['shipping'] = $this->applied_discount['shipping']; $info['total'] -= $this->applied_discount['shipping']; ... I've updated our install from v2.1 to the latest version, and while testing the shipping discount feature I encountered a problem. When the "finalize_discount" method is called "$this->info['total']" is not updated. When I turn on debugging, and modify it so that I can see the result of this statement in "classes\discount_coupon.php": $info['total'] -= $this->applied_discount['shipping']; "$info['total']" it is not updated ("$this->applied_discount['shipping']" is computed correctly). The results on "checkout_confirmation.php" are: Coupon xyz for 50% off shipping applied: -$5.50 Sub-Total: $89.90 DHL or USPS Priority Mail (Ground Shipping): $11.00 CO TAX 4.1%: $3.69 Total: $104.59 You can see that the -$5.50 discount has not been applied to "Total:" All of the computations are being done correctly, but, for some strange reason, the "$info['total']" variable just won't update.