Basket failure in non-english languages


https://forum.kartris.com/Topic2461.aspx
Print Topic | Close Window

By tasosdr - Tue 15 Oct 2013
Dear all,

I recently started to develop an e-shop solution based in your platform. The fact that it was supporting different languages in an easy to implement way was the key to select it. The solution I am developing has to be in 3 languages, namely: English, Greek, German. My residence is in Greece and Greek is the default language.
The broblem that I came onto has as follows:
1. If I try to see the basket while empty I do it as expected in all 3 languages.
2. If I add a product then in Greek and German the mini-basket does not update (stays to 0) and if I click to show basket or checkout then the platform crashes and I can not even acces any page in these two languages. The English (e.g /default.aspx?L=1) works fine and there one can see that the products have been added correctly.
3. I have tried everything I could imagine or think in Admin config to a vein. I am citing below the error log record.
I would appreciated greatly a quick answer becouse I am running out of time in delivering the content.
Best regards,

Tasos Drosiadis
PS. Also in both non english languages the expression $_ADD of the button in the product to add does not displays the translated value. I have putted the translations in the FormButton_Add variable.The stage fase of the e-shop can be found for your review at: http://dev.rira.gr

Error Lor record
-----------------------------------------------------------------------------
>> Version:2,5004
>> URL:http://dev.rira.gr/Product.aspx?ProductID=12&CategoryID=1&L=2
>> Page:
-----------------------------------------------------------------------------
>> 16/10/2013 12:00:21 πμ
>> 5.55.93.136
>> DESCRIPTION:
System.Data.SyntaxErrorException: Syntax error in the expression.
at Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at Product.Page_LoadComplete(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Page.OnLoadComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================


-----------------------------------------------------------------------------
>> Version:2,5004
>> URL:http://dev.rira.gr/Basket.aspx
>> Page:
-----------------------------------------------------------------------------
>> 16/10/2013 12:00:28 πμ
>> 5.55.93.136
>> DESCRIPTION:
System.Data.SyntaxErrorException: Syntax error in the expression.
at System.Data.ExpressionParser.Parse()
at System.Data.DataExpression..ctor(DataTable table, String expression, Type type)
at System.Data.DataTable.Compute(String expression, String filter)
at TaxRegime.CalculateTaxRate(Double V_Tax, Double V_Tax2, Double D_Tax, Double D_Tax2, String D_TaxExtra)
at BasketBLL.Validate(Boolean blnAllowOutOfStock)
at Templates_BasketView.LoadBasket()
at Templates_BasketView.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================



By Emmanuel - Fri 18 Oct 2013
Hi Tasosdr,

I've been dealing with the exactly same issue with french language.
(I'am curently testing kartis for integration to SAP B1)

The problem is related to decimal separator handling.

I've found a dirty workaround for now:
In file \App_Code\BLL\TaxBLL.vb
replace the following line
expr = expr.Replace(",", GetCurrenciesFromCache().Select("CUR_ID=" & HttpContext.Current.Session("CUR_ID"))(0)("CUR_DecimalPoint"))

by
expr = expr.Replace(",", ".")

You still have an error message at the last step of the checkout, but order is registered.

I will try to look deeper into the code and try to find a better solution to solve it.

Regards
Emmanuel
By Paul - Fri 18 Oct 2013
We have had some problems due to the decimal separators. It can be quite troublesome because some third party systems need one or the other, as well as what gets returned to us, and plus we're running on servers with different settings but also want to be able to display prices to customers with the right 'culture' on the same site.

So for example, we might be formatting for a customer in German with comma, but passing the order to a payment gateway that only likes decimal points. And the site runs on a US English server, and serves some customers in EUR/German and others in USD/English.

I recall we had a problem on a Dutch site, and the quick fix was to set all currencies to use . as the decimal separator in the back end (which got used in the tax BLL), but then we actually use the language culture for formatting now instead (so I think the decimal separator field in the currencies might be redundant in this case).

Would appreciate any feedback from how this works with users running on servers which are running non-English windows.
By Emmanuel - Fri 18 Oct 2013
Hi Paul

Thanks for the Quickfix Idea Smile

My test system is running Win8.1 Fr localization settings, and i'm currently working for a short term project with algerian culture settings. I'll keep you informed about eventual issues.

Regards;
By tasosdr - Fri 18 Oct 2013
Dear Emmanuel,

Thank you for searing your experience. It did help a bit meaning that now the basket updates the added products in the min-basket display correctly but allas when you try to display the basket by clicking at the display bsket button in the mini-basket the system again crashes in the Greek and German languages.
I am desperatelly waiting for a more stable and firm solution I believe so do you.
Thanks again.

Tasos
By tasosdr - Fri 18 Oct 2013
As stated to my reply to Emmanuel, also the quick fix does helps to update correctly the mini basket but fails when you are actually clicking to the 'display basket' button in the mini-basket display. The system craches and does not display anything in the non-English languages. You have to return back to english language.Running on aan Win 7.0 greek computer
By Emmanuel - Fri 18 Oct 2013
Hi

I've done a few more test :

(running with server and client french culture setting)

With DirtyFix
1 Fr + Eur and "." error display, but order is registered (seems to be related with the display of "Checkout Complete" html report)
2 Fr + Eur with "," error display, but order is registered (seems to be related with the display of "Checkout Complete" html report)

Without DirtyFix
3 English + EUR with "," ok
4 FR + EUR With "," nok (crash if adding item with tax in basket, as in first tasosdr post)
5 FR + EUR with "." same error as in 1 (seems to be related with the display of "Checkout Complete" html report)
6 English + EUR with "." : OK

With the Checkout Crash, you have to delete browser cookies for having other foreign display working again.

Regards;
By tasosdr - Fri 18 Oct 2013
I confirm Emmanuels findings in Greek environment.

Tasos
By Emmanuel - Fri 18 Oct 2013
Found why i had an error on last step of the checkout process : BigGrin

solved by adding a renamed copy of Email_OrderConfirmation_EN.html as Email_OrderConfirmation_FR.html in \\kartris\Skins\Kartris\Templates Smile

Some strange things noticed with EUR and "." setting :

With EUR and "." setting and french language :
price display on products.aspx with ","
Checkout.aspx with ","
mini basket display with ","
invoice display with ","
...

Seems that its always trying to display culture separator even if currency setting is set to "."
As long as data are correctly inserted into the db ... Smile

So without modifying the code , with all currencies with "." separator works fine for me. (offline payment for now)
I didn't have crash on clicking to the 'display basket' button in the mini-basket display (used product with taxes for test, and BasePrice Before VATax)

If you still have some crashes check for missing translated entries in the db, i rember having some trouble with the language file import and made an sql script for filling empty language desc value by english language if present.)

Regards;
By tasosdr - Sat 19 Oct 2013
Dear Emmanuel,Seems that the only remaining problem is that I cannot find a solution in how to display the basket clicking at the mini-basket's button. It is always crashes. I have translated nearly all the texts but nothing. Can you please give me a detail walkthrough of how you managed to solve it becouse I really run out of time?
Thanks in advance,
Tasos
By Emmanuel - Mon 21 Oct 2013
Hi Tasosdr;

I didnt do much more than that... did you setup a correct email and smtp in the config settings?
(mail is enabled by default but with empty smtp value, wich throw an error)
also check if you have a translated value on the products and versions you are using if you created them before adding the new languages.
What does the log says ? what is the tax rate you apply ?

Regards;
Emmanuel
By tasosdr - Mon 21 Oct 2013
Thanks for the insights.I will check again for the smtp details. The VAT is 23% and the products have been isntalled after I have installed the languages (I have deleted the existed pre-installed samples and installed the real ones).
It is getting a really pain in the ... this problem. I have to find a solution and I dont know how.

The new Error Logs (after all the changes made through these discussion) are as follows:
-----------------------------------------------------------------------------
>> Version:2,5004
>> URL:http://dev.rira.gr/Basket.aspx?L=2
>> Page:
-----------------------------------------------------------------------------
>> 21/10/2013 9:23:42 μμ
>> 5.55.93.136
>> DESCRIPTION:
Can't retrieve country info in the specified language -- COUNTRY_ID: 90 LANGUAGE_ID: 2

==================================================



-----------------------------------------------------------------------------
>> Version:2,5004
>> URL:http://dev.rira.gr/Basket.aspx?L=2
>> Page:
-----------------------------------------------------------------------------
>> 21/10/2013 9:23:42 μμ
>> 5.55.93.136
>> DESCRIPTION:
System.NullReferenceException: Object reference not set to an instance of an object.
at UserControls_ShippingMethodsEstimate.Refresh()
at Templates_BasketView.Page_PreRender(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================



Any insights? I am really desparate.


Tasos
By Emmanuel - Mon 21 Oct 2013
i wil try to create a 23% tax to check on my side.
What settings are you using for general.tax. ?
By tasosdr - Mon 21 Oct 2013
NAMEVALUE
general.tax.euvatcountryGREdit
general.tax.euvatnumbercheckyEdit
general.tax.pricesinctaxyEdit
general.tax.shippingshippingEdit
general.tax.usmultistatetaxnEdit

By tasosdr - Mon 21 Oct 2013
After a great deal of searching through all the shipping and taxing details and variables I managed to SOLVE the issue by translating ALL the major destinations and shipping strings to the other languages.Thank you all for your support.

Tasos
By Paul - Mon 21 Oct 2013
Just a quick observation regarding your config settings. You have the EU VAT country set to GR, but the country code for greece is EL. This is the two letter ISO code (international standard) for Greece, which will be in the Kartris destinations data for Greece. If you have your config setting set to GR, it's not going to recognize that Greece is your home country for VAT purposes. You should change that config setting to EL.
By tasosdr - Mon 21 Oct 2013
Thanks for you advice!

Tasos