Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    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 Rob Monhemius

    (@robmon)

    @a2hostingrj Thanks. That sounds like an interesting library. But like you said that’t probably too much of an effort to create ( and maintain ).

    I was hoping I could somehow acces the crop tool in the media manager.

    Thread Starter Rob Monhemius

    (@robmon)

    @t-p

    Sorry, that information is not useful to me. It may be relevant for end-users, but I m looking at it from a developer perspective.

    I am looking for information on a code level so I can apply it in my plugins / themes.

Viewing 4 replies - 1 through 4 (of 4 total)