These are chat archives for reactioncommerce/reaction

30th
Oct 2015
bankim
@bankim
Oct 30 2015 04:58
@aaronjudd Yes, I used "Template.replates" as per the document, but it is not working for me.
QR
@ababba15
Oct 30 2015 04:58
Hey guys =)
anybody alive?
Spencer Norman
@spencern
Oct 30 2015 04:59
sup
QR
@ababba15
Oct 30 2015 04:59
Hi
I have downloaded Reaction and lounched it with PHP Storm. But I have a problem - all the night I am trying to get into admin dashboard ) The one admin user's password in db is encripted, so... what shold I do to see the dashboard?
should*
Spencer Norman
@spencern
Oct 30 2015 05:02
The admin password is displayed the first time you start up the app
In the server console.
Rick Behl
@Nexus7
Oct 30 2015 05:02
@spencern : actually I also had a similar question
if I lost the user/pwd the first time
how do I get it back?
QR
@ababba15
Oct 30 2015 05:03
oh.. I should reinstall the app? Or reset?
Spencer Norman
@spencern
Oct 30 2015 05:03
the easiest way is to meteor reset
QR
@ababba15
Oct 30 2015 05:03
okay, thank you )
Rick Behl
@Nexus7
Oct 30 2015 05:03
ok, so meteor reset and restart should show the user/pwd again?
QR
@ababba15
Oct 30 2015 05:03
Are you a developer?
Spencer Norman
@spencern
Oct 30 2015 05:03
yeah
Rick Behl
@Nexus7
Oct 30 2015 05:03
cool
Spencer Norman
@spencern
Oct 30 2015 05:04
if you set up your ENV vars, you can set it so that it uses a standard username/pw combination
and not a random one on startup
Rick Behl
@Nexus7
Oct 30 2015 05:04
ohhh, is there a page in the docs which you can point me to?
how to set that up?
Spencer Norman
@spencern
Oct 30 2015 05:04
yeah, I’ll pull it up
Rick Behl
@Nexus7
Oct 30 2015 05:04
cool
Rick Behl
@Nexus7
Oct 30 2015 05:07
thanks
Spencer Norman
@spencern
Oct 30 2015 05:07
There’s a section that talks about dev.settings.json
Rick Behl
@Nexus7
Oct 30 2015 05:07
yep, just found it
great
Spencer Norman
@spencern
Oct 30 2015 05:07
if you put the REACTION_USER etc as env vars
instead of in the settings file
it will persist from one install to another
Rick Behl
@Nexus7
Oct 30 2015 05:08
oh, so don’t set the REACTION_USER in the settings file?
Spencer Norman
@spencern
Oct 30 2015 05:08
e.g. in your .profile
export REACTION_USER=user
export REACTION_EMAIL=…
Rick Behl
@Nexus7
Oct 30 2015 05:08
got it
let me try that
Spencer Norman
@spencern
Oct 30 2015 05:09
I think the settings file works currently, but I’d recommend the env vars personally
Rick Behl
@Nexus7
Oct 30 2015 05:09
makes sense
especially if it is only installation-specifi
specific
Spencer Norman
@spencern
Oct 30 2015 05:09
:+1:
bankim
@bankim
Oct 30 2015 05:19
@aaronjudd I have created "templates.coffee" file with content "Template.layoutHeader2.replaces("layoutHeader")". And was trying to use new template called "layoutHeader2" instead of layoutHeader. but it is not working for me. I am not getting any changes there.
Spencer Norman
@spencern
Oct 30 2015 05:20
@bankim - oops, just realized what you meant
are you loading your new replaces file in your package.js file? as well as your new templates?
bankim
@bankim
Oct 30 2015 05:29
@spencern nope. how to load file in packages.js? and I am not finding any file called package.js except "package", but in this package we generally load the package name not file name. Can please explain me what should I do to make it work?
Spencer Norman
@spencern
Oct 30 2015 05:29
oh, are you trying to load these files in your main app?
QR
@ababba15
Oct 30 2015 05:30
Capture.PNG
BINGO =)
Spencer Norman
@spencern
Oct 30 2015 05:31
:sparkles:
bankim
@bankim
Oct 30 2015 05:31
@spencern yes. instead of "layoutHeader" i want to use "layoutHeader2" template.
Spencer Norman
@spencern
Oct 30 2015 05:32
layoutHeader is within the client/templates/layout/header/header.html file?
within the core package?
bankim
@bankim
Oct 30 2015 05:33
yes
Spencer Norman
@spencern
Oct 30 2015 05:34
ok, not sure if you’re on the latest version or not, but I think coffeescript support was deprecated with 0.9.0
also, you should have a package.jsfile within the core package
packages/core/packages.js is where i’ve got it installed
bankim
@bankim
Oct 30 2015 05:36
I am not getting anything inside the packages folder.
Rick Behl
@Nexus7
Oct 30 2015 05:37
@spencern : I set the env variables for the admin user but when I try to login it says I need to validate the email first?
@spencern : any ideas?
Spencer Norman
@spencern
Oct 30 2015 05:37
@bankim - you may need to run bin/clone-packages.sh
@Nexus7 - you can either add another env: MAIL_URL=smtp address with a service like mailgun or similar
QR
@ababba15
Oct 30 2015 05:38
@spencern mate, please tell me how shold I add 1000 similar products? Via console into mongodb?
Spencer Norman
@spencern
Oct 30 2015 05:38
@nexus7 or if you don’t have a mail provider setup the mail should get output to the console and you can copy/paste the link into the browser to activate your email
QR
@ababba15
Oct 30 2015 05:39
any command can do that?
Spencer Norman
@spencern
Oct 30 2015 05:39
null@ababba1 - there’s not a great way to add 1000 similar products yet, mongodb or custom import script is probably your best bet
This message was deleted
not sure why it’s doing the null thing
QR
@ababba15
Oct 30 2015 05:39
Why I am NULL =))
Spencer Norman
@spencern
Oct 30 2015 05:40
lol
QR
@ababba15
Oct 30 2015 05:40
hahah
Good that not undefined
Spencer Norman
@spencern
Oct 30 2015 05:40
¯_(ツ)_/¯
lol
QR
@ababba15
Oct 30 2015 05:40
))
so, the system is not optimized for big amount of products? I just wanted to test the speed
null@ababba1
hah) amazing
Spencer Norman
@spencern
Oct 30 2015 05:42
yeah, we’ve just entered developer beta, so there’s current focus on getting core features up and running
if you just want to test speed, you could use a factory to generate products
I think in 0.9.4 those got moved to testing only, so you’d either have to move them into a common folder or just write some jasmine tests
but you could easily generate 1k random products like that
I’m not part of the core ReactionCommerce team, just a community member that’s working on an ecommerce shop on top of reaction. @aaronjudd and @mikemurray are the core devs and they might be able to answer some more of your questions if you can find them on line sometime
Rick Behl
@Nexus7
Oct 30 2015 05:46
@spencern : cool, problem solved on the admin login… I had just forgotten to do a meteor reset and so wasn’t seeing the mail validation link on the server console
@spencern : thanks for your help
bankim
@bankim
Oct 30 2015 05:47
@spencern after run this code i am getting this. please tell me next what to do..*
reactioncommerce:* packages updated in /Users/bankim/reaction/packages
use: export PACKAGE_DIRS=/Users/bankim/reaction/packages
Spencer Norman
@spencern
Oct 30 2015 05:47
@Nexus7 no problem. Glad to help
What that script does for you is install local versions of all of the core packages
Reaction is built modularly with most of the ecommerce code existing within packages
You should have a packages/core/package.jsfile somewhere now
QR
@ababba15
Oct 30 2015 05:49
@spencern thanks for your answer +++
Spencer Norman
@spencern
Oct 30 2015 05:49
null@ababba1 :+1: no doubt (still not sure why you are null)
bankim
@bankim
Oct 30 2015 05:51
still i am not getting "core/package.js" inside packages folder.
Spencer Norman
@spencern
Oct 30 2015 05:51
interesting, not sure why that would be
your other option would be to clone the https://github.com/reactioncommerce/reaction-core package into the core directory from github
essentially to be able to make changes to these packages, they need to be present in your local app
I’ve gotta run, but here’s a link to the current docs: https://reactioncommerce.com/docs/
bankim
@bankim
Oct 30 2015 05:55
but that reaction-core is already cloned when i cloned the reaction itself, is it?
Spencer Norman
@spencern
Oct 30 2015 05:56
it uses the atmosphere version of the package unless you clone it into your /packages directory
and you need it local to make changes
QR
@ababba15
Oct 30 2015 05:58
Capture.PNG
Bryan Wu
@cooloney
Oct 30 2015 05:58
@mikemurray I just tried latest development of reaction-core, looks like you removed all the admin order management panel. is that right?
QR
@ababba15
Oct 30 2015 05:58
Capture.PNG
Seing some difference
bankim
@bankim
Oct 30 2015 06:06
now the package folder structure is like this after cloned
Screen Shot 2015-10-30 at 11.35.37 AM.png
next what to do?
@spencern most probably i am using 0.9.2 or 0.9.0 v of reaction. Please help me out on this.
Mike Murray
@mikemurray
Oct 30 2015 06:13
@cooloney removed most of it. Reduced the number of workflow steps. At this moment we've been able to take an order and capture a payment with stripe / paypal using that new order workflow I've been working on.
Bryan Wu
@cooloney
Oct 30 2015 06:22
@mikemurray thanks, I assume it's finished since it's merged into development branch.
bankim
@bankim
Oct 30 2015 06:23
@spencern after cloned the "reaction-core" inside package folder i am getting err. "Error: Factory: There is no factory named shop".
Bryan Wu
@cooloney
Oct 30 2015 06:26
@bankim you also need to clone reaction-accounts package locally
that package fixed this issue
but it's not published in atmospherejs
Mike Murray
@mikemurray
Oct 30 2015 06:28
reaction accounts should be on atmosphere
Bryan Wu
@cooloney
Oct 30 2015 06:29
oh, i mean is not updated to atmospherejs
Mike Murray
@mikemurray
Oct 30 2015 06:29
ah.
Bryan Wu
@cooloney
Oct 30 2015 06:30
I met the same issue with the latest reaction repo
and found reaction-accounts is not updated to atmosphere
Mike Murray
@mikemurray
Oct 30 2015 06:30
@cooloney what's there is the basic functionality to fulfill and order. Still needs more UI work and testing. Then eventually some integration with shipping providers
but structure wise. that should be it
trying to keep it simple
SharathKS
@SharathKS
Oct 30 2015 06:32
@aaronjudd
As you mentioned I have cloned all packages using "./bin/clone-packages.sh" after cloning reaction project using "git@github.com:reactioncommerce/reaction.git" and I have removed "reactioncommerce:core" from packages.
Can you please confirm do i need to remove "reactioncommerce:core" reference from packages or should i retain it. If I retain it, will my reaction project point to the cloned packages at "$HOME/reaction/packages" or will it still be taking it from the build directory, please correct me if i am wrong.
Thanks.
Bryan Wu
@cooloney
Oct 30 2015 06:32
@mikemurray I just saw one line in the Order Details "Fulfillment 1" and clicking it nothing happened
bankim
@bankim
Oct 30 2015 06:33
@cooloney thanks for this. now error is not showing. but what to do next to get work with custom template. if you please have a look my previous message to @spencern
Mike Murray
@mikemurray
Oct 30 2015 06:33
@cooloney meteor reset maybe?
Bryan Wu
@cooloney
Oct 30 2015 06:33
@mikemurray , oh, let me try that
@SharathKS if you have packages/core source code locally, it won't download the core package from atmospherejs
and you should keep reactioncommerce:core in your .meteor/packages
Bryan Wu
@cooloney
Oct 30 2015 06:41
@mikemurray my bad, it works fine now.
one more question, will clients receive order status email?
finally saw some error from server side
Exception in delivering result of invoking 'stripeCapture': TypeError: Cannot read property 'saved' of undefined
    at server/methods/orders.js:494:23
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
    at packages/meteor/dynamics_nodejs.js:123:1
    at [object Object]._.extend.apply (livedata_server.js:1627:7)
    at [object Object]._.extend.call (livedata_server.js:1553:17)
    at Object.Meteor.Stripe.capture (lib/stripe.js:19:12)
    at server/methods/orders.js:490:41
    at Array.forEach (packages/es5-shim/.npm/package/node_modules/es5-shim/es5-shim.js:417:1)
    at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
    at [object Object].Meteor.methods.orders/capturePayments (server/methods/orders.js:484:7)
    at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/lib/hijack/wrap_session.js:164:1)
    at packages/check/match.js:103:1
    at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
    at Object.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:102:1)
    at maybeAuditArgumentChecks (livedata_server.js:1695:18)
    at livedata_server.js:708:19
