These are chat archives for reactioncommerce/reaction

16th
May 2017
James Tann
@eltanno
May 16 2017 07:01
Is there any way to turn on a more verbose error logging on the front end? All I am getting from errors is “Oops! This page was not found.” with no output in the javascript console.
Brent Hoover
@zenweasel
May 16 2017 07:03
You can change the logging level by setting the environment variable: REACTION_LOG_LEVEL
James Tann
@eltanno
May 16 2017 07:07
Is there any chance you are updating the tutorials soon? I am feeling a little list and disheartened with learning reaction at the moment. I have a project that I need to start in earnest this week and reaction looks like a good base for me to build from, but im just guessing at some important things right now.
*little lost
Daniel Honig
@dhonig
May 16 2017 07:08
@eltanno what are your biggest issue right now
?
James Tann
@eltanno
May 16 2017 07:11
I spoke to Brent last night, the custom plugin tutorial needs updating. I understand you are still developing, so dont know when you will have time to update it. But at the moment I cannot get past https://docs.reactioncommerce.com/reaction-docs/development/plugin-customizing-templates-4
With some help from Brent I got the beesknees template displaying, but getting to the bottom of that tutorial the products template mentioned just does not work as mentioned either.
I would like to run from start to finish on the custom plugin tutorials without needing guidance. So that I can feel confident in writing my own plugins for the custom behaviour I need.
Daniel Honig
@dhonig
May 16 2017 07:13
let me check the products template
Brent Hoover
@zenweasel
May 16 2017 07:14
what exactly is the problem you are having?
James Tann
@eltanno
May 16 2017 07:14
The products template mentioned does not get used.
Brent Hoover
@zenweasel
May 16 2017 07:15
What branch are you working against?
and have you done a reaction reset?
James Tann
@eltanno
May 16 2017 07:15
this
Now we need to change the entry in our layout record in our register.js file. Just change the entry that says "template" to be “productsLanding”
does not exist
Ihave done reaction reset yes
To be honest, I am pretty lost and have gone back to the beggining multiple times to try again and see if i was being stupid. So may have gotten lost along the way
Brent Hoover
@zenweasel
May 16 2017 07:17
when you say “does not exist” what exactly does not exist?
and what branch are you working against?
James Tann
@eltanno
May 16 2017 07:19
I mean that there is nothing in the register.js for me to change from “template” to “productLanding” that I can see. I am however pretty confused and frustrated, so am possibly being stupid
Brent Hoover
@zenweasel
May 16 2017 07:19
You can’t find a “template” entry?
James Tann
@eltanno
May 16 2017 07:20
On this page https://docs.reactioncommerce.com/reaction-docs/development/plugin-layouts-3 We are told to update the register,js that already references productsLanding
so dont know what that is about
James Tann
@eltanno
May 16 2017 07:20
and even thoguh it is referenced, if I change the templace productsLanding.js to just have my name in it, it does not display that, its just showing things as normal
Brent Hoover
@zenweasel
May 16 2017 07:21
The best thing would be to compare your code with the completed version here: https://github.com/reactioncommerce/reaction-example-plugin
James Tann
@eltanno
May 16 2017 07:21
SO in the example you just sent me, it is already the same as what I have, that i was told to write on https://docs.reactioncommerce.com/reaction-docs/development/plugin-layouts-3 so where is the thing that I am told to change on https://docs.reactioncommerce.com/reaction-docs/development/plugin-customizing-templates-4 if there is nothing to change?
And why isnt it referencing that template if the first page already has it pointing at productsLanding?
sorry if this isnt making sense to you
Brent Hoover
@zenweasel
May 16 2017 07:22
Yeah, it’s not
James Tann
@eltanno
May 16 2017 07:23
If you start with a blank copy of reaction and follow the tutorials yourself Im sure you will see what I mean
Its not what?
Brent Hoover
@zenweasel
May 16 2017 07:23
I’m not getting what you are saying at all
James Tann
@eltanno
May 16 2017 07:24
Ok, i will start again and try to be clearer
Brent Hoover
@zenweasel
May 16 2017 07:25
Do you have your code in a repo somewhere I can look at?
James Tann
@eltanno
May 16 2017 07:28

I have followed the tutorials on your website for making a custom plugin. On the 4th page things do not work as expected.

First the beesknees template does not display unless I add in the server code you have mentioned. I need to know why.

