• CookieList - Wishlist/favorites addon for Revolution using lovely Cookies!#

  • Mark Hamstra - MODX Complete Team Reply #1, 6 months ago

    Reply
    CookieList can be installed through the Package Manager and also from http://modx.com/extras/package/cookielist

    CookieList is a generic addon that can be used for keeping wishlists, user favorites and other similar content. It allows you to define the value that needs to be saved which means it is not restricted to Resources, but may also be used to provide wishlist functionality for custom components. As the name indicates, it stores data in a Cookie.

    Documentation can be found at http://rtfm.modx.com/display/ADDON/CookieList


  • NuShiKo Reply #2, 4 months, 3 weeks ago

    Reply
    What kind of placeholder contains a comma-separated list of resources id, when calling getCookieList?
    P.S. I'm not very experienced user


  • romain Reply #3, 4 months, 3 weeks ago

    Reply
    Hi NuShiKo,

    As far as i remember, getCookieList does not set any placeholder but directly returns the list. So just use the snippet where you need it.

    [[myCustomSnippet?
        &ids=`[[!getCookieList]]`
        &other=`param`
    ]]
    


    Hope that might help


  • NuShiKo Reply #4, 4 months, 2 weeks ago

    Reply
    [[!getCookieList]]
    always return an empty string although on the pages where I call
    [[!addToCookieList]]
    link changes from "Add to your CookieList" to "Remove from your CookieList"... what am I doing wrong?(


  • Henrik Nielsen Reply #5, 1 week ago

    Reply
    @Mark

    Thanks for your Cookielist!

    But when using friendly urls the cookie path are always the url of the resource:
    Url: http://domain.tld/resource-alias/resource-alias
    Cookie path: /resource-alias/resource-alias/

    When the friendly url are disabled the path are always:
    /

    And therefore it's imposible to get the values from the cookie there are set when using friendly urls...

    I had tried to set the path directly in the Cookielist plugin, from
    setcookie($cookie."[cl_check]", 1, 0, '', false, false);

    to
    setcookie($cookie."[cl_check]", 1, 0, '/', false, false);

    and from:
    setcookie($cookieName, $value, $duration, '', false, false);

    to
    setcookie($cookieName, $value, $duration, '/', false, false);


    But it's still the same...

    Or I'm missing something fundamental here?


  • claus holm Reply #6, 2 days, 13 hours ago

    Reply
    Hi

    How do you get cookielist to work with getResources?
    I've tried with [[!getResources? &resources=`` &tpl=`wishlist`]]
    Chunk "wislist" <h2></h2>

    But it doesn't work?

    Thanks in advance,
    Claus


  • Henrik Nielsen Reply #7, 2 days, 8 hours ago

    Reply
    To answer my own question:
    It appeared to be that Revolution - in my setup - did not got the session_cookie_path from the MODX_BASE_URL in system settings.

    Added a / and flushed the cache, and it works

    @Claus:
    Snippet call:
    [[!getResources? &tpl=`chk-wishlist` &resources=`[[!getCookieList]]`]]

    Chunk:
    <h2>[[+pagetitle]]</h2>



    (By the way: It's good to see other danes here)!