The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Integration with my core database

mwinsteinmwinstein Member
in Help edited July 2008
My first project with FoxyCart is now fully functional. Thanks!

On my website,, I already have password secure login for users of the EcoSector Portal. For my next project, I would like to be able to use the Portal dataset as the core dataset, and have updates to my dataset, such as billing addresses, etc., get reflected in FoxyCart's dataset. Is that possible?

On a simpler note, can I populate a new FoxyCart checkout page with data from the Portal's dataset? For example, if someone is already logged into the Portal's dataset, could I have them start a new order with FoxyCart by automatically populating FoxyCart's email, password and address fields?

  • lukeluke FoxyCart Team
    Hey mwinstein, congratulations on going live. As for your question, check out this page:

    That's part of what you're looking for... but it will create a one time use customer without a password needed. Brett is working on a separate project called "FoxyBack" which will is shaping up to be pretty awesome and will probably be open-sourced. That might be more along the lines of what you're looking for as far as a backend solution.

    From the beginning, we never really intended FoxyCart's admin or transaction history page to be used for managing a company. That's why we built the XML datafeed. We want to avoid duplication of data at all costs. Basically, that means we'll send you the data as we got it, and then you can do whatever you like with it. If you already have your own customer management, accounting and inventory system (which most people running a business will have), then you can use the data from the datafeed however you like without worrying about the historical data in foxycart.

    We will be building some API functionality down the road in regards to subscriptions and such, but for now we encouraged our customers to integrate with the tools they already use and manage their data in the way that works best for their unique business. We'd love to talk more about this, so please feel free to reply back with any more ideas or comments you have on the subject.
  • I looked at the link. That's amazing! That will do at least 90% of what I'm seeking.

    1) Can I populate a custom field, too? For example, if I can send the record ID from my dataset, I could use XML to feed the purchase results back to my dataset to create a record of all purchases for that client.

    1.a) If yes to #1, can I pass the value to a hidden field with FoxyCart?

    2) Can I populate the email and password? To hidden fields?

    Thanks again!
  • lukeluke FoxyCart Team
    We got you covered:

    As for the password field, it won't show up for single user customers and the email field... well, you might be able to use some JavaScript on page load to swap out the customer_email input field and replace it with a hidden input with the same name and id, though that might cause some problems with some javascript onchange methods bound to the old input. With single use customers, it should work out ok though. If you just want to be sure they don't change the value, you could use some css to make the field not editable.

    Let us know either way.
  • brettbrett FoxyCart Team
    FYI, until we get some user API type functionality, you have two options. I'll bring it up here just in case you hadn't considered #2.

    1. Do it like you're doing it, prepopulating. Works well, and you can send additional info with the session attributes that Luke linked to. This can be quite handy for sending unique user IDs and such.

    2. Send _all_ user stuff through FoxyCart. This is how FoxyBack-MODx (which Luke mentioned and will be released soon) does things. Basically everything goes through FoxyCart. So FoxyCart creates the user on your system (with a synched password using the pw hash in the datafeed; customizable and SALTable hashes coming eventually), then if that user wants to update any information they basically update it, send it back through FoxyCart, which sends it back through the XML and back into your database (if necessary).

    #1 loses the ability to save credit cards, and might be weird for subscriptions.
    #2 is a bit more complicated.
    #3, the user API, isn't here yet ;) But definitely vote for it:

    Or you could do a mix of #1 and #2, but the issue at this point is that there kind of needs to be one master user record, so you kind of have to go one way or the other.
  • mwinsteinmwinstein Member
    edited July 2008
    Hi Brett,

    This is all good info.

    I have a slightly different question now.

    Let's go back to my current project, a simple recurring newsletter. Right now, I'm passing all the data to MailChimp and that's fine. My question is, let's say someone updates their recurring payment info in FoxyCart. How does that info get into FoxyCart's datafeed? My current understanding is that if someone makes a new recurring purchase with FoxyCart, and I collect that data, that record is marked "done" so that it doesn't keep posting to MailChimp. So, if someone changes their info at FoxyCart, is there some kind of flag that tells me, hey, this is an updated record, not a new record?

    Thanks again,

  • brettbrett FoxyCart Team
    Interesting you ask, as that just came up very recently in another thread.

    If somebody updates their info it'll come through in the datafeed, but there's no flag, per se. I agree that there should be. (I also, personally, really want to get more data coming through the XML like error notifications and subscription errors and etc. That's on our list.)

    (Just thought of another thing that should be sent in the XML: If a subscription is turned off in the admin, it should send some sort of notification. Then you could automatically remove the subscriber from your MailChimp database.)

    Not sure if this is the real issue, but MailChimp shouldn't complain if you attempt to add an email that's already on the list. It's smart enough to not create duplicates.
  • mwinsteinmwinstein Member
    edited July 2008
    This was good. I handled this issue by checking if the email is already in MailChimp. If it is, I can just update all the rest of the contact info from the datafeed. If not already in MailChimp, then I can add a completely new record. This way, all my data in MailChimp will always be completely current with FoxyCart - Thanks!.

    Next question:

    When I test updating a contact's data and payment info, FoxyCart sends out a new "order" confirmation (billed at zero dollars). That seems like it will be confusing to people. Is there a way to send something else, such as a "change" confirmation?
  • cfncfn Member
    Just bumping this for a response to mwinstein's last comment, about the new order confirmation being auto-sent. I could see where it would be possibly confusing to a customer, if thats actually the case.

    - John
  • lukeluke FoxyCart Team
    We've been thinking about this as well. We "eat our own dogfood" and run into these same challenges when using FoxyCart to service FoxyCart customers. I'm not sure we have an elegant solution yet, short of adding a new email template just for dealing with customer updates. We also want to keep things simple as most stores probably won't want to mess with the extra complexity.

    Do you have any ideas for us to keep it flexible and simple?
  • Comments:

    Option 1: Recurring billing is one of the most important ways to generate revenue on the web, for business or charity, and everyone else really does a terrible job. By adding this one bit of functionality, FoxyCart could easily become the absolute go-to application for people building recurring billing.

    Option 2: Just give allow us to disable emails for info-changes. All this functionality could then be handled via API through a 3rd party email service.

    While on topic of recurring billing - do you have a way to do, say, a 3 month trial at a discounted or zero price? Also, still interested in having a "self-unsubscribe" feature - this would be very useful for larger membership and subscription sites.

  • brettbrett FoxyCart Team
    "self-unsubscribe": We've mapped out our new subscription functionality pretty extensively (it was actually a lot more complicated to get a truly elegant solution than we'd anticipated), and this will be possible. As Luke mentioned, we run into this ourselves.

    Option 1: Yes, we definitely realize this. We're fairly certain that our proposed functionality will be everything you'll need. If you want I'll send you our plan for you to critique.

    3-mo trial at $0 price: You could set the start date 3 months out. That doesn't really work for discounted price... for a discounted trial period you could send in a product for the trial at, say, $5 for 3 months (NOT a subscription), then a subscription with a start date 3 months out for the normal rate of $5/mo. Would that work?
Sign In or Register to comment.