Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
brchristian
@brchristian
yeah, I think so too -- I can make a branch for that
Alberto Vena
@kennyadsl
would be fantastic
ok if I recall correctly we can havedifferent variants with different #s of issues
brchristian
@brchristian
Oh, okay, maybe you already have that!
"annuale" (annual) is 4 issues and "biennale" (biennal) is 8 issues
makes sense?
brchristian
@brchristian
that makes sense! it's possible we may be overriding it but don't have to
sorry my phone is ringing brb
Alberto Vena
@kennyadsl
later
brchristian
@brchristian
okay, I'm back
the other thing that we do is that we have a belongs_to: :user association on the subscription, so that we actually attach subscriptions to the user model, where I think the current gem works just off of email address
that's another thing I can add into a branch if you're interested
Alberto Vena
@kennyadsl
that's a good call actually
the client we developed the application for was pushing to this behavior since they needed guest checkout
brchristian
@brchristian
oh yeah, we allow guest checkout but default to attaching it to the user
Alberto Vena
@kennyadsl
with same email?
brchristian
@brchristian
yeah
Alberto Vena
@kennyadsl
you changed spree default behavior?
brchristian
@brchristian
no, just if the subscription is bought by a logged-in user, we attach the sub to the user
Alberto Vena
@kennyadsl
ah ok
brchristian
@brchristian
but if it's bought by a guest then we just save their email but don't attach it
one of our biggest complications for subscriptions is determining whether a new order is meant as a renewal or not -- so for instance, a user might have one subscription with 1 issue and another subscription with 8 issues, and we have to assume that they don't want two copies
do you know what I mean?
that's one of our toughest problems
Alberto Vena
@kennyadsl
yes, I was writing this
and that's why we used email
brchristian
@brchristian
so if you see the same email for two subscriptions, then you assume one is a renewal, and you'd only send the issue to one of those two subscriptions?
Alberto Vena
@kennyadsl
when a new subscription is done, and we have andother subscription with same email, we just take that subscription and add X remaining_issues to that subscription
this way we are sure existing users will renew with both logged and guest checkout
brchristian
@brchristian
ah okay, cool!
that's smart
I'll look into doing the same thing
okay, so I will work on two branches for you to look at: one for CSV, and one for linking subs and users
Alberto Vena
@kennyadsl
great!
are you confident with TDD?
brchristian
@brchristian
I'm pretty good at TDD but not amazing honestly
Alberto Vena
@kennyadsl
ok, that was my first TDD project, it's not the best test suite ever written :)
brchristian
@brchristian
haha oka
y
Alberto Vena
@kennyadsl
anyway I would like to keep specs passing since that's what is allowing us to keep the extension up to date
little confession: I never tested the extension on spree 2.0+
but test are ensuring us it's working
brchristian
@brchristian
yeah, I understand totally and I agree
I can run the specs before submitting PRs in the future
Alberto Vena
@kennyadsl
thanks!
if you need to chat, feel free to ping me here
brchristian
@brchristian
sounds good, thanks and have a good night!
Alberto Vena
@kennyadsl
thanks a lot. good evening and a big thanks again for your contribution. you're great!
brchristian
@brchristian
happy to help -- cheers!