We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41735
    • 8 Posts
    Could anyone using the premium version give me an example of their working code? Mine returns nothing. Am I right in thinking this code should be dropped into the template used for a single store? Or does it replace the snippet call and should be used on the list page?
      • 34178
      • 212 Posts
      Great Add-on!

      We will fill our stores into the table 'modx_storelocator_stores' directly by a cron job and want to add to every store some more informations.

      For this we created a column named 'kindofstore' into the table.

      How can we call the values of this column to show in the infowindow? Is there any way to make [[+store.kindofstore]] work by some changes anywhere in the snippet like it works for [[+store.description]] and the other values?

      Letti
        • 37143
        • 74 Posts
        Hi, can someone let me know how to call and use any template variables that are associated with a location in any of the template chunks?

        I have tried [[+tvname]] and also [[+tv.tvname]], but no luck.
        Thanks
          • 14951
          • 151 Posts
          Quote from: [email protected] at Nov 12, 2012, 05:54 PM
          Hi, can someone let me know how to call and use any template variables that are associated with a location in any of the template chunks?

          I have tried [[+tvname]] and also [[+tv.tvname]], but no luck.
          Thanks

          I've created a pull request with this feature on Github. I'm not sure if the author will decide to integrate this or not but for now you get use this commit.

          https://github.com/jaredloman/StoreLocator/commit/3c30e27ff2e4e7cf4026a54eb77eb5a622235d94

          Good luck!
          -Jared
            • 14951
            • 151 Posts
            Quote from: lettis at Nov 04, 2012, 10:30 PM
            Great Add-on!

            We will fill our stores into the table 'modx_storelocator_stores' directly by a cron job and want to add to every store some more informations.

            For this we created a column named 'kindofstore' into the table.

            How can we call the values of this column to show in the infowindow? Is there any way to make [[+store.kindofstore]] work by some changes anywhere in the snippet like it works for [[+store.description]] and the other values?

            Letti

            Hi Lettis,

            I'm not an expert on this by any means, but shooting from the hip...I bet if you updated your XML Schema and/or Class Maps with the new column you added it would most likely work as expected. @BobRay has an excellent guide explaining the process if you are unfamiliar with it here http://bobsguides.com/custom-db-tables.html.

            Hope this gets you on the right track!
            -Jared
              • 37143
              • 74 Posts
              Quote from: jaredloman at Dec 19, 2012, 09:02 AM
              Quote from: [email protected] at Nov 12, 2012, 05:54 PM
              Hi, can someone let me know how to call and use any template variables that are associated with a location in any of the template chunks?

              I have tried [[+tvname]] and also [[+tv.tvname]], but no luck.
              Thanks

              I've created a pull request with this feature on Github. I'm not sure if the author will decide to integrate this or not but for now you get use this commit.

              https://github.com/jaredloman/StoreLocator/commit/3c30e27ff2e4e7cf4026a54eb77eb5a622235d94

              Good luck!
              -Jared

              Hi Jared, thank you! I had created a bunch of GetResourceField calls in the template, but I will give this a go instead.
              Now if I could only figure out how to get this thing to not load all the stores on initial load, it would be great. I have 1000 stores, and it is causing a 500 error going over the 30 second time limit. Any ideas?
                • 37143
                • 74 Posts
                Hi Jared, thank you! I had created a bunch of GetResourceField calls in the template, but I will give this a go instead. Now if I could only figure out how to get this thing to not load all the stores on initial load, it would be great. I have 1000 stores, and it is causing a 500 error going over the 30 second time limit. Any ideas?

                Related to above, it looks like setting a limit on the number of results will basically limit the potential pool of results to that number. IE, I have 1000 stores, but it can't handle that many. If I set the limit to 100, it will run, but the results of subsequent searches are all limited to that initial set of 100.

                I thought the &limit would cap the results per search at that number, but it seems to simply cut down on the available items to search, which is really not desirable. Urgh....so close with this....anyone have any ideas?
                  • 37143
                  • 74 Posts
                  Quote from: jaredloman at Dec 19, 2012, 09:02 AM
                  Quote from: [email protected] at Nov 12, 2012, 05:54 PM
                  Hi, can someone let me know how to call and use any template variables that are associated with a location in any of the template chunks?

                  I have tried [[+tvname]] and also [[+tv.tvname]], but no luck.
                  Thanks

                  I've created a pull request with this feature on Github. I'm not sure if the author will decide to integrate this or not but for now you get use this commit.

                  https://github.com/jaredloman/StoreLocator/commit/3c30e27ff2e4e7cf4026a54eb77eb5a622235d94

                  Good luck!
                  -Jared

                  Hi Jared, I tried putting your version in, used the parameters in the store locator call to process and include TVs, but no luck.
                    • 14951
                    • 151 Posts
                    Quote from: [email protected] at Dec 22, 2012, 12:29 AM
                    Hi Jared, I tried putting your version in, used the parameters in the store locator call to process and include TVs, but no luck.

                    Hey there,

                    I haven't tested this extensively but it seemed to be working at least in the most basic scenario (text and image tv). Is there anything in your error log worth noting in regards to this?

                    I should also mention that unless you adjust it with a parameter, the default prefix for TV values is "tv." so [[+tv.your_tv_name]].

                    I would suggest trying this with a simple text tv to ensure it's up and running and "&includeTVs=`1` &processTVs=`0` &prepareTVs=`0`" to see if you at least get the raw values.

                    Also, I'm not sure if you are using the regular or premium version of the snippet, but the uploaded pull request is for the regular version only. Of course you could pick out the code changes and apply them to the premium version if you have it.

                    Lastly, in regards to your question on the number of stores... there is a &limit parameter that can be used to reduce this. Of course this would also affect the results shown on the map... Not sure what your situation is, but the snippet could be modified to produce a message if the search returned a higher number of results than the limit (i.e. Your search returned to many results. Try narrowing your search more to a particular location) or something like that.

                    Best of luck,
                    -Jared
                      • 29419
                      • 15 Posts
                      Hello All,

                      We are in a requirement to implement search functionality along with paging for store locator.
                      We have thousands of stores and the search result is large enough to display on a single page for that purpose we need paging to be implemented.

                      We are using getPage Add-On to display paging for store locator, we need to first get all stores then filter results to find nearest location and then get the result collection pagination. We have managed to filter the results into array and converted into collection but seems the collection is not building correctly.

                      We have used getPage call twice on the page, i am not sure if that could be a problem.
                      I am open to all solution, i have tried one solution without using getPage but that also does not seem to work.

                      Please let me know if anyone have solved this sort of issue.



                        Office: +1-818-306-3660
                        Email: [email protected]
                        Web: www.techdharma.com
                        Skype: techdharma