These are chat archives for reactioncommerce/reaction

21st
Feb 2018
zzh1234567
@zzh1234567
Feb 21 2018 04:48
How to implement load products and load more products with React Native? any idea? thanks

I use https://github.com/inProgress-team/react-native-meteor.

params = [ 24, { } ];
this.state.currentSubscribeId = Meteor.ddp.sub("Products", params);

I can get 24 products. but how to implement load more?

Brent Hoover
@zenweasel
Feb 21 2018 05:03
I think you can pass in how many products you want as a parameter
zzh1234567
@zzh1234567
Feb 21 2018 05:17
repeat call Meteor.ddp.sub("Products", params); with different pareamter?
Brent Hoover
@zenweasel
Feb 21 2018 05:17
correct
zzh1234567
@zzh1234567
Feb 21 2018 05:20
thank you....
Brent Hoover
@zenweasel
Feb 21 2018 05:20
:+1:
zzh1234567
@zzh1234567
Feb 21 2018 06:04
repeat call Meteor.ddp.sub("Products", params); if client will get repeated products info from server?
Brent Hoover
@zenweasel
Feb 21 2018 06:09
You know I am not completely sure. I want to say yes, but I have a feeling that Meteor may dedupe the contents to not send that data twice over the wire. I would need to test it and make sure
zzh1234567
@zzh1234567
Feb 21 2018 06:47
my test result:
params = [ 24, { } ];
this.state.currentSubscribeId = Meteor.ddp.sub("Products", params); get 24 products.
if unsub previous sub before call new sub again , then I can get repeat info.
Michael Jenny
@prinzdezibel
Feb 21 2018 07:05
@mavais: Swag shop should be done feature wise. You can check it out. Maybe it serves your use case: https://github.com/reactioncommerce/reaction-swag-shop
@willmoss1000 You may checkout https://ngrok.com/ to setup a tunnel to localhost
mavais
@mavais
Feb 21 2018 07:17
@prinzdezibel Yeah Michael, will check that and try to use it rather than my custom home page thing. For now, what i did was sorted my Products collection on creation data with a limit to 20 and served them to home page through template helpers to display my Latest Collection
Brent Hoover
@zenweasel
Feb 21 2018 07:23
@zzh1234567 When you say “unsub previous sub before call new sub again” why would. you do that? What if you just to a another call to subscribe with new parameters?
zzh1234567
@zzh1234567
Feb 21 2018 08:39
when I sub Products with different tag , I need unsub previous sub. params = [ this.state.currentSubscribeNum, { tags: [tagid] } ];
subid = Meteor.ddp.sub("Products", params);
console.log("subscribeProductsByTags Meteor.ddp.sub " + subid);
zzh1234567
@zzh1234567
Feb 21 2018 10:04
I want to upload a 3d file: .fbx 。I Use <Dropzone
className="rui gallery-drop-pane"
disableClick={true}
multiple={true}
disablePreview={true}
onDrop={this.onDrop}
ref="dropzone"
accept="image/jpg, image/png, image/jpeg, application/octet-stream, video/avi"
    > but I can/t upload my .fbx. any idea, help, thanks
Patrick Newell
@pnewell4_twitter
Feb 21 2018 11:01
Is there documentation on Roles?
atm, I am mostly curious about which has greater access "admin" or "owner". (but I was recently looking at the source for assignOwnerRoles and realize there is a lot I don't know about roles!)
William Moss
@willmoss1000
Feb 21 2018 11:02
@prinzdezibel cheers! That looks quality
Amalan Jenicious
@amalan-shenll
Feb 21 2018 12:17
hi
i am creating a custom plugin to edit image.
i need to detect edit switch change. how to do that?
thanks
machiko
@machikoyasuda
Feb 21 2018 14:15
The community call is coming up in 45 minutes at youtube.com/reactioncommerce
machiko
@machikoyasuda
Feb 21 2018 14:22
Patrick Newell
@pnewell4_twitter
Feb 21 2018 14:39
@machikoyasuda++
just to be sure I have this straight: we are owners and those who have shops on our sites are admins
machiko
@machikoyasuda
Feb 21 2018 14:39
@pnewell4_twitter yes
@pnewell4_twitter Wait! I may have gotten that backwards...
machiko
@machikoyasuda
Feb 21 2018 14:45
@pnewell4_twitter You are a marketplace admin and you have shops with owners.
Explained for the store operator perspective here https://docs.reactioncommerce.com/reaction-docs/master/merchant-shop-setup
hrath2015
@hrath2015
Feb 21 2018 15:06
Yes
we can see the screen Brent
wfhio
@wfhio
Feb 21 2018 15:10
@zenweasel very cool on that one
hrath2015
@hrath2015
Feb 21 2018 15:10
:+1:
prosf
@prosf
Feb 21 2018 15:24
Really nice stuff today !
:thumbsup:
wfhio
@wfhio
Feb 21 2018 15:31
i'll have whatever @aldeed eats for breakfast
machiko
@machikoyasuda
Feb 21 2018 15:35
If you missed the call, you can always rewatch on YouTube -- we discuss Reaction Dev-Tools and migrating from CollectionFS today https://www.youtube.com/watch?v=wlzwYme8ONY
Loan Laux
@loanlaux
Feb 21 2018 15:36
This product fixture generating plugin is a nice addition to the Reaction toolset. Definitely something that was missing!
wfhio
@wfhio
Feb 21 2018 15:37
@loanlaux agreed, brilliant idea
Patrick Newell
@pnewell4_twitter
Feb 21 2018 15:38
a nice next step would be to take a snapshot of the current DB to use as a fixture option
Loan Laux
@loanlaux
Feb 21 2018 15:38
Ooooh, that's a neat idea
Brent Hoover
@zenweasel
Feb 21 2018 15:44
Yeah, that wouldn't be too hard for just JSON data
mohamadnikan2013
@mohamadnikan2013
Feb 21 2018 17:00
hey everybody
i just need to know, is discount-rate enable or not and how can i use it.
thank you
mohamadnikan2013
@mohamadnikan2013
Feb 21 2018 17:06
not only but also i need to know that how can i customize my discount-code and add some feature like:
minimum and maximum cart price to apply discount-code and create discount-code for specific person and expire date and time for discount-code and ....
thank you
Akarshit Wal
@Akarshit
Feb 21 2018 17:41
@mohamadnikan2013 You can enable the discount-code by going into the payments menu in the right sidebar.
fabien huet
@fabien-h
Feb 21 2018 20:19
hi
Is there a "ready" hook for reaction ?
When I try to access the routes in Meteor.startup(() => {
they are not initialized yet
Router.ready(() => {
console.log("ready");
console.log(Router.routes);
});
does not seems to work
When I initialize this is meteor startup :
fabien huet
@fabien-h
Feb 21 2018 20:24
Router.Hooks.onExit(() => console.log("onExit"));
Router.watchPathChange(() => console.log("watch"));
Router.triggerRouterReady(() => console.log("ready"));
Router.Hooks.onEnter(() => console.log("enter"));
I produces zero result onnavigation
only that one gives anything :
Router.routes.forEach(route => {
Router.Hooks.onEnter(route.name, () => console.log("enter"));
});
(but not in startup, in the console, after the app is initialized)
mohamadnikan2013
@mohamadnikan2013
Feb 21 2018 22:53
@Akarshit thank you
but i want to create new feature in discount code and i don't know how!
Brent Hoover
@zenweasel
Feb 21 2018 23:10
@mohamadnikan2013 Probably the best approach would be to clone the current discounts plugin and create your own version that works the way you want. Discounts are just another payment as far as how they are handled on the backed.