Simple Membership Plugin › Forums › Simple Membership Plugin › Payment buton direct link
- This topic has 6 replies, 4 voices, and was last updated 10 years, 1 month ago by
Randy.
-
AuthorPosts
-
August 30, 2016 at 7:51 pm #8045
simatecve
Participantas I can create a payment link , I created the button and it works perfect but I need the direct link to pay
August 30, 2016 at 11:50 pm #8050mbrsolution
ModeratorHi, what do you mean by the direct link to pay?
Thank you
August 31, 2016 at 10:50 pm #8066TroyWolf
Participant@simatecve, If you want a standard link instead of a button, I just tested this solution and it works. Use the SM form shortcode like you normally would, then add a bit of CSS to hide the button that is part of the form. Then create a link that will submit the form when clicked.
Here is one way to do it. This is what you’d put in any page where you want the “join” link. Of course your ID will be different–so don’t copy this verbatim–use your own SM form shortcode.
[swpm_payment_button id=643 button_text="Join Now"] <style> .swpm-subscription-button-submit { display: none !important; } </style> <a href="#" onclick="document.forms[0].submit()">Click here to join</a>Notice the forms[0] part above. This will submit the first form on the page (hidden or not). If you have other forms on the page ahead of this one, you may need to change this to forms[1] or [2]–you get the idea.
Alternatively you could use a selector to find the submit button using the classname, then click() it. Here is a jquery option:
<a href="#" onclick="jQuery('.swpm-subscription-button-submit')[0].click()">Click here to join</a>Of course you’ll need to use the raw text editor for the page to add this snippet instead of the Visual editor.
September 1, 2016 at 12:28 am #8070mbrsolution
Moderator@TroyWolf I am pretty sure that @simatecve is referring to is adding a PayPal button link in a table.
For example you add a table on a page or post for people to purchase a product or service. In each option of the table there is a payment button added. Many keep asking for a unique PayPal link from Simple Membership to add to the table buttons. I could be wrong with my thought though 🙂
September 1, 2016 at 12:33 am #8073TroyWolf
ParticipantHmmm, I did my best to interpret his somewhat cryptic post!
What you describe–adding PayPal links (or buttons) in a table, wouldn’t you just log into your PayPal account, create the button or link, then copy the code it gives you and paste into your WordPress page? Simple Membership wouldn’t play any part in it.
September 1, 2016 at 12:39 am #8075mbrsolution
ModeratorYou are doing a great job with your help and support, thank you 🙂
I might be wrong with my interpretation and you might be right. It’s just that a similar question like the one above has been asked many times before. I am waiting for @simatecve to reply to my first post above. Then both of us will know 😉
September 2, 2016 at 8:42 pm #8110Randy
ParticipantThank you @TroyWolf I used the following and it works great.
Kind regards,
Randy
Added the following to my CSS: .hidden-button { display: none !important; visibility: hidden !important Used the following html: <div class="hidden-button"> [swpm_payment_button id=YOUR ID HERE] </div> <a href="#" onclick="document.forms[0].submit()" <div class="YOUR CSS CLASS NAME GOES HERE"> BUY NOW OR WHATEVER TEXT YOU WANT GOES HERE </a> </div> -
AuthorPosts
- You must be logged in to reply to this topic.