Jump to content

Voucher causes Server Error?


pmfjoe

Recommended Posts

I am having a problem with "Discount on order (amount)" vouchers. Free shipping and % vouchers work fine. Basically what happens is I get an Internal Server Error when you try to add the voucher to the cart. Any ideas on how to trouble shoot this?

As an FYI since I don't know if this could be the cause I do have the Better Together module installed.

Link to comment
Share on other sites

So after some additional research the error being thrown is: Fatal error: Call to undefined method Cart::gettaxesaverageused() in xxxxxxxx\html\presta13xbeta\classes\Discount.php on line 262

I commented out Line 262 to 265 which contains:


                $taxDiscount = Cart::getTaxesAverageUsed(intval($cart->id));
               if (!$useTax AND isset($taxDiscount) AND $taxDiscount != 1)
                   $this->value = abs($this->value / (1 + $taxDiscount * 0.01));



and that seemed to solve the problem and the vouchers now work without error. I am not sure why this would cause an error as I have never changed any of this. I also don't know what removing the offending lines will do in the future.

This is Presta version 1.3.2.3.

Link to comment
Share on other sites

  • 3 weeks later...

It turned out the better together module (at least if you just use the already modified files that come with it) causes problems in version 1.3.2 and 1.3.3. So ultimately I dumped it because it caused other issues. And there were no manual instructions available to edit the order.php and other files which were included. It really is a nice module in and of itself but because of the hooks it can cause issued with updates.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...