HTML Hidden input/PayPal Button
Tue, 07/07/2009 - 14:49
Hello Folks,
has anyone implemented a Paypal Buy Now button on a QForm before? I know it sounds simple but I already spent a few hours on it to no avail.
So, the question is:
How do I implement a PayPal Buy Now button on a QForm with all the hidden input values?
Here is some sample code:
Paypal Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="6312777">
<input type="image" src="https://www.paypal.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.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>Thanks,
B.

no help? ....I guess the question is just too stupid uh? :-(
No, this is not a stupid question at all. What happens when you try to paste that HTML into a .tpl file? What doesn't work?
Thanks for replying Alex...However, being a .Net developer, I sort of attributed the no-2 tags functionality of WebForm to QForms. I was wrong, as soon as I read your reply, I simply posted the entire Paypal button code on my .tpl file and it worked like a charm...I spent hours assuming it won't work and was trying to figure out different ways of doing this using JScript.
I stand corrected. Thanks for reacting though, that is what helped me solve this (although very simple)!!!!
THANKS AGAIN!
P.S. By the way ALex, the JQuery file path in the config file of version 1.1, is that a typo? I always have to change it to:
// jQuery folder location
define ('__JQUERY_DIRECTORY__', __JS_ASSETS__.'/jquery.ui-1.5.3');
FROM:
define ('__JQUERY_DIRECTORY__', '/jquery.ui-1.5.3');
Just be careful that the pasted code is outside the RenderBegin() and RederEnd() calls. (Those are what write the QForm's tags to the HTML.) Nested tags are against HTML spec and may behave unexpectedly in different browsers.
Bebel - on the jQuery file path, it's actually not a typo, it's probably a deeper issue... Can you please post the output of the following commands:
echo "DOCROOT: " . __DOCROOT__. "<br>";echo "SUBDIRECTORY: " . __SUBDIRECTORY__. "<br>";
echo "VIRTUAL_DIRECTORY: " .__VIRTUAL_DIRECTORY__ . "<br>";
echo "JS_ASSETS: " .__JS_ASSETS__ . "<br>";
echo "JQUERY_DIRECTORY": . __JQUERY_DIRECTORY__ . "<br>";
This will help us troubleshoot.