We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Quote from: fourroses666 at Feb 26, 2013, 10:49 PM
    Did this: http://forums.modx.com/thread/71914/cookielist---wishlist-favorites-addon-for-revolution-using-lovely-cookies#dis-post-426635

    Then it works on rootresourses, not on resources which are into a container.
    On a site with 2.2.2pl it works with a container without any changes, on 2.2.6 it doesn't (yet!) somehow.

    Anyone?

    I've just noticed that it acting just like getresources, it just lists all resources on the page regardless of if they are added as a favorite or not also on 2.2.6, if I just use the standard call it works but the below doesnt.

    Call:

    <div class="meta">
    <ol class="wishlist">
    [[!getResources? &tpl=`chk-wishlist` &resources=`[[!getCookieList]]`]]
    </ol>


      • 12028
      • 152 Posts
      Hey Paul,

      I use it like this:
      [[!getCookieList:isnot=``:then=`
          <p>Some text...</p>
          [[!getResources? 
                  &tpl=`chk-tpl-cookielist` 
                  &resources=`[[!getCookieList]]`
                  &includeTVs=`1`
                  &tvPrefix=``
          ]]
      `:else=`
          <p>The list are empty!</p>
      `]]
      

      on a resource there are cached, and with the changes from http://forums.modx.com/thread/71914/cookielist---wishlist-favorites-addon-for-revolution-using-lovely-cookies#dis-post-426635 on several 226 installs without any problems.

      Are
      [[!getCookieList]]

      outputting the correct id's ?
        - A small step for mankind, so why not take two...

        Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
        • 22840
        • 1,572 Posts
        Hi Henrik,

        I have it set up as the following now:

        The call in my sites template:

        <section>
        [[!getCookieList:isnot=``:then=`
            <h4><span class="colored">///</span> Your Favourites</h4>
        	<hr>
        	<ol class="wishlist">
                  [[!getResources?
                    &tpl=`chk-wishlist`
                    &resources=`[[!getCookieList]]`
                    &includeTVs=`1`
                    &tvPrefix=``
                 ]]
                 `:else=`
             <h4><span class="colored">///</span> Your Favourites</h4>
        	<hr>
            <p>You have not added any campsites to your Favourites yet!</p>
        `]]
        
        </ol>
        <hr style="margin-top:0px;clear:both;">
        </section>


        chk-wishlist:

        <li><a href="[[~[[+id]]]]">[[+pagetitle]]</a></li>


        If I go onto a campsite page and add it to the wishlist it works as expected, however if I go onto a page with 4 campsites on it it lists all 4 ( im using get page to list them on the main pages as I need pagination.

        It's starting to drive me mad lol

        on a resource there are cached, and with the changes from http://forums.modx.com/thread/71914/cookielist---wishlist-favorites-addon-for-revolution-using-lovely-cookies#dis-post-426635 on several 226 installs without any problems.

        I've applied the fix from the link and tried them cached and un cached but its the same result ( cleared cache via FTP each time )

        EDIT:

        It works on any page that doesn't have another getpage or getresources call on it, if it does it lists the results from both.
          • 9995
          • 1,613 Posts
          I tried everything but with submaps/containers it doesn't work.
          Cleared cache, deleted my cookies etc..

          Checked on blank template, tried remove my htaccess www. rule, tried with and without system setting: session_cookie_path /, tried with basic calls, tried with Henrik Nielsen "hack".

          The cookies being saved seems to be ok?

          Still I can't get no list.
          I gave up.

          It only works on "root" resources, must be some settings which are not correct, can't seem to find any wrong settings.
          [ed. note: fourroses666 last edited this post 11 years, 1 month ago.]
            Evolution user, I like the back-end speed and simplicity smiley
            • 22840
            • 1,572 Posts
            Quote from: fourroses666 at Mar 09, 2013, 04:04 PM
            I tried everything but with submaps/containers it doesn't work.
            Cleared cache, deleted my cookies etc..

            Checked on blank template, tried remove my htaccess www. rule, tried with and without system setting: session_cookie_path /, tried with basic calls, tried with Henrik Nielsen "hack".

            The cookies being saved seems to be ok?

            Still I can't get no list.
            I gave up.

            It only works on "root" resources, must be some settings which are not correct, can't seem to find any wrong settings.

            Yes I've found that but would love to find a solution for it as it's a great feature for my site if I can get it to work.

            on a resource there are cached, and with the changes from http://forums.modx.com/thread/71914/cookielist---wishlist-favorites-addon-for-revolution-using-lovely-cookies#dis-post-426635 on several 226 installs without any problems.

            Also to note, I have had to reverse this as when I tried to log into my Discuss forum it wouldn't let me in, and then went back to the admin to revert the / and I was locked out of that as well so I had to do it via the database.
              • 12028
              • 152 Posts
              Fourroses666 and Paul,

              What are the snippet call you are using for setting the cookies?
              If your are outputting a list with content with getResources, did you remember to set the value in the call to addToCookieList
              [[+id]]
              and not
              [[*id]]

              [[!addToCookieList? &addText=`Add to favorite list` &removeText=`Remove from favorite list` &value=`[[+id]]`]]


              And what results are your getting with
              [[!getCookieList]]
              ?

              My system settings:
              session_cookie_domain = empty
              session_cookie_lifetime = 604800
              session_cookie_path = /
              session_cookie_secure = No
              cookielist.cookie.duration = 2592000
              cookielist.cookie.name = cookieList

              I have the addToCookieList on both containers and no-containers, and the getCookieList are shown on a container
                - A small step for mankind, so why not take two...

                Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
                • 22840
                • 1,572 Posts
                Hi Henrik, Thanks for helping out with this.

                I've got it set up as follows, in my template for the single campsites I have:

                [[!addToCookieList? &addText=`Add to Favourites` &removeText=`Remove from Favourites` &value=`[[+id]]`]]


                Then on the right hand side of all pages I have the following getResources call:

                [[!getResources?
                            &tpl=`chk-wishlist`
                            &resources=`[[!getCookieList]]`
                            &includeTVs=`1`
                            &tvPrefix=``
                    ]]


                And in my chk-wishlist chunk I have:

                <a href="[[~[[+id]]]]">[[+pagetitle]]</a>


                If im on a page that doesn't have any other getResources or getPage call on it it is working fine, the problem is when I'm on a page thats listing the sites, it then adds them to the list even though I haven't added them to the wishlist, if I just use the below it works as expected so the issue is with using getPage on the same page which I've tried calling them cached, uncached and loads of names wink.

                [[!getCookieList]]


                  • 22840
                  • 1,572 Posts
                  Right I've really got no idea how I can resolve this, I'm willing to pay someone to get this sorted for me / us and release an update as it doesn't appear to be supported.

                  Could someone give me a price and I'll PM you FTP and admin logins ( no one with 2 posts though, has to be a trusted member ) wink

                  Thanks
                    • 34197
                    • 138 Posts
                    Hello everyone,

                    I need to make a div appear on the first visit after 20 seconds.

                    Can cookielist help me to realise that ?

                    Thanks for your answers.
                      Webdesigner and musician.
                      • 36996
                      • 211 Posts