Second, the products template mentioned does not get used. It mentions that i should CHANGE the register.js “template” to “productsLanding”, but that is already set as this from page 3. I dont know what to write into this template as there is nothing there to tell me. I have written in

<template name="productsLanding">
JIM JIM JIM JIM
</template>
Just to show that it is there, and imported it into the index as requested.

This template does not get used. The products still show as they did before.

Brent Hoover
@zenweasel
May 16 2017 07:29
Do you have your code in a repo somewhere I can look at?
James Tann
@eltanno
May 16 2017 07:30
No
I can upload it, 1 minute
Brent Hoover
@zenweasel
May 16 2017 07:34
Can you create a repo of just your plugin?
nvm, let me see if I can pull your stuff out of there
Loan Laux
@loanlaux
May 16 2017 07:36
Hi there! Quick question: are product sub-tags supported out of the box?
Brent Hoover
@zenweasel
May 16 2017 07:37
@loanlaux What’s a product sub-tag?
You can attach tags to products
Loan Laux
@loanlaux
May 16 2017 07:39
Sorry for not being clear enough. What I would like to have is categories (Printers, Monitors, etc...) and then tags inside them for sub-categories (Printers > Matrix Printers, Printers > Thermal Printers, Printers > Mobile Printers, and so on). So I basically thought that this could translate into Tags for the big categories, and then Tags with an ancestor property for the sub-categories
So is this supported out of the box as of today or should I modify the Tags schema?
Brent Hoover
@zenweasel
May 16 2017 07:40
Yeah, I believe you can have a heirarchy of tags
my machine is currently struggling to startup or I could point it out to you, but in the tag editor in the header you can define parent and child tags
Loan Laux
@loanlaux
May 16 2017 07:42
Oh that's great! I'll just use that feature then
Thanks for answering my question
Brent Hoover
@zenweasel
May 16 2017 07:44
I don’t see an “ancestor” field like products so I don’t know exactly how that works
Loan Laux
@loanlaux
May 16 2017 07:46
"relatedTagIds" I guess, that's what caught my attention in the schema
Brent Hoover
@zenweasel
May 16 2017 07:47
yh it might just go two levels, top and not top
not infinitely recursive like products
Brent Hoover
@zenweasel
May 16 2017 07:50
@eltanno Have you tried cloning the reaction-example-plugin and seeing if that works for you?
Daniel Honig
@dhonig
May 16 2017 07:51
I found that the was the best strategy for me
then I started replacing the examples with my own custom templates and CSS
After that I decided to study the entire blaze templating system and then things started clicking
Brent Hoover
@zenweasel
May 16 2017 07:53
there may be some duplication because I attempted to make the chapters stand-alone as well as part of a complete tutorial because people often ask “how to I do X?"
James Tann
@eltanno
May 16 2017 07:53
I have, it does. I need to follow instructions to be able to learn correctly. Im sorry, this has been frustrating as it is making me feel like im stupid. I hope you understand that it is resonable of me to assume that the tutorials on your site should guide me to be able to understand how to write the code. I can go it alone and just download the example and hack it around, but i am looking for a better understanding of why things are done as they are and the proccesses used so that I may write my own plugins better.
Daniel Honig
@dhonig
May 16 2017 07:54
@eltanno certainly a reasonable expectation to me
Brent Hoover
@zenweasel
May 16 2017 07:55
Right. Obviously. I only ask to make sure there is not some other issue at play. When people ask me “why doesn’t my code work?” that question has almost limitless answers
If the “finished” tutorial works for you then I know at least we have the same expectation for what “works” means
James Tann
@eltanno
May 16 2017 07:56
It will be my own issues with learning at play here, I can litterally not move onto the next step without completing the one I am on.
Brent Hoover
@zenweasel
May 16 2017 07:56
You also have to understand that people do run through this tutorial all the time.
@eltanno Yes, I am trying to help you. Not sure how you are getting that I am not trying to help you understand.
James Tann
@eltanno
May 16 2017 07:57
I am, im sorry. I am appriciative, just trying to explain myself
Its not judgmental,
Brent Hoover
@zenweasel
May 16 2017 07:59
You will just need to give me a few minutes while I bring up your code. My machine is not super fast.
James Tann
@eltanno
May 16 2017 07:59
I am honestly very greatful that you are taking the time to write back, my comment there was just supposed to be an explanation
Brent Hoover
@zenweasel
May 16 2017 08:09
WHen you say the productsLanding template doesn’t render, what does render, anything?
James Tann
@eltanno
May 16 2017 08:13
The products are appearing as normal, its as if the productsLanding template is not referenced anywhere
Brent Hoover
@zenweasel
May 16 2017 08:14
Try changing the value of workflow to be coreProductGridWorkflow. Reset and reload
in register.js
James Tann
@eltanno
May 16 2017 08:14
in both register.js & client/default.js
Brent Hoover
@zenweasel
May 16 2017 08:15
just register.js
James Tann
@eltanno
May 16 2017 08:16
and is this a database reset, or just restart?
Brent Hoover
@zenweasel
May 16 2017 08:16
reaction reset
James Tann
@eltanno
May 16 2017 08:16
thanks
Brent Hoover
@zenweasel
May 16 2017 08:16
You need to do a reset whenever you make a change to register.js
At least right now
James Tann
@eltanno
May 16 2017 08:17
cool, i will remember that. I think that was written in the guide, but I may have forgotten to do it once or twice.
Brent Hoover
@zenweasel
May 16 2017 08:18
it’s easy to forget which is why it’s the first thing I ask
James Tann
@eltanno
May 16 2017 08:22
It looks the same
Brent Hoover
@zenweasel
May 16 2017 08:24
bummer
James Tann
@eltanno
May 16 2017 08:24
Do you have an example of what it should look like for me to compare it to?
Brent Hoover
@zenweasel
May 16 2017 08:25
yeah, in the reaction-example-plugin
that’s what I am doing is comparing the two to see if I see any differences
James Tann
@eltanno
May 16 2017 08:25
Sorry, I mean the coreProductGridWorkflow
I had not seen it, but there seems to be no visible difference on my screen
Brent Hoover
@zenweasel
May 16 2017 08:27
well, it should be displaying your template. So it should just display “productsLanding template” rather than the product grid
So it wouldn’t be subtle
James Tann
@eltanno
May 16 2017 08:27
:)
Brent Hoover
@zenweasel
May 16 2017 08:27
ok, give me a second to look at this more. I was sure that was it
I’m still trying to start my Reaction with your plugin in it, not sure why my machine is so dang slow this afternoon
James Tann
@eltanno
May 16 2017 08:28
No worries, thanks for the effort.
Have you been working since your first contact last night?
Brent Hoover
@zenweasel
May 16 2017 08:30
Yes. I am in GMT+8
so it’s just 4:30 in the afternoon
James Tann
@eltanno
May 16 2017 08:30
First contact with me that is, sorry. That has been a long day for you
Im in GMT
Brent Hoover
@zenweasel
May 16 2017 08:30
Yep
James Tann
@eltanno
May 16 2017 08:31
I owe you a beer for the help.
Brent Hoover
@zenweasel
May 16 2017 08:31
lol, nope. Sorry if my mistakes wasted your time.
Can you remove the Session.set("DEFAULT_WORKFLOW", "coreWorkflow”); from defaults.js?
You should just need to restart, not reset
James Tann
@eltanno
May 16 2017 08:40
no change :/
Brent Hoover
@zenweasel
May 16 2017 08:41
Hmmmm
So here is what I would propose since I have my team in Africa coming online in about 15 minutes which I need to go deal with. If you can compare your code with the example-plug and see where there is a difference. If you can find a difference and that fixes it and you can’t understand why something worked the way it did then come back here and I will go through it with you and we can correct the tutorial.
Brent Hoover
@zenweasel
May 16 2017 08:46
I am online from about 5:30am to 9pm PHT every day
James Tann
@eltanno
May 16 2017 08:50
thank you Brent. You have been very helpful
Brent Hoover
@zenweasel
May 16 2017 08:51
Sorry for the frustration James
Vigy
@vigyano
May 16 2017 09:25
@zenweasel there is a doc for extending Blaze templates, is there any for extending or overriding existing react components?
Brent Hoover
@zenweasel
May 16 2017 09:46
@vigyano Honestly the only one that’s easy to override right now is the Product Detail Page. Is that what you are talking about?
JonasKopka
@JonasKopka
May 16 2017 11:09
btw. For Heroku Deployment. It works you just have to modify the .gitignore so that your plugins are loaded
Darren Ackers
@dackers86
May 16 2017 11:21
Hi Guys. This project looks amazing, however i'm struggling to get started! Is this available to start using? i'm the sole eveloper trying to avoid projects like Shopify (which has proven to be a nightmare!)
Seun Martins
@impactmass
May 16 2017 11:25
Hi @dackers86, yes it’s available to start using. but what particular thing are you struggling with in getting started?
Darren Ackers
@dackers86
May 16 2017 11:36
Thanks Seun. The demos appear to show a form of logging in to start the system
Is this type of solution hosted, or can I pull down the code and simply host myself?
Seun Martins
@impactmass
May 16 2017 11:41
yes, you can pull down the code and host yourself… since the core of the code is open source https://github.com/reactioncommerce/reaction
Brent Hoover
@zenweasel
May 16 2017 11:42
That video is almost 3 years old
Seun Martins
@impactmass
May 16 2017 11:43
and I’m actually seeing it for the first time
Brent Hoover
@zenweasel
May 16 2017 11:43
Me too
Darren Ackers
@dackers86
May 16 2017 12:18
Thanks @zenweasel . I've started the app locally, I believe i'm supposed to get the admin details for a login? Hoping I havn't missed a step!

=> Started proxy.
=> Meteor 1.4.4.2 is available. Update this project with 'meteor update'.
=> Started MongoDB.
12:16:51.233Z INFO Reaction: Load default data from /private/data/
12:16:51.511Z INFO Reaction: JobServer started
12:16:51.521Z WARN Reaction: Skipped loading settings from reaction.json.
12:16:51.521Z INFO Reaction: Loaded "/private/settings/reaction.json" for registry fixture import
12:16:56.207Z INFO Reaction: Reaction Version: 1.1.1
12:16:56.273Z WARN Reaction: OpenExchangeRates API not configured. Not adding fetchRates job
12:16:56.279Z WARN Reaction: OpenExchangeRates API not configured. Not adding flushRates job
12:16:56.285Z WARN Reaction: No cart cleanup schedule
12:16:56.572Z INFO Reaction: Reaction initialization finished.
=> Started your app.

=> App running at: http://localhost:3000/

Brent Hoover
@zenweasel
May 16 2017 12:21
You only get it on first run
If you missed it you will need to reaction reset and restart
Daniel Honig
@dhonig
May 16 2017 15:44
I'm looking for an example of an extension that has tests that depend on reactioncommerce:core
I need to supply core as a dependency of my tests it seems and I can't find an example
Vigy
@vigyano
May 16 2017 16:14
@zenweasel yes want to override the prices in details page.
Anthony Young
@ayoungh
May 16 2017 21:17
Hi All, looking at the docs for routes and a little confused as to what register.js file I should be editing to add a custom route. Is this unclear because static pages are not ready yet?
is this the register file I have for my custom theme? sorry if this is me being a bit silly...new to reaction
Daniel Honig
@dhonig
May 16 2017 21:18
@ayoungh
create a plugin according to the "customization" guide
under imports/plugins/custom/my_store
then under my_store
create a client and server directory
inside of client
create an index.js
and import any resources you will be using
then if you have a template imported from say client/templates/about.html
then you can use that template in layouts defined in the register.js
Anthony Young
@ayoungh
May 16 2017 21:22
Thanks @dhonig I will defo give this a try :)
thats a minimal example that defines an about page
and pulls in an "aboutUs" template from /client/aboutus.html
which is included from client/index.js
@ayoungh if your not lucky from the get go, then just install this theme
then you can start playing with it and get a feel for how the plugin system works
Anthony Young
@ayoungh
May 16 2017 21:27
I copied this theme over and changed the file to your example
does the about us html file need to be a normal static html structure
or just what is needed inside the body tag
:)
Daniel Honig
@dhonig
May 16 2017 21:27
no
Anthony Young
@ayoungh
May 16 2017 21:27
thanks for your help
Daniel Honig
@dhonig
May 16 2017 21:27
it needs to have a blaze template
Anthony Young
@ayoungh
May 16 2017 21:27
ahhh
makes sense
Daniel Honig
@dhonig
May 16 2017 21:28
<template name="aboutUs">
defined
@ayoungh I'm headed out for a bit, but I'll check back later....There is a better example extension that follows along with the customization guide
"BeesKnees"
you can check that out too
Anthony Young
@ayoungh
May 16 2017 21:29
Awesome
thanks dude
Daniel Honig
@dhonig
May 16 2017 21:29
You got it