These are chat archives for reactioncommerce/reaction

27th
Feb 2016
Owen Hoskins
@owenhoskins
Feb 27 2016 00:36
@aaronjudd Hey Aaron, over the last couple days I have been getting the 404 page consistently when hitting the site for the first time in a new incognito window. I can help get to the bottom of this, maybe you have some thoughts about what might be causing that?
Spencer Norman
@spencern
Feb 27 2016 00:37
@owenhoskins can you reproduce this on a clean repository? What version are you using? I’m unable to reproduce on my local.
Aaron Judd
@aaronjudd
Feb 27 2016 00:55
@owenhoskins you’ll get a 404 if the routes aren’t loaded, or there is an error on the page loading. The first thing I’d do is check the routing table: console.table(ReactionRouter._routes);
and make sure it’s populated (most importantly, “/“)
I’ve not been seeing that either though
@owenhoskins when you say “completed the order” do you mean, when the user has placed an order, or when the admin has fulfilled the order? (and that logging output is just saying that there was no inventory found so it created a backorder.. try updating the inventory in the product you are testing before adding to cart - it might just be that the default variant’s inventory wasn’t created - I think this doesn’t happen until the variants get modified or saved )
Aaron Judd
@aaronjudd
Feb 27 2016 01:05
regardless, it’s making a “reservation”, which is correct behavior when adding to cart, so the question is more why didn’t it find a qty of “1”...
Owen Hoskins
@owenhoskins
Feb 27 2016 02:05
@aaronjudd Thanks for the responses, I am just getting back to my cpu... Regarding the 404, it looks like the routes are loaded, no other errors in the console or server. I'll try this with a fresh copy to verify.
Owen Hoskins
@owenhoskins
Feb 27 2016 02:24
@arronjudd, @spencern: Just tested with a freshly pulled development version. I hit a 404 page and the Route tables are populated. I did need to comment out launchdock, payment-gateway, brain-tree, and paypal packages to get it running, because of ReferenceError: Router is not defined errors coming from those packages, but that wouldn't be a reason..?
Owen Hoskins
@owenhoskins
Feb 27 2016 02:54
@aaronjudd Regarding the Inventory, on a fresh install, it seems like the the reservation system just does not update the variant's inventoryQuantity. I have manually adjusted the quantity of the variant to make sure it was created, as you suggested. The Inventory logs look to be keeping track, I see the "availableInventoryQty" ticking down in the when items are added to the cart. Yet it does not alter that Product Variants inventoryQuantity. I tested the order capturing as well but also no effect!
@arronjudd, @spencern: Actually, regarding the 404 pages on a fresh install, I am having a hard time reproducing it now... it definitely happened initially. Aaron you said something about seeing this kind of behavior on restart?
newsiberian
@newsiberian
Feb 27 2016 03:59
@owenhoskins, hi, where was some work done with inventory in #741, you could try it if you want
Owen Hoskins
@owenhoskins
Feb 27 2016 04:12
@newsiberian thanks, I'll keep my eye on this!
Brent Hoover
@zenweasel
Feb 27 2016 04:47
@owenhoskins Usually the Router is not defined error comes from having an old (pre-v12) version of the package. Did you do a reaction pull?
Spencer Norman
@spencern
Feb 27 2016 08:25
Really late on this, but still updating some packages from 0.9.x
In 0.9.x we could mutate the price of an item in the cart with an addToCart hook where we would adjust the arguments after they were passed into
e.g. the addToCart example here: https://github.com/reactioncommerce/reaction/blob/v0.9.2/docs/developer/hooks.md
Spencer Norman
@spencern
Feb 27 2016 08:33
This worked because previously the addToCart method passed the variant object. Now we are just passing the productId, variantId, and itemQty
Previously we used this functionality to fix a price to an item in a cart based on a daily rate for a product variant and a length of time that was set in the cart
I’m guessing the best way to go about this now is to create a new product type and push that calculation out to the checkout process and just display a temporary price in the cart, but am open to other suggestions
newsiberian
@newsiberian
Feb 27 2016 08:45
@spencern, you could fetch variant data by variantId, no?
Michael Jenny
@prinzdezibel
Feb 27 2016 14:25
hi. before flow-router I was able to override the template name that's used for rendering the index page. Now I can't find a way how to do this with flow router. Any ideas?