These are chat archives for reactioncommerce/reaction
Hello everyone. I am having a little trouble following the Reaction codebase and can’t seem to trace how the price is reflected on the main product dashboard, as it doesn’t change when I effect changes in the main product. I am trying to filter products by price range. Currently, the price filter only seems to pick up on the `basic example’ range and only for the two default variants. A new product when created also doesn’t show the price on the main dashboard.
Are there any good resources/tips you could share with me that address this? The documentation and other resources I am finding do not seem to quite address the problem I am facing.
TypeError: Cannot read property 'toString' of null at /private/var/folders/xt/h63m6n8n7d1dgqqb08mhbrvc0000gn/T/shelljs_cbde548dde55b2abcf10:10:37
Guys, thanks for the help from yesterday.
It finally managed to create a route and render a page for this route.
Incredibly simple ...
step 1 - meteor add simple:rest
step 2- restart app
step 3 - call localhost:3000/publications/api-routes
Only chose one API REST and get you DATA in json
I understand your need.
I'm also new with Reaction, it does not bring standard API exposure.
This was the way I found to expose API, however it ends up making exposure to all memso routes.
Reaction works from DDP, I still do not know how it would be to expose a single route.
Does anyone know how to answer this question?
Hi @danielpinna and @v3yr0n
It’s been a while since I’ve done this, and haven’t done it in a recent version of Reaction, but I’d imagine that it would still work
When I was at GetOutfitted we defined a number of JSON endpoints with https://atmospherejs.com/simple/json-routes
I created a new custom route and a page and now I would like to add a link to them in Reaction's administrative bar when I was logged on as an administrator.
I believe this is the configuration of this register.js file.
@v3yr0n another thing you could look at would be how we use provide a different layout/template for order “PDFs” in the orders plugin
Again, you’ll probably have to do some digging and experimenting, but it’s another option that might be a way you could return XML
Guys, I've created 3 routes in a custom plugin.
I called the routes through the tag (a href), it worked, but it always causes refresh on the page. Probably by the way I called it with the tag (a href).
What would be the correct way to call the new routes without causing refresh on the page?
Router.go("/path")in a click handler or React Router’s
<Link to="/path" />component
@jshimko @zenweasel I'm trying to deploy a build of reaction. I tried the build command once as root user and it failed. I figured it might have been because I was root user, so i'm trying to do it from a non-root user now, but I am getting this error.
[....@.... reaction]$ reaction build test
Setting up plugin imports...
Failed to reset plugins file at /home/sweetgra/reaction/client/plugins.js
I have an question, propably related to ProductDetailContainer:
Due to the way my shop works, when a variant is selected, i need to auto point to the first option(Like, clicking the variant and then manually clicking the option)
How can I accomplis this the easiest way?
In the PD Container there is: const selectedVariant = ReactionProduct.selectedVariant(), which I also use in several other methods
But changing selectedVariant to the first option probably would work properly, as the real product selected would still be the top variant
when you update the
selectedVariant you should be able to also update the router (Router.go should work I think)
If you use
ReactionProduct.setCurrentVariant I think that should cause
selectedVariant() to return the correct variant
I went around my first problem by initializing a new reaction solution.
Now, I am encountering this error while trying to build a reaction deployment from a non-root user. It seems the build cannot even initialize since the user does not have permission to /var/run/docker.sock. But, when I tried doing a build as a root user I also ran into an error. I am very confused. @jshimko @zenweasel any ideas?
[user@myserver reaction_test]$ reaction build testr
Setting up plugin imports...
Setting up style imports...
Starting Docker build...
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.30/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=test5&target=&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied
Error: Docker build failed. Exiting.