Transaction date looks wrong on XML Feed

ChuckTrukkChuckTrukk Member
in Bugs & Feature Requests edited December 2011
I have a store where we determine if a subscription is new by comparing the subscription_start_date to the transaction_date.

On 12-12-2011, a new subscription was created.
The subscription_start_date shows 2011-12-12 correctly
The transaction_date though shows 2011-12-13

Was this a bug? Has something changed? I will whisper the transaction in a followup

Thanks,
Charlie
Comments
  • lukeluke FoxyCart Team
    Hey Charlie, thanks for posting. We'll take a look.
  • lukeluke FoxyCart Team
    @ChuckTrukk: It might be that someone recently updated the timezone for the store. The date I see in the db is 2011-12-12 22:53:49 but the timezone is set for Chicago so that would bump it ahead one day.

    That's an interesting issue that hasn't come up before. Your options include subtracting out the time difference, but that's obviously not ideal. Until we introduce something new, that may be your only option at this point.

    We're throwing around some ideas and would love your input. A couple options that come to mind:
    [ulist]
    [li]we include a counter for the number of times this subscription has run[/li]
    [li]we include a list of all the transaction id's of previous transactions that ran for that subscription[/li]
    [/ulist]

    This gets a bit tricky though because subscription information is stored on the line item details (since the initial transaction can create multiple subscriptions based on the frequency, start date and end date). Storing all that data on each line item seems awkward.

    Thoughts?
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    I love the idea of just listing out the number of previous times a subscription has been run.
  • lukeluke FoxyCart Team
    @sparkweb: Would that be on the line item details then? And for the first transaction that runs (which could be creating multiple subscriptions depending on the frequency, start date and end date), should that counter start at 1 for each subscription line item?
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    I think it would be most useful in the transaction datafeed as a line item inside the transaction_details node. Something like "subscription_occurrence". If this is the first time this subscription has been run, then it would be 1. A practical use for this: on a recent project, I wanted to send out a certificate email and add people to a newsletter database on the first purchase, but not on every purchase which would be overkill and cause problems. So if there was a line item in the transaction_details node which told me "1", this is the first occurrence of a subscription trx, that would be really helpful.

    I suppose that it would be additionally helpful to have a line item on the subscription datafeed as well.
Sign In or Register to comment.