We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29856
    • 2 Posts
    Hi there,

    First post and many apologies if this is the wrong place to post this question.

    I’m setting up an ecommerce store for a client using Foxycart and MODx and have created all the aspects of it they need, except for a Wishlist function, this is where visitors on the site can log in and make a list of things they like on the store for later reference. Does anybody here know what would be the best way to tackle this sort of thing? Would be great to be given a starting point....

    If anyone could give me some advice or starting points that would be fantastic. I’ve only just started using MODx and I must say I’m very very impressed with it.

    As mentioned if this is the wrong place for this please let me know where is best.

    Cheers
    Mark
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Good question, Mark, and welcome to the forums. Yes, MODx is still a bit new, but it’s sooo easy to work with.

      Mmm... at first I thought your post was about features that you wanted out of MODx or for a site. Maybe you can find some relevant posts if you look under some other term... like "voting" or "feedback" or "ratings". I seem to remember reading something like this being possible with the Jot Snippet. You may want to check it out. For sure, you’d be able to get feedback given a number of items that a site admin posts... what might be more difficult is a way to let web users create items (i.e. pages) and then have other web users post ratings.

      See what you find in the Jot forum.
        • 10449
        • 956 Posts
        Generally speaking, such a feature can be seen as a mini shopping-cart.

        All you need is a simple form (ajaxified or regular), that sends the modx doc id to a script and stores this together with the webuser id in a custom database table*.

        Then, you’ll need a page that lists all your favorite pages (products, articles... whatever). Maybe pass the id-list from mysql to Ditto with the &includeDocs parameter.

        Ideally, the wishlist button / link is a toggle-button: if already in the wishlist, show a red "remove" button, otherwise show the green "add" button. Using Ajax, you wouldn’t need to reload pages.

        I don’t know if such a snippet already exists in the repository. But it would be fairly easy to do from scratch...

        - - -
        * You could use cookies too to store the page-ids, but the drawback is clearly: if the user is accessing your site from another machine, or even on the same PC, but with another browser - the wishlist will not be available. Also, since that would be only client-side, you wouldn’t have any stats - clients / marketing guys usually love stats smiley
          • 36575
          • 104 Posts
          Hi,

          I am trying to do the exact same thing as the original poster. Has anyone done this (in Revolution) and might have a tutorial/code to share?
          I have a basic site working with login & am going to integrate with FoxyCart.
          I want each product item to have a "add to wishlist" button. If they are logged in, the item will be added to their wishlist. If they are not logged in, the button will direct them to a login/register page.
          The wishlist page itself will be a listing page, with an image / description and link to all of the items the user has added to their wishlist.

          Thanks for the help,
          Rachel