These are chat archives for reactioncommerce/reaction

14th
Jul 2015
Bogi
@boboci9
Jul 14 2015 11:46

Hi @aaronjudd I have been thinking on a way to dynamically change the Roles that we add to the user on account create, and it would be great if we could change the

     user.roles[shopId] = [ "guest", "account/profile" ]

to something like

    user.roles[shopId] = ReactionCore.Helpers.UserRolesOnInit

but I'm not sure I should add this array of permissions in the ReactionCore.Helpers, what other ReactionCore object should I use? Would you accept a PR about this what do you think?

psih369
@psih369
Jul 14 2015 12:18
@aaronjudd sorry fo asking, but i didnt make reaction commerce working... can u tell me what to intall to make it working?
Goutham Veeramachaneni
@gouthamve
Jul 14 2015 12:21
Hi, @psih369 can you run the env command in the terminal?
psih369
@psih369
Jul 14 2015 12:21
yeah
Goutham Veeramachaneni
@gouthamve
Jul 14 2015 12:22
/usr/bin/env is the full path of the env command. Can you do which env in the terminal and paste the result here?
psih369
@psih369
Jul 14 2015 12:24
same as urs. /usrbin/env
I think you could try the result given there
psih369
@psih369
Jul 14 2015 12:33
app started crashing after that. i made the same yestarday and try this out now
psih369
@psih369
Jul 14 2015 12:41
its working!
ill tell what ive done.
thanks for help
so i totally remove everything, that i had. installed node with apt-get, made symlink and download reaction com as usual.
Aaron Judd
@aaronjudd
Jul 14 2015 13:48
@psih369 :thumbsup:
Aaron Judd
@aaronjudd
Jul 14 2015 13:58
@boboci9 how about using the options parameter that is passed to http://docs.meteor.com/#/full/accounts_oncreateuser to pass in options.roles and fallback to the predefined array?
Bogi
@boboci9
Jul 14 2015 14:29
@aaronjudd I still wouldn't know how to add the options to the signup method of the reaction-core ? that is called in the accounts.coffee
Aaron Judd
@aaronjudd
Jul 14 2015 14:39
yeah, this would need updated options for Accounts.createUser. just thinking this might not be something you’d want to add to ‘ReactionCore.’ as a global. Perhaps it should actually be a shop setting though - (like Shops.defaultRoles)
Bogi
@boboci9
Jul 14 2015 14:43
ok that could work too
Aaron Judd
@aaronjudd
Jul 14 2015 14:43
anyways - I agree with the idea/need - just not sure myself where the best place to store this - but if we think it will be different per shop, then ‘Shops’ make sense.
Bogi
@boboci9
Jul 14 2015 14:45
yes, it could be different, I am thinking for the multi vendor setup there we could use the main shop's defaultRoles
Aaron Judd
@aaronjudd
Jul 14 2015 14:50
well that way you could give the new vendor a role from the main shop, and if users are created while belonging to that (new vendor) shop, the user could potentially get a different set of roles for the new vendor shop (versus main)
Bogi
@boboci9
Jul 14 2015 14:53
ok, I will send you a PR using Shops.defaultRoles
Aaron Judd
@aaronjudd
Jul 14 2015 14:54
sounds good :thumbsup:
Michael Jenny
@prinzdezibel
Jul 14 2015 15:34
Not necessarily a reactioncommerce question: I want to have a href target (in this case /product/tag/<name>) to be opened in an overlay, not a as a new page with own URL. Possible?
Aaron Judd
@aaronjudd
Jul 14 2015 15:41
add a template with an overlay style, then on click, render template (pass params from href to template)
Michael Jenny
@prinzdezibel
Jul 14 2015 15:50
@aaronjudd Ok. makes sense. The overlay is just to preserve the UI state of the previous page (sroll position and some zooming trickery). An alternative would be to store the app state (pushstate history? , session? or something) and restore the UI accordingly when navigating back. Which way would you go ?
Spencer Norman
@spencern
Jul 14 2015 16:11
Just a thought about this @prinzdezibel - overlays don’t generally play as nicely with mobile devices as page transisitions - so if you go the overlay route you may have to do some work to make the ux feel good on smaller devices as well.
Aaron Judd
@aaronjudd
Jul 14 2015 16:23
agree with @spencern which is why i’ve avoided modal,etc. but regarding storing app state - yes either sessions, or db storage. because the “reactiveDict/sessions” are not persistent, you’d have to recreate the state (we do this with checkout for instance)
Abhishek Soni
@abhisheksoni27
Jul 14 2015 17:55
What's with the paypal-debug-id returned in the terminal?
Aaron Judd
@aaronjudd
Jul 14 2015 17:57
it’s not an error. I’ve hunted it down a few times, I think it’s being spit out of the node paypal module on response.
Abhishek Soni
@abhisheksoni27
Jul 14 2015 18:07
But the transaction is not completed. Or even if it is, how can I check it?
Aaron Judd
@aaronjudd
Jul 14 2015 18:10
it should be completed if you got that, - there is some session issues that popup when you have multiple attempts but otherwise it should be showing up in orders. if you see the session issue - the best thing is to refresh and walk through the workflow. You can manually confirm though if you need to, by checking the cart or order collection and looking for the payment transaction info (should be saving into payments both successful and failed transactions)
Abhishek Soni
@abhisheksoni27
Jul 14 2015 18:24
But it never gets to the number 5 breakpoint in the progress bar. And I checked the orders page nothing there.
Aaron Judd
@aaronjudd
Jul 14 2015 18:28
it sounds like the session issue that I described (this will be fixed soon, it’s on the short list of blockers for 0.6.0)
Abhishek Soni
@abhisheksoni27
Jul 14 2015 18:29
Alright. Thanks.
Aaron Judd
@aaronjudd
Jul 14 2015 18:29
you could check paypal to see if the transaction is there - it sounds like it should be.
Abhishek Soni
@abhisheksoni27
Jul 14 2015 18:30
I am goign to check the sandbox account.
Abhishek Soni
@abhisheksoni27
Jul 14 2015 18:37
Nope. No transaction in the developer sandbox account.
Aaron Judd
@aaronjudd
Jul 14 2015 19:26
if there is actually an error from the transaction, I think there should console.log output in the browser console.. but if the credentials are correct, then you should be able to test transactions (i’m doing it locally everyday)
Mike Murray
@mikemurray
Jul 14 2015 19:48

@prinzdezibel I'm tackling this same problem but with popovers. You can go about it this way; use Blaze.renderWithData to create your overlay and pass in the product as data. That template could be inserted somewhere in the body and styled with everything you need to make it appear over your content.

On route change, you can trigger an event that closes the overlay.

Michael Jenny
@prinzdezibel
Jul 14 2015 20:29
@mikemurray @spencern @aaronjudd thank you guys.
good ideas
i'll check them out