onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Integration of "calculatedPrice" field formatting with price fields #790

Closed fredericalpers closed 5 months ago

fredericalpers commented 6 months ago

Integration of "calculatedPrice" field formatting with price fields

Introduction

calculatedPrice checks for the marketing type rent or purchase and then fills in the values of the field purchase price or rental price. This is particularly helpful for the output in the front end of the website, as you only have to add one field (calculatedPrice) and no longer have to add any dependencies for only displaying rental prices or only displaying purchase prices.

User Story

As a user of the onOffice for WP-Websites plugin, I sometimes rely on the "calculatedPrice" field to accurately display prices. The "calculatedPrice" field checks for marketing type rent or purchase and then displays the rental price or purchase price in the frontend. However, I've noticed that the formatting of "approx." and "€" symbol do not work as they do for other price fields. This inconsistency in formatting detracts from the overall user experience and may lead to confusion among users. We assume that is has something to do with the "calculatedPrice" field not being added with the other price fields.1

To ensure consistency and improve usability, I propose integrating the "calculatedPrice" field with the existing price fields.

By integrating the "calculatedPrice" field with the price fields, users will benefit from consistent and accurate formatting, enhancing their overall experience when working with calculated prices.

Requirements / Tasks

dai-eastgate commented 6 months ago

@fredericalpers

  • Conduct an analysis of the current implementation of the "calculatedPrice" field and its interaction with formatting options.

The conditions for displaying the "calculatedPrice" field are the same as for other price fields:

  • Identify the missing configurations or integrations that prevent the "approx." and "€" from displaying correctly with the "calculatedPrice" field.

I see that with other price fields when calling the API, it will automatically return the format: prefix + value of price field + currency image

There is currently no API support for retrieving data from the "Display of numerical values" field. If you still want us to display this, please provide me with the API so I can complete the task as soon as possible. Here's a video demo: https://files.fm/u/8x3z9dz7kd#/view/2fyf9jmrvb Currently, the API returns a value for the "calculatedPrice" field displayed differently from another price field. I have reformatted the value of the "calculatedPrice" field to match the other price fields. Do you agree with this approach? image

Note: Currently I can only display the value of the currency Please watch the video and let me know your opinion!

fredericalpers commented 6 months ago

@dai-eastgate the reformatting of the price works for me. The prefix is not as important, the majority of our customers have the prefix disabled anyway. Please go ahead and implement the reformatting so the prices are displayed correctly.

dai-eastgate commented 5 months ago

@fredericalpers

Please confirm for me: the format for price fields be displayed like the first image or the format for price fields will depend on the user's country(ex: With Deutsch will format 123.456,00 and with English will format 123,456.00)?

dai-eastgate commented 5 months ago

@fredericalpers Please check and give feedback so that I can continue with this issue. Thanks!

fredericalpers commented 5 months ago

@dai-eastgate Apparently there is a misconfiguration in enterprise. The calculatedPrice field unfortunately does not automatically have data type selection "price" selected. The calculatedPrice field will be formatted correctly when changing it in enterprise. Extras > Administration > Modul = Properties > Category = Prices.

I will send a ticket to the IT Department.

dai-eastgate commented 5 months ago

@fredericalpers I got it

fredericalpers commented 5 months ago

@fredericalpers I got it

@dai-eastgate sorry for the inconvenience..^^