PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Integrating Gravity Forms with Shopp plugin

  1. antonsamper
    Member

    Hi there,

    Im not sure if this is the right place for this question but as i cant seem to post anything of the Shopp forum without actually purchasing Shopp then i hope someone here can help.

    I want to setup an e-commerce website and i've been looking around many sites and comparing what each of them offer. Shopp seems to be the most flexible but before i buy, i thought i would ask if anyone had successfully and easily integrated Gravity Forms with Shopp?

    What i would like to do is use the Mailchimp and Freshbook add-ons to keep tracks of orders and customers.

    Has anyone attempted this?

    Anton

    Posted 14 years ago on Monday May 3, 2010 | Permalink
  2. Anton,
    So you would like to use a Gravity Form (with the addons) during Shop's checkout process? I imagine that being a little tricky if at all possible. However, this question would be better answered by the Shop folks.

    Posted 14 years ago on Monday May 3, 2010 | Permalink
  3. antonsamper
    Member

    Yep, thats correct. I'll try and send them an email and see what they say. I'll post back any feedback i receive.

    Posted 14 years ago on Monday May 3, 2010 | Permalink
  4. antonsamper
    Member

    I didnt get a reply from the Shopp guys however i've tested the following script and it seems to work ok. Can you see any obvious problems with it?

    $url = "__WORDPRESS PAGE/POST URL__";
    
    $post_data = array (
    	"is_submit_1" => "1",
    	"input_X" => "name",
    	"input_X" => "email@email.com"
    );
    
    $ch = curl_init();
    
    curl_setopt($ch, CURLOPT_URL, $url);
    
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    // we are doing a POST request
    curl_setopt($ch, CURLOPT_POST, 1);
    // adding the post variables to the request
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    
    $output = curl_exec($ch);
    
    curl_close($ch);

    I found that the URL had to be different from the ones that calls it but this isnt a problem for my situation.
    In the real situation, I would replace the post_data object with the values submitted on the checkout process.

    Posted 14 years ago on Tuesday May 4, 2010 | Permalink
  5. I think this will do the trick. You just have to make sure to do the validation before posting to the form (assuming you have required fields, etc.. in your form). Otherwise you will think the form was processed, but it actually was not.
    Also, keep in mind that the 1 in "is_submit_1" refers to the form id. So if your form id is 5, you should use "is_submit_5" instead.

    Good luck!

    Posted 14 years ago on Wednesday May 5, 2010 | Permalink
  6. Could you describe what you're doing here in more detail? I'm interested in doing the exact same thing, but unsure what to do with the script mentioned above. Thank you.

    Posted 13 years ago on Thursday September 1, 2011 | Permalink