Donation API and AJAX based Shopping Cart

Options

Hello guys,

I was in the process of looking into creating a donation form / shopping cart that will take advantage of some neat PHP and JQuery affects. I would like to keep the PHP files on our personal server space while keeping the page within Convio

Okay what I am looking to do is this. I would like to create a small database that will hold a few products. These products will have a name, a description, and a price.

The mySQL portion of this is not the problem. Where it becomes a little cloudy for me is how I can call the products into my AJAX form that is within Convio.

I'm guessing the first thing I need to do is create a crossdomain.xml file? Then build out the form to my liking while adding the API hidden fields and all that good stuff.

I'm I looking at this a little too simplistic?

Please if anyone has any suggestions I would appreciate it.

Matt

Tagged:

Comments

  • So I think you might be able to use Convio's AJAX proxy which you can set up in the Site Options section.

    But going a little simpler, couldn't you just pass the info along in the page request as a query string?

    Or depending on how often you update the product database, just ftp up an xml file (or a js file) with changes.

  • You're building a PHP-based shopping cart and your goal is to use the Donations API as the transaction processing platform only, right? Correct me if I'm wrong--that's just how I read that.

    The simplest structure here would just be to build a Donation API form that accepts a URL parameter of a dollar amount. You can use sign_redirects feature to append an MD5 hash of all query parameters plus the CONVIO_API_SECRET_KEY shared secret, and that will authenticate to the PHP system that the donation has completed.

    If you need to send a list of products to a comment field in the Donation form, you can just add a text string custom question to the shadow form, add the input for it to the custom donation form page, and set it up to accept a URL parameter as well!

    That's a very general overview...any questions, or have I missed your point entirely?

  • James Zetlen:

    You're building a PHP-based shopping cart and your goal is to use the Donations API as the transaction processing platform only, right? Correct me if I'm wrong--that's just how I read that.

    The simplest structure here would just be to build a Donation API form that accepts a URL parameter of a dollar amount. You can use sign_redirects feature to append an MD5 hash of all query parameters plus the CONVIO_API_SECRET_KEY shared secret, and that will authenticate to the PHP system that the donation has completed.

    If you need to send a list of products to a comment field in the Donation form, you can just add a text string custom question to the shadow form, add the input for it to the custom donation form page, and set it up to accept a URL parameter as well!

    That's a very general overview...any questions, or have I missed your point entirely?

    James,

    Okay maybe I can back up a little bit here... 1st how can I get product information to display within a Convio Pagebuilder page that is coming from an external DB. I have added the domain to the list of approved AJAX proxy list within my API Config.

    I would like to just be able to do that... then I can focus on getting values passed to the form.

    Thanks,

    Matt

  • Matthew Andrade:

    James,

    Okay maybe I can back up a little bit here... 1st how can I get product information to display within a Convio Pagebuilder page that is coming from an external DB. I have added the domain to the list of approved AJAX proxy list within my API Config.

    I would like to just be able to do that... then I can focus on getting values passed to the form.

    Thanks,

    Matt

    Hey guys,

    I have a test page of what I am looking to do. Mind you that this is not living within Convio. It is hosted on our personal server where the DB is also hosted.

    The way this works is you drag and drop one of the products into the empty box to the right.

    My goal was to make this process live within Convio. If I can't then I would explore using the donation API outside of Convio to acheive this same experience.

    I am using JQuery to make the calls to the PHP files in background I just want to know how I can get this same effect within Convio or even if this can be done within the Convio environment.

    I'm not concerned so much about the donation form as much as I am concenred about getting the effect of products and pricing from an external DB.

    Thanks guys!

    Matt

  • Matthew Andrade:

    Hey guys,

    I have a test page of what I am looking to do. Mind you that this is not living within Convio. It is hosted on our personal server where the DB is also hosted.

    The way this works is you drag and drop one of the products into the empty box to the right.

    My goal was to make this process live within Convio. If I can't then I would explore using the donation API outside of Convio to acheive this same experience.

    I am using JQuery to make the calls to the PHP files in background I just want to know how I can get this same effect within Convio or even if this can be done within the Convio environment.

    I'm not concerned so much about the donation form as much as I am concenred about getting the effect of products and pricing from an external DB.

    Thanks guys!

    Matt

    So a couple things:

    The donation API actually has to be used within Convio anyway, so that would not actually solve your problem. (I'm never sure about this 100% because it does not say this explicitly in the Donation documentation itself, but it's been confirmed before in the community)

    Convio's AJAX Proxy should allow you to query your database and get the info you need. Here's an example from Convio using a yahoo site to get currency data for instance. You do need to change some things in your site options to get this working as well (which this doc talks about)

    http://community.customer.convio.com/docs/DOC-2525

Categories