When I try to view a order in "New Orders" (by clicking on the ordername), I get a .net error:
The '$' character, hexadecimal value 0x24, cannot be included in a name.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.Xml.XmlException: The '$' character, hexadecimal value 0x24, cannot be included in a name.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Welcome to the Umbraco community! Could you try and check your orderline properties in your DB. Does any of them start with a $ - then you have the answer to your problem :) You can also try when you have added your product to your cart and say "TeaCommerce.getOrder()" in FireBug and see the output and see if any of the orderline properties isnt formatted correctly.
I've checked the DB, but can't find anything starting with $. But there are a Alias in OrderLineProperty called ctl00$ctl00$ContentPlaceHolder1$SignupMinicart1$TextboxCampaign. Could it be this?
The problem is the ctl00$ctl00$ContentPlaceHolder1$SignupMinicart1$TextboxCampaign orderline property (the prices is no problem). How did you add these orderline properties? Do you use the Tea Commerce starter kit?
There's a few things to this problem! Might not be all of them in your specific case.
1. You cannot have a ASP.NET form tag around your Tea Commerce code, for the JavaScript fallback to work. 2. You cannot have ASP.NET fields in your Tea Commerce form (obviously because of the first one) 3. What happens when you submit your form to the AddOrderLine url is, that ALL fields posted is treated as order line properties and thus added to the order line. Your .NET fields included, and their names will destroy the XML output of the order.
To fix it you must clean your html for ASP.NET stuff. Also you might have a JavaScript error that makes the JavaScript fallback form post kick in.
I hope I have written something that will help you in the right direction. Feel free to ask about any suplementary stuff. :)
I can see the problem with the web form... The thing is that my button have to be in the webform. Is there anyway to "clean up" the html before post? I can see that viewstate is posted too. Or can I create a goToPaymant in codebehind?
The xslt extension method GetPaymentForm will create the form for you and the parameter string you send with it should be the html for the button you would like to use. You can do that in your code behind.
Note that the method will return you a full form. You should still not have an ASP.NET form around.
I found out that the goToPaymant() js function is creating a form element out side the default .net form. So the form post to paypal isn't nested in the .net form. But I can see that the login control, and viewstate is still captured, and saved in db.
I'am not using any xslt on my site. It's only masterpages and usercontrols.
Error in view order
Hi!
When I try to view a order in "New Orders" (by clicking on the ordername), I get a .net error:
I'am using Paypal as payment provider, and USD in currency. The only 2 properties I'am sending to paypal is productName, and productNumber.
Have someone seen this error before?
/Morten
Hi Morten
Welcome to the Umbraco community! Could you try and check your orderline properties in your DB. Does any of them start with a $ - then you have the answer to your problem :) You can also try when you have added your product to your cart and say "TeaCommerce.getOrder()" in FireBug and see the output and see if any of the orderline properties isnt formatted correctly.
Kind regards
Anders
Hi Anders,
Tak for hurtig respons! :)
I've checked the DB, but can't find anything starting with $. But there are a Alias in OrderLineProperty called ctl00$ctl00$ContentPlaceHolder1$SignupMinicart1$TextboxCampaign. Could it be this?
My order in firebug looks correct.
Morten
Ok, I checked firebug again..
The property TotalPriceFormatted has a value with "$24.00", and TotalVATWithoutFeesFormatted is "$0.00". Could it be this?
Hi Morten
The problem is the ctl00$ctl00$ContentPlaceHolder1$SignupMinicart1$TextboxCampaign orderline property (the prices is no problem). How did you add these orderline properties? Do you use the Tea Commerce starter kit?
Kind regards
Anders
No I don't use the starter kit, becouse I had a complete umbraco site, before I installed tea commerce.
Don't know why that property is there.. Somehow the loginbox is there too (ctl00$ctl00$LoginViewUser$LoginBox$Password).
This is the test code I use:
Hi Morten,
There's a few things to this problem! Might not be all of them in your specific case.
1. You cannot have a ASP.NET form tag around your Tea Commerce code, for the JavaScript fallback to work.
2. You cannot have ASP.NET fields in your Tea Commerce form (obviously because of the first one)
3. What happens when you submit your form to the AddOrderLine url is, that ALL fields posted is treated as order line properties and thus added to the order line. Your .NET fields included, and their names will destroy the XML output of the order.
To fix it you must clean your html for ASP.NET stuff. Also you might have a JavaScript error that makes the JavaScript fallback form post kick in.
I hope I have written something that will help you in the right direction. Feel free to ask about any suplementary stuff. :)
/Rune
Hi Rune,
Thanks for your reply!
I can see the problem with the web form... The thing is that my button have to be in the webform. Is there anyway to "clean up" the html before post? I can see that viewstate is posted too. Or can I create a goToPaymant in codebehind?
Morten
Hi Morten,
The xslt extension method GetPaymentForm will create the form for you and the parameter string you send with it should be the html for the button you would like to use. You can do that in your code behind.
Note that the method will return you a full form. You should still not have an ASP.NET form around.
/Rune
Hi again,
I found out that the goToPaymant() js function is creating a form element out side the default .net form. So the form post to paypal isn't nested in the .net form. But I can see that the login control, and viewstate is still captured, and saved in db.
I'am not using any xslt on my site. It's only masterpages and usercontrols.
Hi Morten
Do you have a test url where I can see your html and see how its structured?
Kind regards
Anders
Hi Anders,
Do you have a mail that I can send the link to? The site is still in beta, so I can't post it here.
info(at)teacommerce.dk
Problem solved!
I used an old/wrong way to add orderlines in C#.
After some googling I found this: http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/21953-Creating-an-order-and-adding-product-lines-Net-API-Getting-started?p=1
Thanks for helping out with this Anders!
is working on a reply...