7

The Enterprise_GiftCard module's generateGiftCardAccounts() fires off of sales_order_save_commit_after.

This seems to be causing the gift cards to be generated even when the order isn't actually placed (due to an invalid credit card let's say).

From a quick test, I changed the observer to sales_order_place_after and it appears to work like a charm.

I'm seeing this on EE 1.12.0.2, but I've checked the latest EE (1.13.1.0) and it uses the same observer.

UPDATE: I think maybe my actual question wasn't clear. So the question is - do you know whether this is a known issue for the EE GiftCard module? Is there any simple fix for this.

It seems like changing the Generate Gift Card Account when Order Item is config value from Ordered to Invoiced might fix the issue. But if that's the case, it seems like there is a core bug with the Ordered value, which would be good to know.

1
  • It looks like maybe all I need to do here is use System > Configuration > Gift Cards > Gift Card General Settings > Generate Gift Card Account when Order Item is - change from "Ordered" to "Invoiced" Jan 31, 2014 at 16:46

2 Answers 2

3

Looks like the fix is to go into System > Configuration > Gift Cards > Gift Card General Settings and change Generate Gift Card Account when Order Item is from Ordered to Invoiced.

2

Just some more info:

I think you are right about the core bug here. 'Ordered' value should not redeem the gift card until the order is completely placed. 'Invoiced' will fix the problem, however gift card number (account) will not be created till the order is invoiced. Also, if you have "Authorize & Capture" as Payment action (System > Config > Payment Methods) then it will automatically generate the invoice.[Tested on Magento ver. 1.13.1.0]

Hope this helps to someone.

...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.