These are chat archives for reactioncommerce/reaction

28th
Sep 2015
Paul Grever
@paulgrever
Sep 28 2015 19:49
Quick question - where is the Facebook login configured? The button to login with Facebook is in the app initially without any setup or configuration, but it doesn’t work.
Spencer Norman
@spencern
Sep 28 2015 20:19
@aaronjudd are the checkout Method hooks documented anywhere currently?
Mike Murray
@mikemurray
Sep 28 2015 20:20
added a service configuration UI for all available services
Aaron Judd
@aaronjudd
Sep 28 2015 20:22
@spencern the method hooks themselves, or the specific methods?
but the answer, is really - no.. I’d take a look at methods/hooks/hooks.js
that adds a .before, .after hook to every method
Spencer Norman
@spencern
Sep 28 2015 20:24
haha, ok. That’s probably what we’re looking for. Essentially we need to trigger an API call to a third party provider after checkout has completed.
My guess is that an .after hook will be fine. I’ll checkout the hooks.js file
Paul Grever
@paulgrever
Sep 28 2015 20:25
@mikemurray cool thanks for the update. Will check it out.
Aaron Judd
@aaronjudd
Sep 28 2015 20:25
I’d hook on to “workflow/pushCartWorkflow”, and check the workflow state (“orderCompleted”) or payment,etc.. probably more flexible than any other method
Spencer Norman
@spencern
Sep 28 2015 20:25
Ok, perfect.
Spencer Norman
@spencern
Sep 28 2015 20:38
So something like this or do we need to namespace it in someway?
ReactionCore.MethodHooks.after(‘orderCompleted’, myFunction())
Aaron Judd
@aaronjudd
Sep 28 2015 20:38
that’s it
Spencer Norman
@spencern
Sep 28 2015 20:39
and is the order object saved and available to be passed to myFunction(order) in some way?
Aaron Judd
@aaronjudd
Sep 28 2015 20:42
sorry - all I can give is pointers here, as I’ve not used it very much - just in a couple test cases. my brain is elsewhere in another branch ;-)
Spencer Norman
@spencern
Sep 28 2015 20:44
No worries. Thanks for the reference
Spencer Norman
@spencern
Sep 28 2015 20:49

:notebook: according to Hitchcott:

the hooks will recieve the same parameters as the original method.

Which makes this super easy :)
Aaron Judd
@aaronjudd
Sep 28 2015 20:50
:thumbsup: we’re using a twice over descendant of his code, but everything should still work the same
Spencer Norman
@spencern
Sep 28 2015 20:50
:+1: I’ll file a report if it doesn’t, but I don’t forsee any problems
Joey Nenni
@joeynenni
Sep 28 2015 23:00
excited about tomorrow's beta!
Bryan Wu
@cooloney
Sep 28 2015 23:06
@joeynenni same here
can't wait
by the way, does our beta support wishlist during shopping?
Joey Nenni
@joeynenni
Sep 28 2015 23:15
its open beta right?
or do i need to sign up?