simpleCart(js)

items
Items:
Total:

SendForm Checkout

SendForm checkout allows you to submit a form to an arbitrary url, which can allow you to do a custom checkout.  You can setup the method like this:

simpleCart({
    checkout: { 
        type: "SendForm" , 
        url: "http://example.com/your/custom/checkout/url" 
    } 
});

There are additional optional parameters that can be set as well:

simpleCart({
    checkout: { 
        type: "SendForm" , 
        url: "http://example.com/your/custom/checkout/url" ,

        // http method for form, "POST" or "GET", default is "POST"
        method: "GET" , 

        // url to return to on successful checkout, default is null
        success: "success.html" , 

        // url to return to on cancelled checkout, default is null
        cancel: "cancel.html" ,

        // an option list of extra name/value pairs that can
        // be sent along with the checkout data
        extra_data: {
          storename: "Bob's cool plumbing store",
          cartid: "12321321"
        }
    } 
});

 

Comments

  1. May 31, 2012

    Michiel Kempen  said:

    I am Michiel Kempen, 17 years old and I live in Belgium.
    I am trying to setup a webshop with simplecartjs. I have setup a whole process trough many pages but now I need to store all my data in a mysql database. How can I store the items ans prices in my database without using <div class=“simpleCart_items”></div>.

  2. Jul 02, 2012

    Webdaddy  said:

    Have the values for simpleCart_total and simpleCart_grandTotal been purposely omitted from the form variables returned by the SendForm checkout method?

    If so, how can I have them included? If not, what I am missing?

Commenting is not available in this channel entry.