These are chat archives for reactioncommerce/reaction

9th
Mar 2018
Michael Jenny
@prinzdezibel
Mar 09 2018 07:55
@vigyano would you mind to share details? Maybe it's relevant for our documentation.
@willmoss1000 prices don't necessarily live in the same document. There are different documents that make up a complete "product". There's the simple document and there are variants
so maybe your peeking into the wrong doc, even if this.siblingField("min").value sounds reasonable
Michael Jenny
@prinzdezibel
Mar 09 2018 08:01
@pnewell4_twitter I think import "./index.less" will actually require the styles and bundle them into the source code, where as the other mechanism that obviously doesn't/didn't work for you loads them via <link>. So the question is still, why it didn't work out for you the way you tried it first
@pnewell4_twitter As long as you use reaction to run your meteor app, they should load. It's a different thing if you use meteor to run your app, though, because reaction-cli auto-generates css inclusions
Michael Jenny
@prinzdezibel
Mar 09 2018 08:10
Check if your plugin's index.less is referenced here: reactioncommerce/reaction/client/plugins.less
Patrick Newell
@pnewell4_twitter
Mar 09 2018 15:40

@pnewell4_twitter As long as you use reaction to run your meteor app, they should load. It's a different thing if you use meteor to run your app, though, because reaction-cli auto-generates css inclusions

thanks @prinzdezibel. I have been running with meteor run --inspect --port 4000, so maybe that's the reason? anyway, I'd rather have the css bundled than it be it's own <link>, so I will stick with the import

image.png
unrelated question: is there a way to easily suppress the Reaction Toolbar?
image.png
...and the admin controls?
I am building a shop owner onboarding flow and one of the steps creates their shop. I want to continue guiding them through the process before distracting them with all of the admin features
Michael Duane Mooring
@mikeumus
Mar 09 2018 19:37

Hey Gang, I'm trying to use the meteorimport to import a product and it's many variants into the app. It's able to import the Product that I see show up in the web app, but in the miniMongo chrome extension it doesn't list the imported product or it's variants. The meteor shell lists them with db.Products.find() but when I try to db.Products.find() for the specific product ID, nothing results. Here's the Products.json I'm trying to import: https://gist.github.com/mikeumus/a5133eb710a5aacb0b4dc9e6b5662026

Meteor Mongo shell says it imports it without any errors:

mikeumus@cbc-instance-5:~/rc-ca-blinds$ mongoimport --db meteor --collection Products --file ./fauxwood-cbc-mongodb.json/meteor/Products.json --port 3001 --jsonArray
connected to: 127.0.0.1:3001
2018-03-09T19:29:29.300+0000 check 9 28
2018-03-09T19:29:29.301+0000 imported 28 objects

Should I not be importing from the meteor mongo shell like this? Can I use Reaction.import.Object() or Reaction.import.Product() for this instead?

Michael Duane Mooring
@mikeumus
Mar 09 2018 19:45
Michael Duane Mooring
@mikeumus
Mar 09 2018 20:00
@pnewell4_twitter, if you're building your own onboarding process then I'd control it with some state like onboardStep1: true and then toggle some CSS class that was hiding the Reaction Toolbar once you're ready.
Michael Duane Mooring
@mikeumus
Mar 09 2018 20:29
It looks like the official example plugin may have been on it's way of showing how importing products with Reaction.import.Product() works but is will a work in progress: https://github.com/reactioncommerce/reaction-example-plugin/blob/master/private/data/Products.json
Patrick Newell
@pnewell4_twitter
Mar 09 2018 20:33
thanks @mikeumus. that works... CSS! what a concept.
Michael Duane Mooring
@mikeumus
Mar 09 2018 20:41
@pnewell4_twitter, no problem! :D