I'm using PayPal Pro and want to hide the credit card fields when the customer chooses a different payment method. How can I do this?
The following method will allow you to hide the credit card input fields if a customer chooses another payment method:
* go to 'Design | Text'and click on the 'Go to' button
* enter 1951 into ID and click 'OK'
* replace the text in the 'Current Value' field with:
* click 'OK'
* on the 'Design' tab, change the 'Select page type' drop-down to 'Checkout Page 2'
* on the preview pane, click on the '{Payment Method}' title
* this should load the 'Payment Phase' layout into the 'Code' window
* scroll down to the following lines:
* after these lines insert the following:
* the next line is:
Payment Method Selection
* insert the following lines after it:
* after these lines there is a 'block if' statement. After the closing </block> tag insert the following lines:
* click 'Apply' and update your site.
Article supplied with thanks by Grant Glendinning
PLEASE NOTE: This is a legacy article. It is not relevant to SellerDeck software from version 10 onwards as this feature is now included
The following method will allow you to hide the credit card input fields if a customer chooses another payment method:
* go to 'Design | Text'and click on the 'Go to' button
* enter 1951 into ID and click 'OK'
* replace the text in the 'Current Value' field with:
HTML Code:
<select name='PAYMENTMETHOD' size="1" onChange="javascript:HideCCDetails(this)">
* on the 'Design' tab, change the 'Select page type' drop-down to 'Checkout Page 2'
* on the preview pane, click on the '{Payment Method}' title
* this should load the 'Payment Phase' layout into the 'Code' window
* scroll down to the following lines:
HTML Code:
OrderRequiresPayment
<table border="0" cellspacing="2" cellpadding="2" class="checkout">
HTML Code:
<script language=javascript type='text/javascript'> function hideDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('CCDetails').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.CCDetails.visibility = 'hidden'; } else { // IE 4 document.all.CCDetails.style.visibility = 'hidden'; } } } function showDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('CCDetails').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.CCDetails.visibility = 'visible'; } else { // IE 4 document.all.CCDetails.style.visibility = 'visible'; } } } function HideCCDetails(selectObj) { if (selectObj.options[selectObj.selectedIndex].value == "10005") { showDiv(); } else { hideDiv(); } } </script>
Payment Method Selection
* insert the following lines after it:
HTML Code:
</table> <div id="CCDetails" style="visibility:hidden;"> <table border="0" cellspacing="2" cellpadding="2" class="checkout">
HTML Code:
</table> </div> <table border="0" cellspacing="2" cellpadding="2" class="checkout">
Article supplied with thanks by Grant Glendinning
PLEASE NOTE: This is a legacy article. It is not relevant to SellerDeck software from version 10 onwards as this feature is now included