Mike Murray
@mikemurray
Oct 30 2015 06:45
@cooloney right now theres only the "order has shipped" email. More will be added soon
Bryan Wu
@cooloney
Oct 30 2015 06:45
cool, that's actually good enough for my use case
Mike Murray
@mikemurray
Oct 30 2015 06:46
the template needs some work though. Only has the tracking number at the moment
I'll look into that error in the morning
Bryan Wu
@cooloney
Oct 30 2015 06:47
sure. thanks, good night. man
Bryan Wu
@cooloney
Oct 30 2015 06:53
reactioncommerce/reaction#506
issue filed.
SharathKS
@SharathKS
Oct 30 2015 06:57
@cooloney
As you mentioned I have kept all my packages in .meteor/packages folder and did meteor.
I got these error:
W20151030-12:20:56.608(5.5)? (STDERR)
W20151030-12:20:56.610(5.5)? (STDERR) /home/sharath/.meteor/packages/meteor-tool/.1.1.10.1rwmpo9++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151030-12:20:56.610(5.5)? (STDERR) throw(ex);
W20151030-12:20:56.610(5.5)? (STDERR) ^
W20151030-12:20:56.611(5.5)? (STDERR) Error: Factory: There is no factory named shop
W20151030-12:20:56.611(5.5)? (STDERR) at Function.Factory.get (packages/dburles_factory/packages/dburles_factory.js:26:1)
W20151030-12:20:56.611(5.5)? (STDERR) at Accounts (common/factories/accounts.js:7:19)
W20151030-12:20:56.611(5.5)? (STDERR) at /home/sharath/meteor-project/ecommerce/ecom1/reaction/.meteor/local/build/programs/server/packages/reactioncommerce_reaction-accounts.js:369:4
W20151030-12:20:56.611(5.5)? (STDERR) at /home/sharath/meteor-project/ecommerce/ecom1/reaction/.meteor/local/build/programs/server/packages/reactioncommerce_reaction-accounts.js:1245:3
W20151030-12:20:56.611(5.5)? (STDERR) at /home/sharath/meteor-project/ecommerce/ecom1/reaction/.meteor/local/build/programs/server/boot.js:242:10
W20151030-12:20:56.612(5.5)? (STDERR) at Array.forEach (native)
W20151030-12:20:56.612(5.5)? (STDERR) at Function..each..forEach (/home/sharath/.meteor/packages/meteor-tool/.1.1.10.1rwmpo9++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20151030-12:20:56.612(5.5)? (STDERR) at /home/sharath/meteor-project/ecommerce/ecom1/reaction/.meteor/local/build/programs/server/boot.js:137:5
=> Exited with code: 8
Thoughts!!!
Thanks.
Bryan Wu
@cooloney
Oct 30 2015 06:59
@SharathKS you need at least clone reaction-accounts repo into packages/reaction-accounts
Error: Factory: There is no factory named shop
This error is fixed in reaction-accounts package
but the fix was not published into atmospherejs
reactioncommerce/reaction-accounts@f1b1fde
this is the fix
SharathKS
@SharathKS
Oct 30 2015 07:05
@cooloney
Thanks !!!! It worked . Appreciate your help.
Bryan Wu
@cooloney
Oct 30 2015 07:06
@SharathKS you're welcome. I met the same issue before and assume the package will sync up to atmospherejs
QR
@ababba15
Oct 30 2015 07:34
Guys.. I have some offtop question, but dunno who else can I ask. What this |= operator does?
does anybody know? )
That's js
Bryan Wu
@cooloney
Oct 30 2015 07:34
null@ababba1 a |= b;
a = a | b;
same thing
QR
@ababba15
Oct 30 2015 07:35
oh
thank you )
Rick Behl
@Nexus7
Oct 30 2015 08:29
probably a question that has been asked many times but just trying to get my head around the correct way to develop with reaction...
should I put all my own code into new packages
to keep it all separate from the actual reaction code
and then just run git pull occassionally to update my codebase with the latest development branch
Vlatko Koudela
@vkoudela
Oct 30 2015 09:20
@Nexus7 you’re right
Rick Behl
@Nexus7
Oct 30 2015 09:21
Cool
Paul Grever
@paulgrever
Oct 30 2015 15:47
Just upgraded to the latest Dev reaction branch and I wanted to give a shout out for the Order Processing! Really smooth and easy, well done!
Aaron Judd
@aaronjudd
Oct 30 2015 15:53
:thumbsup: @mikemurray it’s a good beginning :shipit:
@paulgrever @spencern I’ve got really bogged down in refactoring the inventory hooks… wanted to get your input on ideas to improve. I know you guys have been building some inventory hooks - what recommendations / wishes do you have?
Aaron Judd
@aaronjudd
Oct 30 2015 15:58
while the collection hooks are a sure fire way to ensure stuff runs on product update - it’s really hard to read, and understand - (and if my brain hurts, I’m pretty sure it’s not good). I’m thinking of just breaking out into some methods, and adding a workflow definition that defines what methods should be used during the collection update. That way you’ll be able to either use a method hook to existing (new) inventory methods, or custom methods
Spencer Norman
@spencern
Oct 30 2015 16:03
@aaronjudd I’ve gotta run to a meeting here in 2-3 minutes, but some quick thoughts and I can expand later:
  • Complete agreement that the collection hooks are just really hard to read and understand.
  • I don’t love the way that inventory cascades up the chain of products/variants.
  • We’ve got some interesting additional requirements in that we need to track inventory on a UID/barcode basis and can’t just agregate to say that we have x large red widgets left.
