This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

How to Add Paypal Link to Buttons

  • Creator
    Topic
  • #23775

    I’m trying to have some buttons link to paypal, but I have the form code below and not URL. Is there a way to click on the button and have it direct to run the form below?

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="LD4BECQSQYCNW">
    <table>
    <tr><td><input type="hidden" name="on0" value="IFIT BOARD">IFIT BOARD</td></tr><tr><td><select name="os0">
    	<option value="4pc PACKAGE">4pc PACKAGE $150.95 USD</option>
    	<option value="IFIT BOARD">IFIT BOARD $99.95 USD</option>
    	<option value="ROLLER">ROLLER $29.95 USD</option>
    	<option value="CUSHION">CUSHION $15.95 USD</option>
    	<option value="BAND">BAND $15.95 USD</option>
    </select> </td></tr>
    </table>
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" />
    </form>
Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #23782
    Jason Bobich
    Keymaster

    Hi,

    In this case, with the given code from PayPal, it is given to you as a form with its own form submission button. So, there is no URL you can use within a button of one of the elements in the layout builder. Just use a “Content” element within your layout, and then throw your HTML for the PayPal form in there.

    #23835

    This particular problem is on the homepage, which is based on the template. I attempted to add a “content” element and paste the code into that element. However, it is not appearing as any type of anything to click on and lead to paypal, but a list of items. Also, I don’t know how to get it to appear on top of the image where the current “paypal button” is. (see “Featured product” section of the homepage at http://www.imgdemo.com

    I’ve attached a screenshot of the template settings for this slider in the event that it helps identify what I’m doing wrong. http://s24.postimg.org/9nbkuwlsl/Screen_Shot_2015_11_03_at_9_28_27_PM.png

    #23862
    Jason Bobich
    Keymaster

    I tested your code on my end, and the problem is that not all of the HTML is going to be accepted by the layout builder. Some of it is getting removed for safety in the sanitization process when saving a layout.

    Here’s a workaround. I’ll try and lay this out in steps.

    1. Create a standard WordPress page at Pages > Add New in your WordPress admin.
    2. Name the new page whatever you want.
    3. Copy your PayPal code into this new page’s content.
    4. Publish the page.
    5. Go back to the layout builder and edit your homepage template again.
    6. Add the element called External Post/Page to the layout.
    7. Within the element’s options, input the ID of the page you created.

    #24017

    I tried the steps above, but I end up with the same result…no button to click on but a list where I was hoping a button would appear. http://www.imgdemo.com

    Am I doing something wrong?

    #24031
    Jason Bobich
    Keymaster

    When you copied your PayPal code to the external page’s content, where did you copy it from? Did you copy from the original source, or did you copy from the textarea in the layout builder where your code had been sanitized? Make sure you copied it from its original source.

    Also, if that’s not the case, try updating the theme to the latest version. There was a thing or two that got changed in the last couple updates I think could be effecting this for you.

    http://support.themeblvd.com/theme-update-instructions/#themeforest

    I have your code working here with the latest version of the theme and the layout builder:

    http://demoblvd.com/themes/denali/demo-1/test/

    #24060

    I updated the theme, which corrected the issue on the homepage. However, I’m still having the issue of code showing on the “SHOP” page when I follow the same technique. I’m not sure what is different about the shop page that is causing the issue.

    http://www.imgdemo.com/shop-3/

    #24062
    Jason Bobich
    Keymaster

    Hm, weird. Is it possible you pasted your code into the “Visual” tab of the WordPress page editor? I can’t think of how else that would be possible. Whenever you’re working with HTML, you need to make sure to click to the “Text” tab of your WordPress page editor. Is that maybe what happened here?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.