Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • NicolaiJee 30 posts 91 karma points
    Apr 26, 2022 @ 14:37
    NicolaiJee
    0

    Showing Price and SKU in a list view.

    Hi We are trying to show price and sku in a list view. But the fields in the list view are empty. How can we display the those values in a Umbraco backoffice list view ?

    We are on umbraco 8.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Apr 27, 2022 @ 10:30
    Matt Brailsford
    101

    Hi Nicolai,

    I believe this should be possible, but you might need a bit of config. The SKU should just show as it's a simple text field, but the prices field stores it's value as a JSON object so you'll need to provide an angular template to extract the price to display.

    Take a look at this issue for some more info on how this works https://github.com/umbraco/Umbraco-CMS/pull/6597 but ultimately the price field stores it's value in the this format

    {
        "currencyid" : "value",
        ...
    }
    

    So it'll look like this

    {
        "e74c1ca3-d341-43b5-ad97-1596180a8497" : "2.50",
        "b495f041-4788-4cde-aaa8-7bfb9a73e87c" : "3.50"
    }
    

    So you'd need a template of something like this to extract one of the prices

    {{ value['e74c1ca3-d341-43b5-ad97-1596180a8497'] }}
    

    Hope this helps

    Matt

  • NicolaiJee 30 posts 91 karma points
    Apr 27, 2022 @ 13:55
    NicolaiJee
    1

    Hi Matt It worked :)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Apr 27, 2022 @ 14:02
    Matt Brailsford
    0

    Awesome! 👍

Please Sign in or register to post replies

Write your reply to:

Draft