• Resolved JP Hansen

    (@jphansenmobilrepair)


    I’m trying to make this plugin work with our API.. Can someone please tell me how I would set it up to display “problems” from this json?

    I have a really hard time figuring out how to display the values passed “Mobile Device”

    So what I’m trying to display is:

    “name”: “Apple” “name”: “iPad Pro 12.9 (2020) Wi-Fi only A2229
    “name”: “Screen Replacement“, “retail_price”: “3499.00
    “name”: “SWAP” “retail_price”: “6299.00

    Hope it makes sense

    {
        "success": true,
        "statusCode": 200,
        "message": "OK",
        "data": [
            {
                "id": "5613",
                "name": "Mobile Device",
                "image": "https://dghyt15qon7us.cloudfront.net/images/productTheme/RepairCategory/medium/16046545765613.png",
                "manufacturers": [
                    {
                        "id": "143964",
                        "name": "Asus Phone",
                        "image": "https://dghyt15qon7us.cloudfront.net/images/productTheme/manufacturer/medium/1669037196143964.jpg",
                        "devices": [
                            {
                                "name": "RoG Phoenix 3 5G",
                                "id": "1265166",
                                "on_site_price": "0.00",
                                "pickup_price": "0.00",
                                "colors": [
                                    
                                ],
                                "image": "",
                                "problems": [
                                    {
                                        "id": "13399129",
                                        "name": "Diagnose",
                                        "retail_price": "250.00",
                                        "sale_price": "0.00",
                                        "image": ""
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "id": "143945",
                        "name": "Acer",
                        "image": "https://dghyt15qon7us.cloudfront.net/images/productTheme/manufacturer/medium/1603742646143945.jpg"
                    },
                    {
                        "id": "26051",
                        "name": "Apple",
                        "image": "https://dghyt15qon7us.cloudfront.net/images/productTheme/manufacturer/medium/160374142226051.jpg",
                        "devices": [
                            {
                                "name": "iPad Pro 12.9 (2020) Wi-Fi only A2229",
                                "id": "1265146",
                                "on_site_price": "0.00",
                                "pickup_price": "0.00",
                                "colors": [
                                    {
                                        "id": "4303",
                                        "name": "Silver",
                                        "code": ""
                                    },
                                    {
                                        "id": "4316",
                                        "name": "Space Grey",
                                        "code": ""
                                    }
                                ],
                                "image": "",
                                "problems": [
                                    {
                                        "id": "13398002",
                                        "name": "Screen Replacement",
                                        "retail_price": "3499.00",
                                        "sale_price": "0.00",
                                        "image": ""
                                    },
                                    {
                                        "id": "13399426",
                                        "name": "SWAP",
                                        "retail_price": "6299.00",
                                        "sale_price": "0.00",
                                        "image": ""
                                    }
                                ]
                            },

Viewing 1 replies (of 1 total)
  • Plugin Author berkux

    (@berkux)

    HI,

    try this.

    [jsoncontentimporter url=https://wptest.kux.de/extra/json/jph.json]
    statusCode: {statusCode}<br>
    {subloop-array:data:-1}
    {subloop-array:data.manufacturers:-1}
    name: {data.manufacturers.name}<br>
    <img src="{data.manufacturers.image}">
    {subloop-array:data.manufacturers.problems:-1}
    {subloop-array:data.manufacturers.devices:-1}
    devices.name: {data.manufacturers.devices.name}<br>
    {/subloop-array:data.manufacturers.devices}
    {/subloop-array:data.manufacturers}
    <hr>
    {/subloop-array:data}
    [/jsoncontentimporter]

    Bernhard

Viewing 1 replies (of 1 total)
  • The topic ‘Help me understand’ is closed to new replies.