Page 1 of 1

[Bug] Sku Sale price

Posted: Fri Mar 16, 2012 5:46 am
by karim.hj
Image

1) type 12.34 as sale price and 56.78 as retail price
2) save price modification
3) blc display 1234 instead of 12.34 (and 5678 instead of 56.78)
4) front is ok

Code: Select all

(${product.sku.salePrice}
)
5) db (mysql) seems ok

using broadleaf 1.6.0-M2-SNAPSHOT (develop)

Re: [Bug] Sku Sale price

Posted: Sun Mar 18, 2012 1:03 pm
by jefffischer
I'm not able to reproduce this using the demo and latest framework code from develop branch (see attachment). Have you customized pricing or the domain, or add a custom persistence handler of some sort?

Re: [Bug] Sku Sale price

Posted: Sun Mar 18, 2012 4:57 pm
by karim.hj
I did not change the domain code or modify java code !

1) I was able to reproduce it again on my machine: I've downloaded the code from github (BroadleafCommerceDemoSite/develop) https://github.com/BroadleafCommerce/Br ... ee/develop
2) But the bug cannot be reproduced on my live site hosted on broadleaf (http://demo24dd6p.broadleafcommerce.org ... oken=42469)
3) So I think it's not related to my FR locale on my Firefox browser.
4) bug can be reproduced on Win7.64bit and xpsp3.32bit, tomcat7/jetty, hsqldb/mysql5, Ubuntu (tomcat+jdk1.6.0-20+hsqldb)
5) Maybe it's coming from my system locale fr_FR ?

Very strange...

Re: [Bug] Sku Sale price

Posted: Sun Mar 18, 2012 8:19 pm
by karim.hj
if you were not able to reproduce the bug it is because it's related to the system's locale.
I did the test:

1) On my LinuxMint I've tested with fr_FR.UTF-8
2) On my LinuxMint I've tested with an en_US.UTF-8

(locale can be changed by editing /etc/default/locale)
I used the same Tomcat7 folder (same broadleafdemo.war inside)
But the products in listView(left) have not the same format and in the formView(right) the bug still remains.

1) BUG
ScreenShot015.jpg
fr_FR
ScreenShot015.jpg (80.27 KiB) Viewed 16840 times

2) NO BUG
ScreenShot014.jpg
en_US
ScreenShot014.jpg (74.23 KiB) Viewed 16840 times


I guess the locale must be fixed to en_US somewhere so as to work BL correctly (in jdk :!: ,in application server , in blc code )
To be continued...

Re: [Bug] Sku Sale price

Posted: Sat Mar 24, 2012 10:38 pm
by jefffischer
This should be resolved in the latest develop branch (and in the latest snapshot release on our nexus). This is version 1.6.0-M2-SNAPSHOT. The JIRA issue that references this is:

http://www.broadleafcommerce.org/jira/browse/BLC-383

With the fix in place, according to your example, your server side will be running in fr_FR. However, without specifying a locale in the browser, the admin UI will still run in en_US by default. However, this combination will now work correctly and the currency display and number parsing will be correct. In addition, if you would like to view the admin in the fr_FR locale, causing the currency display to be altered according to French standards, then you will need to launch your admin in that locale. The following steps are required to achieve this:

1) You must declare the locale in your *.gwt.xml. This is the gwt.xml file that is in your final admin war project. en_US should already be declared in there. For fr_FR, you'll have to add this line:

Code: Select all

<extend-property name="locale" values="fr_FR"/>


Also, if you want fr_FR to be the default, you can add this line:

Code: Select all

<set-property-fallback name="locale" value="fr_FR"/>


2) Also, an easy way to cause the admin UI to switch between available locales is to add a query parameter to the admin URL (?locale=fr_FR). There are other ways to establish the admin UI locale as well. For more information on this topic, refer to the GWT documentation at: https://developers.google.com/web-toolk ... I18nLocale.