Hey to follow up, the easiest would be if you could add a unique ID attribute to each price button html tag, then you can use that jQuery code.
If you can’t do that, you’ll need to traverse the DOM in jQuery to pinpoint each individual pricing button. It’s a fairly straightforward thing to figure out for most JavaScript developers if that’s not up your alley.
hey, I need help with this.
Can you clarify how this should be done.
I have my own hyperlinks ready to go, and need to use these rather than having to style those nasty blue buttons.
Can you tell me exactly where everything should go please.
Thanks
@webfreshing My previous post explains it, but we recently moved the instructions here and added a few more tips.
http://wpstripe.net/docs/misc/calling-stripe-checkout-externally/
Thanks for your reply Phil. Sorry I’m being so dumb here.
I’m obviously not a developer or used to working with jQuery and javascript at all.
I’ll be needing the pro version of this plugin later for subscriptions, but I need to get this working using my own buttons and links for now.
I followed the instructions on the provided page, and I see it’s been updated slightly. Unfortunately, while the shortcode button works, I cannot get my link to work.
Would you mind letting me know what I have done wrong please?
I’ve tried inserting the jQuery in header, footer and on page, but it simply doesn’t work for me. I’ve probably done it all wrong.
<!--Start of Buy Button-->
[stripe name="this offer" description="bonus" amount="7900"]
<div class="buttons buttons_big"><a href="#">Get this Today!</a></div>
<script>
jQuery('#paymentButton').click(function(e) {
e.preventDefault();
jQuery('#sc_checkout_form_1').submit();
});
</script>
<!--End of Buy Button-->
sorry, the id is not being shown in the code. The code I have is as follows:
<!--Start of Buy Button-->
[stripe name="this offer" description="bonus" amount="7900"]
<div class="buttons buttons_big"><a href="#" id="paymentButton">Get this Today!</a></div>
<script>
jQuery('#paymentButton').click(function(e) {
e.preventDefault();
jQuery('#sc_checkout_form_1').submit();
});
</script>
<!--End of Buy Button-->
Looks correct to me.
Did you edit this in the Text (source) tab and save there?
Are there any other theme or plugin conflicts going on? Or script errors in the console?
Do you have a test page I can take a look at?
Thanks.
Thanks for the reply again.
At least you have confirmed that I have added the Javascript correctly. That was my first doubt.
Yes, I added this to the source tab.
I don’t see any conflicts or errors at all in the console
I have tried a different theme also
The blue button from the shortcode works without any issues. My link just does not.
here is a test page. I have commented out the css that hides the blue button, so you can see it working.
http://www.websitemint.com.au/promo/about-us/
Hope you can help.
By the way, I have no other plugins activated either.
It’s ok. I appreciate your help, but I wanted to use this to make things easier, and I’ve run out of patience with it.
Thanks for your time anyway.