We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36446
    • 184 Posts
    Hi!
    I am using the http://modx.com/extras/package/googlemapstv2 called ShopLocation to add locations to my ressources. This works great! However i want to show a list of all stores and all locations on one site. therefor I use getressources to output a list of all my ressources like this:
    <ul>[[getResources? &ressources=`[[+tv.wherecanibuyit]]` &tpl=`relatedPagesTpl`]]</ul>


    The List is generated without problems.

    The relatedPagesTpl contains the JSONtoChunk Snippet that should call the TV but it does not:

    <li> [[+longtitle]]
    Address:
    [[+ShopLocation:JSONtoChunk=`MapChunk`]] </li>


    Alternatively i tried *ShopLocation without effekt. The snippet JSONtoChunk does not return anything when calles from a chunk itself. When called inside the template it works as expected. Is there anything i am doing wrong, or is this TV just not capable of beeing called from inside a chunk of a getressources call? Would be great if someone could help!

    My MapChunk looks like this now:
    City: [[*city]]<br />
    long: [[+tv.longitude]]<br />
    lat: [[*lattitude]]<br />


    I tried to call the tvs with *, +, +tv without look...





    [ed. note: flanger last edited this post 11 years, 4 months ago.]
      https://www.beautyislife-shop.de - premium make-up!
      https://www.topsterne.de - sell it here!
      ---------------------------------------------------------
      • 36446
      • 184 Posts
      i think the problem might be described here:
      https://github.com/bezumkin/pdoTools/issues/114
      maybe i need to add the decodeJson functionality to my snippet call but unfortunately this does not help me a lot because i am not able to do this ..
        https://www.beautyislife-shop.de - premium make-up!
        https://www.topsterne.de - sell it here!
        ---------------------------------------------------------
        • 36446
        • 184 Posts
        the only thing i can output is this when the TV is called like this

        [[+tv.ShopLocation]]

        {"street":"Cochrane Street, Central","housenumber":"0-34","zipcode":"","city":"Hong Kong","state":"","country":"","latitude":"22.2826857","longitude":"114.1542164"} 


        but this doesn't really help... maybe i need to search for an alternative solution to get map coordinates
          https://www.beautyislife-shop.de - premium make-up!
          https://www.topsterne.de - sell it here!
          ---------------------------------------------------------
          • 36446
          • 184 Posts
          i ditched the google maps tv and am now using the gmarker extension - this automatically generates lat & Long coordinates (like google maps tv) and i can access the tv values anywhere without problems.
          Still problem is unsolved
            https://www.beautyislife-shop.de - premium make-up!
            https://www.topsterne.de - sell it here!
            ---------------------------------------------------------