The module is supposed to save a new offer and display an offer page after checkout, but on line 115 the code only runs if the order status changes from in_checkout to _postcheckout:

	  if ($old_state == 'in_checkout' && $new_state == 'post_checkout') {

After some debugging, I've found that the only status I get when the order gets updated is 'completed', so I changed the line:

	  if ($new_state == 'completed') {

Seems to work okay now. And customers can visit the uc_viral/offer page to see the offer again.

Comments

mattcasey’s picture

Status: Active » Closed (works as designed)

This may only be a special case issue. I just realized this only works for my use case - I want to discount a recurring fee that is charged after the first completed payment, and I did not test to see if it works as designed if you have "Authentication required" set.