These are chat archives for reactioncommerce/reaction

12th
Jul 2017
danielpinna
@danielpinna
Jul 12 2017 02:09
I'm creating a custom plugin. I need to create a template that receives content from other templates, that is, a dynamic template.
How to make a dynamic template in reaction commerce?
Does anyone know how to do this?
Brent Hoover
@zenweasel
Jul 12 2017 02:22
You can render a template dynamically (that is, have which template rendered by dynamic) like we do here: https://github.com/reactioncommerce/reaction-example-plugin/blob/master/client/templates/layouts/core.js#L25
or you can just use variable to specify the template name if it’s from another Blaze template
<footer class="reaction-navigation-footer footer-default">{{> Template.dynamic template=layoutFooter}}</footer>
Jeremy Shimko
@jshimko
Jul 12 2017 02:25
@beartusk you need to allow your non-root user to use Docker. The Docker socket is owned by root.
https://docs.docker.com/engine/installation/linux/linux-postinstall/
danielpinna
@danielpinna
Jul 12 2017 02:27
@zenweasel
I confess I had already seen the link and it had gotten a bit confusing ...
But now with this second form, I think I understand ...
I'll test here.
Thank you
Brent Hoover
@zenweasel
Jul 12 2017 02:30
:+1:
danielpinna
@danielpinna
Jul 12 2017 03:52

@zenweasel

Hello Brent, en tried to do here the example that you suggested but I did not succeed ....

I have a main template and inside this main template I inserted the line below:

{{> Template.dynamic template = layoutNew}}

I do not know how to make a link that when clicked will pass the information to this dynamic template block.

Would you have any examples of this?

Brent Hoover
@zenweasel
Jul 12 2017 03:55
So, normally child templates have the scope of their parent templates available to them
so you may not necessarily need to pass data
danielpinna
@danielpinna
Jul 12 2017 03:58
I'm doing something wrong, because I created a template that I called principal and created other templates. There is no hirarchy between them ....
Brent Hoover
@zenweasel
Jul 12 2017 03:58
{{> UI.dynamic template=myTemplate data=myDataContext}}
if you are trying to dynamically create templates, I am not sure that’s possible
if so, that’s beyond my knowledge
danielpinna
@danielpinna
Jul 12 2017 04:02
I am not creating dynamically no. I will review the code and look at the link that passed me. Thank you
danielpinna
@danielpinna
Jul 12 2017 04:59

I'm getting ugly to work with dynamic routes.

Can anyone help me figure out what I'm doing wrong?

Here is my template

And here is the JS file for this template

If anyone can help, I'll be grateful, I'm on time to do this.

hengsoheak
@hengsoheak
Jul 12 2017 06:03
:)
danielpinna
@danielpinna
Jul 12 2017 17:30
Finally I managed to create a dynamic template for my plugin !!!
I added this code in my JS:
BlazeLayout.setRoot ('content');
And in html I left the dynamic part like this:
<Content>
{{> Template.dynamic template = content}}
</ Content>
mimelmez
@mimelmez
Jul 12 2017 17:35
This message was deleted
Kenneth Beartusk
@beartusk
Jul 12 2017 18:05

Ok, so adding my user to the Docker group seemed to allow the build process to begin. Unfortunately I ran into the same error I did before when trying to build as a root user. Below is the error.

">" node-pre-gyp install --fallback-to-build

module.js:327
throw err;
^

Error: Cannot find module '../'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)

The error message is longer, but I didn't want to flood the chat with a huge entry. I did a reaction update before building as well, so the packages should all be up to date. Any ideas @jshimko ?

Nuno Vidal
@nunohvidal
Jul 12 2017 18:40

I've just completed first Reaction Commerce installation on localhost PC (AMD Phenom II X4 965@3.4GHz with 12Gb RAM running Windows 10)

Task Manager shows Node.js constantly using > 80% CPU - is this common in Windows 10?

Daniel Honig
@dhonig
Jul 12 2017 18:41
what phase in the lifecycle are you at
is reaction installing?
or are you starting for the first time
ereyes97
@ereyes97
Jul 12 2017 18:47
Hello
Has anyone modified the schema products? I'm trying to do it but it does not work. If someone did, please share the code to see what I'm doing wrong?
danielpinna
@danielpinna
Jul 12 2017 18:50

@ereyes97

This is something I'm going to start working on today or tomorrow. We can talk about our doubts and try to help us.
More should I just start working on this in a 2 hours ....

ereyes97
@ereyes97
Jul 12 2017 18:51
@danielpinna Great !! thanks
Jeremy Shimko
@jshimko
Jul 12 2017 19:07
@beartusk reactioncommerce/reaction#2333
Nuno Vidal
@nunohvidal
Jul 12 2017 19:34
@dhonig - Reaction is installed, is running webserver
App running at: http://localhost:3000/
danielpinna
@danielpinna
Jul 12 2017 19:47
great!
danielpinna
@danielpinna
Jul 12 2017 20:09

Folks,
As you may know, I'm new to meteor and reaction.

In a course I used the meteor add pcel: serialize, to serialize the form.

Does Reaction already have any packages installed that do this?

I am in time to persist data from my first custom plugin.

Thank you all.

danielpinna
@danielpinna
Jul 12 2017 20:54
Does anyone have an example of data persistence in custom plugin?
danielpinna
@danielpinna
Jul 12 2017 21:00
@zenweasel @spencern
The sample plugin does not create a custom collection. So I'm lost in how to move on ....
Do any of you have a simple example of a custom plugin that creates a custom collection?
danielpinna
@danielpinna
Jul 12 2017 21:02
@ereyes97 Thanks
Kenneth Beartusk
@beartusk
Jul 12 2017 21:16
@jshimko Wow, I just had my server administrator upgrade our remote web server to Centos7 to facilitate Docker-CE. From what you're telling Meteor.js is just incompatible with this version of Linux at the moment?
Can Bakış
@canbakis
Jul 12 2017 21:20
hello I was trying to make a simple docker-compose.yml install everything works but I cant setup default admin
Aneesh Sharma
@redM0nk
Jul 12 2017 23:29
Hello,
I'm running into a problem with the translation module on my website. I've defined several new components and their name (english along with their translation in spanish). I restart my website after saving these changes. But, for some reason when I change the language, the translation doesn't work.
However, if I drop all the collections from my database, it works. I was wondering if there is any other solution which doesn't require me to reset my database everytime i define new translations.
Any help is appreciated.
Brent Hoover
@zenweasel
Jul 12 2017 23:53
Unfortunately translations are not reactive. However you can do Meteor.call(“i18n/flushTranslations”)
Kenneth Beartusk
@beartusk
Jul 12 2017 23:56

@zenweasel @jshimko I believe I may be deploying reaction incorrectly. My thought process.

"$" reaction build <build_name>

docker image is built

"$" reaction deploy <build_name>

This however does not work

Brent Hoover
@zenweasel
Jul 12 2017 23:57
@beartusk Sorry, that’s not really my area of expertise. But you may want to try the deployment channel