Web Analytics Made Easy -
StatCounter 'Error on Page' - shopping cart. - CodingForum

Announcement

Collapse
No announcement yet.

'Error on Page' - shopping cart.

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

  • 'Error on Page' - shopping cart.

    hey guys, i'm having problems with a shopping cart (nopcart) i've installed. i've set it up so the customer fills in a form with there details, then hits submit and it should prepopulate the payment form (paymate.com.au) with there info and the amount and order number. but at the moment it's saying 'error on page' when the customer hits submit. the guys at the nopcart forums can't seem to fix it.

    here's the url :

    http://www.proshopexpress.com/beta.html

    and here's the code i'm having probelms with:

    --

    }


    // info for PayMate
    OrderRef = new Date();
    OrderCurr = "AUD";
    OrderAmount = document.checkout.TOTAL.value
    payme();
    // submit form

    return true;
    }

    --

    function payme() {

    var YourMid = "demonstration";

    addWindow = self.open("https://www.paymate.com.au/PayMate/ExpressPayment?mid=YourMid"+
    "&ref="+OrderRef+
    "&amt="+OrderAmount+
    "&PMT_SENDER_EMAIL="+document.checkout.b_email.value+
    "&PMT_CONTACT_FIRSTNAME="+document.checkout.b_first.value+
    "&PMT_CONTACT_SURNAME="+document.checkout.b_last.value+
    "&regindi_address1="+document.checkout.b_addr.value+
    "&regindi_address2="+document.checkout.b_addr2.value+
    "&regindi_sub="+document.checkout.b_city.value+
    "&regindi_pcode="+document.checkout.b_zip.value,
    'addWindow','height=600,width=800,scrollbars=1,toolbar=1','alwaysRaised=true');

    addWindow.focus();
    }

    --

    <a href="javascriptayme()"><img src="images/paymate_accepted_logo_large.gif" border=0></a>

    --

    thanks in advance.

  • #2
    okay I believe this is your problem:

    the variables are not global....

    SOOOO

    Orginal Code:

    Code:
    // info for PayMate 
    OrderRef = new Date(); 
    OrderCurr = "AUD"; 
    OrderAmount = document.checkout.TOTAL.value 
    payme(); 
    // submit form 
    
       return true; 
    } 
    
    </SCRIPT>
    	
    <SCRIPT>
       function payme() { 
    
    var YourMid = "embarko";

    New Code
    Code:
    // info for PayMate 
    OrderRef = new Date(); 
    OrderCurr = "AUD"; 
    OrderAmount = document.checkout.TOTAL.value 
    payme(); 
    // submit form 
    
       return true; 
    } 
    
    var OrderRef; 
    var OrderCurr; 
    var OrderAmount;
    
    function payme() { 
    
    var YourMid = "embarko";
    See if that does the trick....
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment


    • #3
      thanks. but it's still saying 'error on page' when i try to submit the form.

      Comment

      Working...
      X