Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hutch White 89 posts 112 karma points
    Dec 12, 2012 @ 17:35
    Hutch White
    0

    Order Properties update form on Accept Cart Step 4

    Hey guys,

    I'm trying to add the following to the cart step 4 xslt:

          <div id="discountInformation">
            <h2>Discount Code</h2>
            <label for="discCode">
              Enter discount code here:
            </label>
            <form action="/tcbase/teacommerce/SubmitForm.aspx" method="post">
              <input name="ReturnUrl" type="hidden" value="{umbraco.library:NiceUrl($currentPage/@id)}" />
              <input name="UpdateOrderProperties" type="hidden" value="discountCode" />          
              <input type="text" id="discountCode" name="discountCode" value="{$order/properties/discountCode}" />
              <input type="submit" id="submitDiscount" name="submitDiscount" value="Update Order"/>
            </form>
          </div>

    For some reason, I get an XML error.  Can this be done here?  If so, am I missing something?

  • Rune Grønkjær 1371 posts 3102 karma points
    Dec 13, 2012 @ 08:18
    Rune Grønkjær
    0

    What kind of xml error? Have you tried debugging it with ?umbDebugShowTrace=true

    /Rune

  • Hutch White 89 posts 112 karma points
    Dec 13, 2012 @ 20:54
    Hutch White
    0

    Well, found the problem with the form error, but now I have a different but related problem.

    On OrderPropertiesUpdate I have extended this to check for my discountCode value.  I then assign the value of my discountCode to the order.PaymentFeeWithoutVAT, but seems that when doing it from the post on CartStep4, it doesn't assign a value to order.PaymentFeeWithoutVAT.  It's acting as though it is read only.  When I had the form on CartStep2, the value was writeable and worked fine.  Is there a point during the order that PaymentFeeWithoutVAT is no longer writeable?  Can I not do this during CartStep4?

  • Rune Grønkjær 1371 posts 3102 karma points
    Dec 13, 2012 @ 21:51
    Rune Grønkjær
    0

    After the order have been finalized you cannot change the payment fee. The order is finalized when you go to payment, which is normally done on step 4. So it might just be bad timing?

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft