SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Non-Member
    Join Date
    Dec 2010
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    calculate shipping button, executes make purchase!

    Hi,
    I am not a PHP guy. I have managed by some miracle to re-arrange some code to change the layout of my checkout page.
    To do so I had to move the shipping calculation form inside the form which contains the email address, billing/shipping address and purchase button.
    I was just starting to feel rather proud of myself when I tried a new postcode to calculate shipping.
    Clicking the calculate shipping button processed the order, just like the Purchase button. Seems to only happen if it is clicked after shipping has already been calculated once.
    As you can imagine this is not desirable ;-)

    The test site is here Ashford | The Craft Circle
    just add something to the cart and go to checkout, use 3000 as a postcode. you will have to enter a junk billing address and email. It is not connected to any payment system yet. It it will just do a fake checkout.

    I zipped and attached the pages php file
    line 194 is the shipping calculate button
    line 505 the Purchase button
    Attached Files Attached Files

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gasonm View Post
    Hi,
    To do so I had to move the shipping calculation form inside the form which contains the email address, billing/shipping address and purchase button.
    Stop right there...!!!

    It's not valid to have a <form> inside another <form>. If you do have a form inside another form you're going to have all sorts of problems.

  3. #3
    Non-Member
    Join Date
    Dec 2010
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ow that hammer hurts!!!
    So I am suitably chastised and as I said I don't know much about PHP, is there any way out of my problem?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •