These are chat archives for reactioncommerce/reaction

26th
Sep 2016
Michael Duane Mooring
@mikeumus
Sep 26 2016 00:54
Hi Everyone,
In the latest version of RC, where are all the layout files? client/templates/ just has layouts.js (https://github.com/reactioncommerce/reaction/blob/master/client/templates/layout.js#L4) and packages/ just has gridfs/
Michael Duane Mooring
@mikeumus
Sep 26 2016 07:33

Hello again,
Trying for a plugin to override the product template variantForm.html with no luck yet. See my plugin's registery.js here:
https://github.com/MassDistributionMedia/reaction-blindsproduct-plugin/blob/master/register.js#L17

The RC server starts up fine after a rc resetbut the template isn't being replaced yet. Here's the C9 Workspace:
https://ide.c9.io/mikeumus/ca-blinds

The layout, collection or workflow isn't right I assume but not sure which or how yet.

Michael Duane Mooring
@mikeumus
Sep 26 2016 08:49

Oh I think the registry.js template: may be only for templates with {{> Template.dynamic template=template}}, that makes sence, so I'll try the something like the modifyCheckoutWorkflow() here in the example plugin: https://github.com/reactioncommerce/reaction-example-plugin/blob/master/server/init.js#L5
or learn more about the Registry.

Seems docs website isn't loading anymore (getting a 504), must mean it's time to finally sleep:
https://docs.reactioncommerce.com/

Mike Murray
@mikemurray
Sep 26 2016 17:01
@3Maestros You can do so in the CSS, just make CSS to override the grid layout, keelping in mind that we're using flexbox
Spencer Norman
@spencern
Sep 26 2016 17:40
Generic meteor question here, is there a way to concatenate multiple cursors from the same collection before publishing to client?
e.g. I want to publish the inventory availability of certain variants, but only up to a limit of 10 each
db.InventoryVariants.find({
  productId: {
    $in: [ 'fsXrsLKeaYaS8F3jn', 'yjcjzJSoctoWCzzGv', '77Znyw6ZRLWbnvSRg' ],
  },
  active: true,
  'workflow.status': 'active',
  unavailableDates: {
    $not: {
      $elemMatch: {
        $gt: new Date("Sept 26, 2016"),
        $lt: new Date("Oct 30, 2016")    
      }
    }
  }
}, {productId: 1, unavailableDates: 1, numberOfDatesBooked: 1, active: 1, 'workflow.status': 1}).sort({unavailableDates: 1}).limit(5).pretty()
example mongo find - this finds five documents that I want to publish, but because of the limit, only returns docs for the first productId . I’d like to find docs for each productId and publish a limited number of each of them to the client
Mike Murray
@mikemurray
Sep 26 2016 17:55
@spencern yea
1sec
Spencer Norman
@spencern
Sep 26 2016 17:57
k, thanks
I documents from the revisions collection into the products collection on publish
(actually into the product itself)
but might allow you to do what you want
Spencer Norman
@spencern
Sep 26 2016 17:59
helpful for the added, changed, removed observables
does this let me publish 5 of each of something?
observing changes is my next hurdle, right now I’m trying to publish 5 inventory documents of each ID I’m searching for
Most of what I see online is pointing me towards using meteorhacks:aggregate to create an aggregation, but I don’t think those are reactive currently
Mike Murray
@mikemurray
Sep 26 2016 18:01
you can probably do it with the observables then.
Spencer Norman
@spencern
Sep 26 2016 18:01
k
Mike Murray
@mikemurray
Sep 26 2016 18:02
whatever you add to added, changed, removed gets published
Spencer Norman
@spencern
Sep 26 2016 18:02
ah, yeah, I’m tracking now.
Epifania Collection - christian orthodox priest vestments and church items
@EpifaniaCollection
Sep 26 2016 19:12
Hello,
I am looking for a basic feature: have the pictures on the main page scaled to show entire picture.
Any idea where to check this ?
Epifania Collection - christian orthodox priest vestments and church items
@EpifaniaCollection
Sep 26 2016 19:38
thanks. after changing a file (e.g. products.less which looks to control the width/height of the picture in the product gallery ) do I have to do anything special? (ps: I use docker)
Jeremy Shimko
@jshimko
Sep 26 2016 19:38
Well, you shouldn’t be editing core code. You should add your own style file and override the default theme.
Otherwise you’ll have merge conflicts the next time that file is updated
Epifania Collection - christian orthodox priest vestments and church items
@EpifaniaCollection
Sep 26 2016 19:39
that is correct, still I am experimenting in a separate instllation
soyJsus
@soyJSus
Sep 26 2016 22:22
hello