csaggo.com Posted April 26, 2022 Share Posted April 26, 2022 Hi @kongondo as allready briefly discussed in our email-exchange: We have PW running in german which means that in float - number fields the decimal point will be displayed as a comma (in fields as well as output rendering). The price gets stored correctly but when editing the product again, the price is not displayed and if you don't reenter it, it will be lost on save. In First Screen you can see that PW Float Field handles this correctly (displaying comma as decimal point but still using the dot in value attribute) In padloper price-field it uses the comma in the value attribute which the browser can't handle. so the solution should simply be to render the value with the raw version instead the output-rendering that includes the comma. Link to comment Share on other sites More sharing options...
zoeck Posted April 26, 2022 Share Posted April 26, 2022 Off topic, but shouldn't the decimal field be used for a price (not float)? Link to comment Share on other sites More sharing options...
kongondo Posted April 26, 2022 Share Posted April 26, 2022 6 hours ago, zoeck said: Off topic, but shouldn't the decimal field be used for a price (not float)? Yes, but this doesn't apply to Padloper. Padloper does not use a ProcessWire field (neither FieldtypeFloat nor FieldtypeDecimal) for price. Instead, it uses a custom Fieldtype that stores price, ex-price, etc. For price, the Padloper custom field utilises a DECIMAL (12,2) sub-field/column ?. 1 Link to comment Share on other sites More sharing options...
kongondo Posted April 27, 2022 Share Posted April 27, 2022 On 4/26/2022 at 9:43 AM, csaggo.com said: as allready briefly discussed in our email-exchange: Thanks for filing the bug report. I'll work on this and report here. Link to comment Share on other sites More sharing options...
csaggo.com Posted May 4, 2022 Author Share Posted May 4, 2022 On 4/27/2022 at 7:08 PM, kongondo said: Thanks for filing the bug report. I'll work on this and report here. @kongondosorry to bother, but do you have an ETA on this. Its pretty crucial for us, as we can't let our customer start editing product-data as long this is not working, they will just delete prices left and right. so our project is currently waiting for this fix. Link to comment Share on other sites More sharing options...
kongondo Posted May 4, 2022 Share Posted May 4, 2022 Hi @csaggo.com. Apologies, for the delay. This has taken longer than anticipated. Good news though, I now have a solution that caters for all sorts of formatting. I am currently testing and plan to release end of this week. Thanks. 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 7, 2022 Share Posted May 7, 2022 Hi @csaggo.com, Work on price fields to accommodate international currencies is now complete. Decimal styles are now handled correctly. In addition, thousands are also separated correctly (automatically). To help with this, we now have a new setting in Shop / General Settings -> Standards Tab -> Currency Format (please see screenshots below). Price fields will be formatted based on this new setting. Price fields also display the currency symbol if one exists or the currency's abbreviated name. Currently, this is not configurable but I can add this in future if there is demand for it. This also works for variants price fields. Update summary: Automatic formatting of price fields based on the General Settings 'Currency Format' (currency locale). This means, e.g. Canada French versus Canada English is possible; France - thousand separator is space; Germany - thousand separator is period and comma is decimal character, etc. Thousands are automatically formatted as you type. Thousands separator is based on the 'Currency Format'. Decimal style is based on the 'Currency Format'. Currency value validation is also enforced client-side. For instance, if 'Currency Format' is 'de-DE', one cannot use a period as a decimal. Other invalid entries are also prevented, e.g. cannot enter text in this field. Automatic currency symbol placement. Currently, there are no in/decrement elements on the price field. Works with both products and variants (include variant creation modal). Not yet implemented in manual order editing (e.g. fixed discount amount, etc). Download Please use your download link to get the updated Padloper. If you don't have this in your email, please send me an email to resend it to you. Once downloaded, use the files to overwrite the ones in your present install. You might need to refresh your browser cache to clear the older JavaScript files. Version The Padloper version stays the same until #8 is resolved. Screenshots Currency Format (locale) Example: Canada currency formats Example: Germany currency format Edit Product (German Euro is currency) Edit Product Variant (German Euro is currency) Create Product Variant (German Euro is currency) Please test and let me know how it goes. Thanks. 2 1 Link to comment Share on other sites More sharing options...
csaggo.com Posted May 9, 2022 Author Share Posted May 9, 2022 @kongondothank you for the new version unfortunately it does not work correctly for me - in product list it randomnly changes between showing a dot or a comma. see the two screens of list. - in edit it still loads attribute value with a comma and now displays the price but only without decimals (see third screen) Link to comment Share on other sites More sharing options...
kongondo Posted May 9, 2022 Share Posted May 9, 2022 1 hour ago, csaggo.com said: unfortunately it does not work correctly for me @csaggo.com, This is very strange as it works here as intended. Could you please tell what Browser you are using? In addition, what are you currency settings? I am assuming Germany for both currency and currency locale. Thanks. Link to comment Share on other sites More sharing options...
csaggo.com Posted May 9, 2022 Author Share Posted May 9, 2022 @kongondo i have EUR (Austria) and for currency i tried both DE_DE and DE_AT (for Austria) i tried latest chrome and latest firefox on macos i would assume the root-issue is still that the value-attribute on the input field is rendered with comma as mentioned in first post, this would allready have solved the editing issue, the currency display settings for me are an additional feature. but i would take care of that where necessary in the frontend anyway. Link to comment Share on other sites More sharing options...
kongondo Posted May 9, 2022 Share Posted May 9, 2022 33 minutes ago, csaggo.com said: would assume the root-issue is still that the value-attribute on the input field is rendered with comma as mentioned in first post, @csaggo.com This shouldn't be the case any more as we now use a plain text field. This means that you should enter your decimal as usual for your country (i.e., comma). Thousands will be automatically formatted (i.e. in your case, periods will be automatically inserted as you type to separate your thousands). As you are aware, the primary issue is that HTML input of type number does not allow commas as decimal characters. Hence, a JavaScript solution is needed as a robust solution. 33 minutes ago, csaggo.com said: the currency display settings for me are an additional feature Yes, this is true. However, I have to cater for 300+ international locales. In addition, I'll also need to take care of percentages (working on this now), e.g. in shipping rates. Without those symbols it can get very confusing. I'll try a different fix and report here. In addition, if you are developing remotely, if possible, could I have a look at your site and try and debug this? A temporary login would do. Please PM or send and email if this is possible. Thanks. Link to comment Share on other sites More sharing options...
kongondo Posted May 9, 2022 Share Posted May 9, 2022 (edited) On 4/26/2022 at 9:43 AM, csaggo.com said: so the solution should simply be to render the value with the raw version instead the output-rendering that includes the comma. This alone wouldn't work. I also need to cater for situations where the shop's currency is different from the shop editor's browser settings or location. https://stackoverflow.com/questions/13412204/localization-of-input-type-number Edited May 9, 2022 by kongondo Link to comment Share on other sites More sharing options...
csaggo.com Posted May 9, 2022 Author Share Posted May 9, 2022 @kongondo allright i have send a pm with temporary user 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 14, 2022 Share Posted May 14, 2022 (edited) Happy to report that this issue has now been resolved. Thanks to @csaggo.com for the report and proposing a solution. This has now been implemented across all number HTML inputs. To upgrade, please grab the latest download. ps: the UI has changed slightly from the screenshots I posted in earlier posts in this thread. Thanks. Edited May 14, 2022 by kongondo 1 Link to comment Share on other sites More sharing options...
csaggo.com Posted May 17, 2022 Author Share Posted May 17, 2022 great news thank you 1 Link to comment Share on other sites More sharing options...
Jan Fromm Posted May 17, 2022 Share Posted May 17, 2022 On 5/14/2022 at 12:08 PM, kongondo said: To upgrade, please grab the latest download. Where can I find the latest download? Thanks! Link to comment Share on other sites More sharing options...
kongondo Posted May 17, 2022 Share Posted May 17, 2022 1 hour ago, Jan Fromm said: Where can I find the latest download? Thanks! From the link that was sent to your email when you purchased Padloper. Alternatively, you can request a link from this form (and check spam box just in case). Please let me know if you need help with this. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now