Jump to content

Make Vouchers Include Shipping


Recommended Posts

I want to create a voucher for a user for a set amount (say $50).  I can do all that and have it working fine.  However, under Actions when I set the $50 to the Order, my only option is to the "Order (without shipping)."  I want them to be able to apply it to the whole thing.  Is there any way to make this happen?

 

 

 

Thanks.

Link to comment
Share on other sites

I am not opposed to editing a core file either, if I need to.  I have been playing with CartRule.php to try to make it work.  I try to just capture the shipping amount with the following line:

 

$myShip = $context->cart->getOrderTotal(false, Cart::ONLY_SHIPPING);
 
I add this after:
if ($filter != CartRule::FILTER_ACTION_ALL_NOCAP)
                                                        $reduction_amount = min($reduction_amount, $this->reduction_tax ? $cart_amount_ti : $cart_amount_te);
 
However, as soon as I add that line, the order page goes blank.  Any idea why this would be happening?  If I could get that amount, I can add it back in to $reduction_amount and make this work.
 
 
 
Thanks.
Link to comment
Share on other sites

  • 1 year later...

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...