These are chat archives for reactioncommerce/reaction

11th
Apr 2016
Spencer Norman
@spencern
Apr 11 2016 06:01
Is there a good way to hook into the reaction-sample-data product imports similarly to how the ReactionCore.Collections.Products.after.insert hook works?
Brent Hoover
@zenweasel
Apr 11 2016 09:16
Just wanted to mention that v0.12.3 was released.https://github.com/reactioncommerce/reaction/releases/tag/v0.12.3. Mostly just small bug fixes for now.
xiaoc li
@brianxcli
Apr 11 2016 09:43
@zenweasel thanks!
Brent Hoover
@zenweasel
Apr 11 2016 10:17
@erendira I just tested this now and I am seeing the same thing. Putting in a issue right now
reactioncommerce/reaction#966 - I expect to have a fix for that by tomorrow
Aaron Judd
@aaronjudd
Apr 11 2016 15:11
@spencern reaction-sample-data is really meant to be replaced with your own.. I think there are a couple of events in the ReactionImport that were added for that purpose though.. for instance you can further modify the import object with onImport${this._name(collection)} hook. we could add more if needed.
Spencer Norman
@spencern
Apr 11 2016 15:17
Yeah, I’m replacing the sample-data with our own, how does the onImport hook work? is it a method hook?
erendira
@erendira
Apr 11 2016 18:04
thanks @zenweasel :)
Aaron Judd
@aaronjudd
Apr 11 2016 20:25
@spencern it’s an event hook, takes an import data object lets you modify, and return prior to the actual import
Spencer Norman
@spencern
Apr 11 2016 20:26
:+1: Thanks
We just finished our csv product importer which I think is better suited for my needs.
Lukas Sägesser
@ScyDev
Apr 11 2016 20:26
How can I get the main image of a product in a helper? I want to pass the image URL to Google Maps. I can only find examples where the {{url}} helper is used to display images...
Which doesn't work for Google Maps markers.
Aaron Judd
@aaronjudd
Apr 11 2016 20:36
@ScyDev in a template?
{{#each media }}
    <img src="{{ url store='thumbs' }}" width="800" height="400" alt="">
{{/ each }}
if you can’t use the url helper, then I think you could use FS.File in a helper to get the url needed: https://github.com/CollectionFS/Meteor-CollectionFS#fsfile-instance-helper-methods
Lukas Sägesser
@ScyDev
Apr 11 2016 20:41
@aaronjudd Yeah, that's what I found... but I can't use that in the JS code of a helper to send to Google Maps. I'll try FS.File, tnx!