What I did:
- I enabled the ubercart purchase coupon component of the module.
- Created an inactive coupon and assigned a coupon creation feature in one of my products.
- When I simulated a purchase, no coupon codes got generated/activated. No email was sent to the user with any code.
- I figured since I am on a development environment and am using the Test payment gateway, the order process goes to 'payment received' and not to 'completed'; and maybe this might be the problem. So I manually changed the status for the order to 'completed'.
- This successfully created a new purchased active coupon.
- However the email to the user is still not being sent.
- The email setup is fine, because all other emails including order confirmations reach their destination the way they are supposed to.
- What am I missing? Are there any steps I missed out in the above configuration?

Comments

Poieo’s picture

Any chance you're testing this as an anonymous user? I know anonymous users can't purchase coupons...just the way the module works.

Also, you can set the order status that triggers the coupon creation here:

http://yoursite.com/admin/store/settings/products/edit/features

But again, this still does not work for anonymous users.

v-a-1’s picture

>Any chance you're testing this as an anonymous user?
Nope. In fact for various reasons, the site is set up such that only registered users can purchase products.

>Also, you can set the order status that triggers the coupon creation here:
>http://yoursite.com/admin/store/settings/products/edit/features

Thanks!! I had no idea.

My original problem still persists though...

v-a-1’s picture

bump

Poieo’s picture

Did you try setting the order status to 'payment received' rather than 'completed' here: http://yoursite.com/admin/store/settings/products/edit/features

That's where I have mine set and it is working fine.

v-a-1’s picture

Thanks for that! It worked.

I guess manually updating the order status somehow doesn't trigger the emailing.
But changing the settings to payment received does.

Thanks again.

wodenx’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this behavior on a clean install, either for D6 or D7, whether checkout is anonymous or not.

If check-out with a purchased coupon using the test gateway, the coupon is activated and the email is sent.
If i check-out with a purchased coupon using the "check" payment method and then manually change the order status (at admin/store/orders/%) to completed, the e-mail is sent.
I don't have to change the order status to "payment received" in order for this to work.

so.. this must mean there is some other module interaction. If you can post a list of the modules you have installed (the results of "drush pm-list"), maybe we can figure it out...

welly’s picture

I'm currently finding that if the bank transfer module is used and a payment is made with a bank transfer, even if the order is updated to "payment received" or "complete", the email isn't being sent out.

tfranz’s picture

Me too: bank transfer and manual setting "payment received" ...

... any solution for this??

I think it could be the trigger at the conditional actions: "Customer purchases a coupon" – when does it happen?
It should be (in my opinion/case) "payment received"!?

tfranz’s picture

Okay, here is the (simple) solution for my problem:

I selected the wrong SKU in the features:

"Select the model/SKU of the product that cause a coupon to be created."
I selected the title in here – and it didn't work.
Changing it to "Any" makes my problem disappear ...

Thanks for this great module!
:-)

wodenx’s picture

Hm - still can't reproduce - if I select a valid SKU, then the coupon is created. I'm not sure what you mean by "I selected the title in here" - the title is not an option (just the SKUs).
Had you perhaps changed the SKU for the product? If so, you would also need to update the SKU on the feature form.

tfranz’s picture

I'm sorry ... yes, i'm using the title of the product as the SKU ...
Could it be a problem for the coupon-purchase using something like "Geschenkgutschein über 10,– Euro" as a SKU? Quite a lot of blank spaces and an umlaut.
Can't test it for myself in the moment – it's already in production. And at least it works for me as described above ...