Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – best way to add a custom form on checkout ?
- This topic has 7 replies, 3 voices, and was last updated 9 years, 8 months ago by mbrancaleoni.
-
AuthorPosts
-
February 22, 2015 at 11:48 am #12253mbrancaleoniMember
Hi,
I’m setting up a website using eMember and eStore plugins,
with paypal integration. So far so good
Now I’m in need to add a custom form on checkout process, before passing to paypal
(and to offline payment, since I offer both).
The form are customizations for the item purchased, which are always different
and cannot be added as “member” profile or product variations.
What is the best way to do this? the Manual Checkout Form Builder seems promising,
but then I have to recreate the paypal integration?
Other ways? No problem in digging into php, but if there’s something ready (even not free) I’ll be glad to hear.
thanks for the suggestions, matteo
February 22, 2015 at 3:28 pm #68708wzpModeratorIs your application similar to this?
February 22, 2015 at 5:57 pm #68709mbrancaleoniMemberno.
the linked post suggests to collect info on registration, but is not my case since
on every order the answers to the questions can be different.
manual checkout + additional plugin seems a solution, but since I use paypal seems that I have to implement by myself the paypal connection.
The best is to have the the checkout form builder with “standard” paypal checkout process,
but don’t know if possibile, so I’m trying to understand which way is the best.
The scenario is a website that sells “lessons” on several topics, but each time I need
to ask for how many people, when the user wants to get the lesson, some questions about the current level and so on… that’s why I cannot use registration data.
February 23, 2015 at 8:34 pm #68710wzpModeratorWould the “Collect Customer Input” or any of these options help?
https://support.tipsandtricks-hq.com/forums/topic/collecting-customer-input-with-wp-estore-plugin
March 21, 2015 at 4:32 pm #68711mbrancaleoniMemberwell, sorry for late answer.
The above solution “almost” work.
In my case each product have a different infos to collect.
I figured out that if using “buy now” style buttons, I can setup a different “landing” page after payment, where each page is a different form.
It works, but I’m missing one thing: how I can relate a submitted form with the payment?
I’m also using eMember, so maybe I can put some hidden vars into the form?
March 21, 2015 at 5:43 pm #68712mbrancaleoniMemberUpdate:
with the “Contact Form 7 Dynamic Text Extension” plugin I’m able to intercept the return values from paypal (like the txn_id) and put it into a hidden field and then into the notification email, so far so good.
Last point: since I’m using also manual checkout, which redirects to same contact form after checkout, how can I get the txn_id ? the manual checkout forms does not propagate any information to the contact form…
March 22, 2015 at 12:01 am #68713adminKeymasterYou could use the following hook to intercept after the manual checkout submission and apply your own tweaks.
Here is an example:
add_action('eStore_manual_checkout_form_data', 'custom_manual_co_tweak', 10, 2);
function custom_manual_co_tweak($payment_data, $cart_items)
{
//Print the $payment_data array to see all the info you have available to you
//Create a URL with query parameters as you need, then redirect to that page from here.
}March 22, 2015 at 3:45 pm #68714mbrancaleoniMemberYes, it works
thanks for the hints!
-
AuthorPosts
- You must be logged in to reply to this topic.