• I’m having trouble with incorporating PayPal into my website, so I thought I would just use the “Add to Cart” and “View Cart” services from PayPal directly.

    I’ve had PayPal generate code for a “View Cart” button, which looks like this:

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----(deleted for post)==-----END PKCS7-----">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_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>

    On my main menu bar I have a “Shopping Cart” icon, and what I would like to do is to have the user click on that, and it would use the above code.

    So, that is question 1… I believe I can just remove the “input type=image” entry when I attach it.

    The custom HTML widgets expect to see a URL, so I’m not sure if I can attach the “<form>” to it.

    Any ideas greatly appreciated! (and sorry if this is a stupid question).

    Thanks

    • This topic was modified 4 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • When you link to PayPal, you can use the GET version, which is a link with parameters. Or you can use the POST version, which is a button in a form that contains the parameters.
    So trying to make the icon replace the button is tricky. You would need to put the icon into the button. Removing the “input type=image” part means that you are no longer sending that information to PayPal. You would need to check if that is a needed part or if it’s okay to put your icon instead.

    The custom HTML widgets expect to see a URL, so I’m not sure if I can attach the “<form>” to it.

    This part doesn’t make sense. You should be able to put any HTML. If the syntax checking is saying there is an error, it could be wrong syntax, or it could be that is something new that the checker doesn’t know about yet. (You can disable the checker in your User Profile.)

Viewing 1 replies (of 1 total)
  • The topic ‘Menu item with custom HTML’ is closed to new replies.