Aaron Judd
@aaronjudd
Oct 30 2015 16:04
@spencern cool - ping me when you want to discuss more, I’m refactoring now, but will likely be working on this all day (at least)
Spencer Norman
@spencern
Oct 30 2015 16:04
:+1:
Paul Grever
@paulgrever
Oct 30 2015 16:08
@aaronjudd the one concern we discussed is if multiple packages use the same Hook and how that will work and what problems that could cause for users too.
Aaron Judd
@aaronjudd
Oct 30 2015 16:16
if we used some kind of workflow, maybe we could control the hook/package/processing order, and assign a status to each inventory item. That might require a new Inventory collection, where each qty had it’s own entry, and workflow status to track. At the very least, could allow you to control which methods were used.
Spencer Norman
@spencern
Oct 30 2015 20:38
@aaronjudd - @paulgrever and I are running into issues with Factories not being defined in 0.9.4 - is there anything we need to add to packages to get the factories to import from core?
Aaron Judd
@aaronjudd
Oct 30 2015 20:42
I’ve not been able to duplicate that issue, but I’d suggest ensuring that you have pull all packages, including the main reaction repo,etc. reset or bin/reset as last resorts.
Aaron Judd
@aaronjudd
Oct 30 2015 20:49
I did see an issue with a factories related error during CI tests that I was able to reproduce locally, where a meteor PACKAGE_DIRS=“” or stand alone clean install is relying on the published packages plus one of the newer versions. in this case, --allow-incompatible-update should help . I’m thinking that this should resolve as soon as I publish reaction-accounts, but haven’t dug further into it yet - just assuming its related to what you’re seeing...
Spencer Norman
@spencern
Oct 30 2015 20:49
Yeah, I think I just got it figured out
Had my factories file that was extending core factories in my main package.onUse block
instead of my package.onTest block
Bryan Wu
@cooloney
Oct 30 2015 20:50
@aaronjudd I think yes, as long as reaction-accounts is published the latest code, this issue will be gone
Aaron Judd
@aaronjudd
Oct 30 2015 20:57
actually I think I could publish that package, - I think the only change is really the moved factories. but it might lead to other issues - to be honest I’m not always sure when the meteor packaging decides that an upgrade or constraint needs to be enforced.. I’m assuming that with a dependency on 9.4 it shouldn’t update to the newest accounts unless you had core first. but you know what they say about assuming..
@spencern I’ll add to that to the release gothyas...
Spencer Norman
@spencern
Oct 30 2015 23:03
This message was deleted
Spencer Norman
@spencern
Oct 30 2015 23:08
I think i’ve discovered the issue with the tests:
If I run all package tests - e.g. VELOCITY_TEST_PACKAGES=1 meteor test-packages --driver-package velocity:html-reporter --port 8000
My packages run fine and import the Factories defined in core properly.
if I try to run just my package tests - e.g.
VELOCITY_TEST_PACKAGES=1 meteor test-packages --driver-package velocity:html-reporter --port 8000 getoutfitted:reaction-rental-products
then I get errors such as
Error: Factory: There is no factory named product
I’m guessing this is a side-effect of exporting factories exclusively in test - which I am in support of - but it would be nice to be able to run my tests independently of core, but while maintaining the base factories
Aaron Judd
@aaronjudd
Oct 30 2015 23:17
I did get that far in looking at it, and started to play with the order of dependencies (core being included for onTest needs to come before any calls). perhaps it would work better if I just pull the factories into a reaction-factories package so that it’s independent of core all altogether, and has a little more flexibility.
Spencer Norman
@spencern
Oct 30 2015 23:19
I was considering that route as well
We occassionally use factories to quickly generate test data to play with in-app as well, so having a reaction-factories package that exposes factories to the server a la meteor shell could be useful
This is what my current onTest block looks like
Package.onTest(function (api) {
  api.use('underscore');
  api.use('random');
  api.use('momentjs:moment');
  api.use('momentjs:twix');
  api.use('sanjo:jasmine@0.15.2');
  api.use('dburles:factory@0.3.10');
  api.use('velocity:html-reporter@0.9.1');
  api.use('velocity:console-reporter@0.1.4');

  api.use('reactioncommerce:core');
  api.use('reactioncommerce:bootstrap-theme');
  api.use('getoutfitted:reaction-rental-products'); // Add our own package as a dep for testing!

  api.addFiles('lib/faker.js', 'server');
  api.addFiles('server/factories.js', 'server');
  api.addFiles('tests/jasmine/server/integration/rentalProducts.js', 'server');
  api.addFiles('tests/jasmine/server/integration/orders.js', 'server');
  api.addFiles('tests/jasmine/server/integration/cart.js', 'server');
});
And it’s not pulling in core test dependencies unless I test all packages