Announcement

Collapse
No announcement yet.

I'm using PayPal Pro and want to hide the credit card fields when the customer...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I'm using PayPal Pro and want to hide the credit card fields when the customer...

    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:

    HTML Code:
    <select name='PAYMENTMETHOD' size="1" onChange="javascript:HideCCDetails(this)">
    * 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:

    HTML Code:
    OrderRequiresPayment
           <table border="0" cellspacing="2" cellpadding="2" class="checkout">
    * after these lines insert the following:

    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>
    * the next line is:

    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">
    * after these lines there is a 'block if' statement. After the closing </block> tag insert the following lines:

    HTML Code:
    </table>
          </div>
          <table border="0" cellspacing="2" cellpadding="2" class="checkout">
    * 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
    Attached Files
Working...
X