Announcement

Collapse
No announcement yet.

Updating basket on OPAY gives "The contents of your basket changed" error

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

    Updating basket on OPAY gives "The contents of your basket changed" error

    Hi all,

    I'm working on an OPAY page redesign that includes a live basket.. like on the BASK page, where each basket line has its own Remove (RPRD action) and Update (QNTY) buttons. I've got it basically working with this code; hitting either button reloads OPAY with the updated cart:

    HTML Code:
    <mvt:foreach iterator="item" array="basket:items">
    <tr><td class="product-remove">
         <form method="post" action="&mvt:global:secure_sessionurl;">
          <input type="hidden" name="Action" value="RPRD">
          <input type="hidden" name="Screen" value="&mvte:global:Screen;">
          <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
          <input type="hidden" name="Basket_Line" value="&mvte:item:line_id;">
         <mvt:item name="buttons" param="Remove" /></form></td>
        <td class="product-update">
         <form method="post" action="&mvt:global:secure_sessionurl;">
          <input type="hidden" name="Action" value="QNTY">
          <input type="hidden" name="Screen" value="&mvte:global:Screen;">
          <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
          <input type="hidden" name="Basket_Line" value="&mvte:item:line_id;">
         <input type="text" name="Quantity" value="&mvte:item:quantity;" size="4" />
         <mvt:item name="buttons" param="Update" /></form></td>
    </tr>
    </mvt:foreach>
    The problem comes up when I try to move on to the INVC screen, with this:

    HTML Code:
    <form method="POST" action="&mvt:payment:url;">
    <input type="hidden" name="Screen" value="INVC" />
    <input type="hidden" name="Action" value="AUTH" />
    <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" >
    <input type="hidden" name="PaymentMethod" value="&mvte:global:PaymentMethod;">
    ...(payment fields etc.)...
    <input id="purchase" type="image" src="../images/purchase.gif" alt="Purchase" />
    </form>
    I get dumped back onto a blank OCST, with a message reading:

    The contents of your basket changed during the checkout process. As a security precaution, you have been returned to the beginning of the checkout process.

    How can I avoid being dumped back onto OCST at this point? I'm already updating the cart securely, and my customer wants the live basket on the final checkout page, so I can't just move it somewhere else.

    Any help's very appreciated! 'sbeen driving me up the wall.

    Thanks..

    #2
    Re: Updating basket on OPAY gives &quot;The contents of your basket changed&quot; error

    That is a security feature that stops people from having two screens open and making changes to avoid shipping, taxes, etc. You never want to make changes to cart contents once you enter checkout.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #3
      Re: Updating basket on OPAY gives &quot;The contents of your basket changed&quot; error

      Thanks Bill,

      I hear you, this seems like a silly requirement to me too... but this customer is, shall we say, strong-willed and knows no security features; he just knows what he wants.

      The feature’s to avoid people cheating on tax & shipping? Hmm... is there a way to rerun the SHIP,PSHP,CTAX actions so that those are all up to date, and keep the cart contents? I can imagine a scheme that would save a bunch of global vars to each Remove and Update form, post to an outside script, and totally recreate the cart on every OPAY change—but that’d be complicated and a huge pain to maintain. Is there any other way?

      Comment


        #4
        Re: Updating basket on OPAY gives &quot;The contents of your basket changed&quot; error

        Originally posted by hdfssk View Post
        Thanks Bill,

        I hear you, this seems like a silly requirement to me too... but this customer is, shall we say, strong-willed and knows no security features; he just knows what he wants.

        The feature’s to avoid people cheating on tax & shipping? Hmm... is there a way to rerun the SHIP,PSHP,CTAX actions so that those are all up to date, and keep the cart contents? I can imagine a scheme that would save a bunch of global vars to each Remove and Update form, post to an outside script, and totally recreate the cart on every OPAY change—but that’d be complicated and a huge pain to maintain. Is there any other way?
        Anyone ever figure out a fix for this? I am having this exact issue which wouldn't wouldn't be terrible except for the fact it brings me back to OCST with empty form fields.

        Comment


          #5
          Re: Updating basket on OPAY gives &quot;The contents of your basket changed&quot; error

          Same issue here--we give free products with coupon codes and this is very frustrating for customers when adding coupons during checkout that add a product to their cart automatically.

          Comment


            #6
            Re: Updating basket on OPAY gives &quot;The contents of your basket changed&quot; error

            Originally posted by jhochrein View Post
            Anyone ever figure out a fix for this? I am having this exact issue which wouldn't wouldn't be terrible except for the fact it brings me back to OCST with empty form fields.
            Toolkit #103 - Basket Filler. We use it for that purpose -- when a customer edits their basket after starting checkout.

            http://www.emporiumplus.com/1AA00223.html

            Comment

            Working...
            X