• Resolved Reuhno

    (@laboiteare)


    Hello,

    Thanks for you plugin. Very simple and effective to do a Price listing.

    I’m just a bit stuck because I would like my prices to look like this:
    Service ………… 10 €


    Currently I can only do
    Service ………… 10.00

    Do you think it is possible to leave the choice to put a free text field or to choose whether to display the digits after the decimal point (tens) + possibility of having a suffix € (or $ or £)?

    Have a good day,
    Renaud

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rob Monhemius

    (@robmon)

    Hello Renaud,

    Thanks for your questions. It seems you want to achieve 2 things:

    1. Removing digits after the dot
    2. Adding a valuta sign

    With normal use of the block you cannot do this. I did consider adding these features, but I reasoned it would be better not provide them:

    • it would add an extra settings for each individual block. That would make it quite a bit extra work to create a pricelist.
    • The block validates the price, that requires some predictability and leaves no room for text input.
    • Valuta icons would arguably take up unnecesary space in the pricelist. Especially on mobile there is not much available space.

    No solution to remove digits

    Currently you cannot modify the amount of digits.

    Solution for adding a valuta (€) sign

    However I did have the foresight, that some people wanted to do this anyway. Therefore all prices in the block have a class of .price. You could add your own css to it.

    To add a non-breaking space and an euro sign, you can use:

    <style>
    .wp-block-price-list-block-zebra-price-list-block-zebra .price::after {
        content: '\00a0\20ac';
    }
    </style>

    You can put it at the top of the page in a html block for now. Normally I would’ve written a custom style. However that seems to have been deprecated for block themes ( creating a child-theme for this is probably a bit daunting for the average user ).

    PS: Do let me know if you know a better approach to overwrite the css, I m just improvising what works for an average wordpress user that can’t access the old customizer to override css.

    Thread Starter Reuhno

    (@laboiteare)

    Hello and thank you for the response. I think your reasoning is too complex or something escapes me on the complexity of the request.Isn’t it just possible to have an input type field that accepts a string and not a number value?

    I dont really understand the reason why you want to “force” value to be a number?

    For example, I faced the following problem with the same client:

    Sometimes display a price, for example:

    Product……. 10€

    sometimes a price per period:

    Service…….. 20€ / year

    Leaving a field as a string would allow all of this. From my point of view in all, it would seem logical.

    What do you think ?

    • This reply was modified 1 year, 5 months ago by Reuhno.
    Plugin Author Rob Monhemius

    (@robmon)

    The short answer. No, the block doesn’t support adding prices as a string.

    It’s true that this block is low on styling options. This was a deliberate choice on my end, which allowed me to streamline the process of adding and editing prices in the list. When custom styling is important, you may want to look for another block, that has more focus on that. That really depends on your personal preference.

    Suggestion

    Alternatively you can do something like:

    service ( 1 year ) ……………………. 20.00

    One example why

    I’ll give you one very concrete example why the price input field is so strict. When you type 12 and go to the next field the block wil automatically format it to 12.00. That makes it faster to add values and prevents mistakes. With a random string I can’t do that. A consistent amount of digits matters for lining the prices up. You get:

    a _______ 12.00
    b _______ 13.00
    c ______ 215.00

    Opposed to:

    a _______________ 12
    b ___________ 13.0.0
    c ___________ 215.00
    d ________ 13 / year
    e ___________ 13:00

    Thread Starter Reuhno

    (@laboiteare)

    Thank you for the answer.

    I find this choice of design a shame, because your plugin is really well designed. Offering the possibility of a free text field would really allow greater freedom in the layout.

    I do not share your point of view on the speed gain in data entry with this system.

    Unfortunately, I don’t have the skills to develop my own plugin for Gutenberg with react, so I will reluctantly have to choose another plugin.

    Keep me posted if you ever reconsider your point of view.
    have a good day

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ability to have free text string for price’ is closed to new replies.