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?
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?
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?
What kind of xml error? Have you tried debugging it with ?umbDebugShowTrace=true
/Rune
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?
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
is working on a reply...