These are chat archives for reactioncommerce/reaction

27th
Feb 2015
Adam
@Neobii
Feb 27 2015 08:53
Is there a way I can create different product types? For example, extend the product schema to create different products.
Aaron Judd
@aaronjudd
Feb 27 2015 15:11

@Neobii yes, you can extend the product schema. For instance:


ReactionCore.Schemas.myProductConfig = new SimpleSchema([
  ReactionCore.Schemas.Products
  {
    "isMyProduct":
      type: Boolean
      defaultValue: false
  }
])

what kind of product types did you have in mind?

Adam
@Neobii
Feb 27 2015 15:14
Memberships
or non physical things
I've extended the schema already
this is a plugin I've started to add the membership capabilities
Aaron Judd
@aaronjudd
Feb 27 2015 15:18
I’m introducing “Accounts” schema to use in the next release:
https://github.com/reactioncommerce/reaction/issues/183#issuecomment-76258031
You’ll probably want to extend the membership information from that collection
should make storing the members a little easier
Adam
@Neobii
Feb 27 2015 15:19
well, I was thinking that they would buy the membership and we would send them a confirmation email
memberships will have accounts
but there are different types of memberships, family, business, individual
with each their own schema
Aaron Judd
@aaronjudd
Feb 27 2015 15:21
then for checkout, we’d need to treat a “Membership” like a downloadable, or a subscription product.. there’s a couple of issues related to that process but
Adam
@Neobii
Feb 27 2015 15:22
yeah I'm not sold on my idea with the membership and accounts integration yet
but it's almost required that you can't make an account unless you buy in
Aaron Judd
@aaronjudd
Feb 27 2015 15:23
we need to complete the “virtual” product checkout updates. Shouldn’t be too much, involved there though. Since I’m reworking that for guest checkouts right now - this is a good time think about what changes might be need in corre
your workflow might work better with the new “guest” checkout.. in this process we’ll create the “Account” seperate from a “user account” which will just be auth
Adam
@Neobii
Feb 27 2015 15:24
yeah, I think you should have a really basic product schema that is easy to extend
without weight and things like that
Aaron Judd
@aaronjudd
Feb 27 2015 15:26
we’ve also discussed having a couple different layouts for the “productType” -> so you probably want a lighter “product” which you could create just by extending the product templates, and to create the “Account + Membership” after the checkout, when payment and email are verified
Adam
@Neobii
Feb 27 2015 15:28
on product purchase hooks
have the schemas for each product and give it an on purchase hook
or on add to cart
Aaron Judd
@aaronjudd
Feb 27 2015 15:35
there’s a couple places you could hook in there. (there are hooks for add to cart, and purchase in the “cart workflows”) but we just clone the entire product and variants object into the cart collection - so you could add /remove attributes without problems, and really the “product” schema is a wrapper around variants -> so you’d probably want a different variant, and to alter the handling of that variant type through checkout
will these be subscriptions?
Adam
@Neobii
Feb 27 2015 15:37
yes for the membership part
aha, I see the variants has the price on the schema but not the products schema
Adam
@Neobii
Feb 27 2015 15:46
okay so tell me about the layouts for the product type
is there a convo saved about this somewhere?
Aaron Judd
@aaronjudd
Feb 27 2015 15:52
I think there is a github issue with history on that, but I’ll have to look for it