These are chat archives for reactioncommerce/reaction

31st
Jan 2017
Michael Duane Mooring
@mikeumus
Jan 31 2017 03:46
Trying to startup my repo on a new server and am getting this: BlazeLayout warning: unknown template "coreLayout"
Brent Hoover
@zenweasel
Jan 31 2017 03:47
that means the build didn’t complete
Michael Duane Mooring
@mikeumus
Jan 31 2017 03:48
oh
errored out maybe?
Brent Hoover
@zenweasel
Jan 31 2017 03:48
could be
Michael Duane Mooring
@mikeumus
Jan 31 2017 03:49
it keeps doing the same thing when I rc run so maybe I need an rc reset
Brent Hoover
@zenweasel
Jan 31 2017 03:50
when you see that error, it means it didn’t finish compiliing all the files
Michael Duane Mooring
@mikeumus
Jan 31 2017 03:56
k, rc reset didn't do it. somehwere in the code. Thanks @zenweasel
I'll track it down.
Dan Castellon
@dancastellon
Jan 31 2017 20:33
Hey folks! I'm evaluating RC for a new ecommerce project I'm going to be working on for a healthcare client of mine. This morning I dug in and created a simple plugin based on the example one in the docs. My first question - is there a way around having to completely reset RC any time I edit a plugin's registry definition? Could I write a migration that deletes the doc from the Packages collection so it can be regenerated? Is there a before init hook I could do it in?
Spencer Norman
@spencern
Jan 31 2017 20:35
Yes you could do that. Deleting the package doc should be sufficient. I not sure if there are any hooks in Reaction.init()but you could hack it in during devleopment
Dan Castellon
@dancastellon
Jan 31 2017 20:38
ok cool, thanks @spencern. During the initial development when the app's just on my local, deleting the doc is easy enough, but once we start to deploy to dev/stage/prod servers I'll want to easily be able to update it. I'll checkout the available hooks and try a migration.
Spencer Norman
@spencern
Jan 31 2017 20:39
:+1:
Dan Castellon
@dancastellon
Jan 31 2017 20:41
Another question I had - I'll need to customize checkout to remove shipping and credit card payments. My use case is pretty unique. Customers (employees of said healthcare company) will be purchasing software subscriptions, and will be "paying" by entering G/L fields. I assume what I need to do is remove the templates I don't want in checkout (via editing a Packages doc), and writing a custom template + method that saves the G/L fields to the order and "completes" the order. Is that right?
Spencer Norman
@spencern
Jan 31 2017 20:43
Yeah, we’ve customized the checkout pretty substantially for our use-case as well. It’s slightly more complicated because there’s a State Machine-esq workflow that makes sure the user is shown the right steps of the checkout and re-runs calculations (shipping/tax etc) if things change.
Dan Castellon
@dancastellon
Jan 31 2017 20:44
Nice. Sounds like it should all be possible without editing core
Spencer Norman
@spencern
Jan 31 2017 20:44
The first step would be to remove the templates from the package / workflow
I’d say it’s mostly possible
there are a few steps of the checkout flow that are coded into core pretty rigidly right now
We’re also a few versions back, so it’s possible that some of these things have become easier
Dan Castellon
@dancastellon
Jan 31 2017 20:45
Ok, I've done the first part as a test with a Packages.update call in the after init hook.
Spencer Norman
@spencern
Jan 31 2017 20:46
see server/methods/core/cart.js for where there are a few hard-coded checkout steps
Dan Castellon
@dancastellon
Jan 31 2017 20:46
Hmm I see
Spencer Norman
@spencern
Jan 31 2017 20:46
We’ve forked a few core files, but it hasn’t been too bad for us
Dan Castellon
@dancastellon
Jan 31 2017 20:47
yeah that's what I was thinking - I could probably copy those methods to my plugin, make changes, and have my custom templates call my new methods
Spencer Norman
@spencern
Jan 31 2017 20:47
that’s pretty much what we did
Dan Castellon
@dancastellon
Jan 31 2017 20:47
sweet. ok
How long have you been using RC? Has it been fairly straight forward updating?
If you don't mind me asking.
Spencer Norman
@spencern
Jan 31 2017 20:48
yeah, it’s been pretty good - we’ve been using it in production for about 13 months
Dan Castellon
@dancastellon
Jan 31 2017 20:49
awesome
Spencer Norman
@spencern
Jan 31 2017 20:49
it was harder at first because we had more elements of core forked, but as we’ve updated we’ve been able to adopt more and more of the core and recommend plugin/package structure
it’s still “pre-release” stage software, but for us it was better than any of the alternatives
Dan Castellon
@dancastellon
Jan 31 2017 20:49
yeah
nice
Spencer Norman
@spencern
Jan 31 2017 20:49
and it’s getting better at a rapid rate
Dan Castellon
@dancastellon
Jan 31 2017 20:49
ok I'm sold. I'll be using RC for this next project :)
Spencer Norman
@spencern
Jan 31 2017 20:50
:D
Dan Castellon
@dancastellon
Jan 31 2017 20:50
Thanks again for the help @spencern !
Spencer Norman
@spencern
Jan 31 2017 20:50
This chat / community is also pretty active which is super helpful
:D any time
Aaron Judd
@aaronjudd
Jan 31 2017 21:43
@dancastellon @spencern I think we’ll be looking again at the checkout soon, as we look to more using more react components, we’ll probably want to the checkout to become more like the latest version of the product detail page, where all the components are stored in the Templates cllection. This should make the it all a bit more flexible, but happy to look at the place where things feel a little hardcoded, I feel like we’re making progress on decoupling these things.
Spencer Norman
@spencern
Jan 31 2017 21:45
:+1: The main place we noticed it was in some of the cart methods
specifically cart/addToCart, and cart/removeFromCart which calls workflow/revertCartWorkflow with a specific step of the original checkout process
cart/copyCartToOrder also has specific workflows hardcoded to reset a customers cart after an existing cart is transitioned to an order
cart/setShipmentMethod, cart/setShipmentAddress, and cart/unsetAddresses all call workflow/pushCartWorkflow or workflow/revertCartWorkflow with specific steps
Spencer Norman
@spencern
Jan 31 2017 21:51
We ended up just overwriting the lines in that file server/methods/core/cart.js to use our custom cart workflow, but interested if there’s a different/better way than that