Jump to content
darrenc

Catalog with wishlist-like functionality

Recommended Posts

Still pretty new to all of this, I am looking to build a website with a catalog component showing products in various categories with various options. I assume most of these, if not all, will be set up as pages (allowing maximum flexibility?). The structure isn't concrete yet but that is the loose plan for now.

The client has since requested a scope change that any user looking at the site could...

  1. add a browsed item to some kind of wish-list functionality "build a quote" that they could...
  2. review what they selected on one page (potentially removing or changing quantities i assume) and then... 
  3. submit this wishlist/quote request, along with some basic contact information, back to the client so that they could follow up further.

It isn't an industry where one would ever provide a cart, with prices, and allow someone to buy an item -- so a formal cart seems somewhat overkill.

Because of my unfamiliarity I was wondering if someone could help provide some insight as to how something like this could be accomplished with processwire off the shelf, or with a basic module, or perhaps it would need a completely custom module to be built. At the very least it would help me respond to the client with options. Ideally I would like to build with processwire.

Thanks for any thoughts.

Share this post


Link to post
Share on other sites

Hi darrenc,

Your project sounds perfect for Pw (and vice versa :)).

For the site-structure: I suggest to look at kongondo's excellent tutorial here: http://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/

Bookmarking: I would just store the ids of the products a visitor has bookmarked in the session. On the review-page, display them together with a form and send the data to the client afterwards. 

Some pseudo code:

// in template product
// ....
// Check if this product was bookmarked, e.g. on top of the product template
if ($bookmark = $input->get->bookmark) {
  $bookmarks = ($session->bookmarks) ? $session->bookmarks : array();
  $bookmarks[] = (int) $bookmark;
  $session->bookmarks = $bookmarks; 
}

// this is the link to bookmark the actual product
<a href='<?= $page->url; ?>?bookmark=<?= $page->id; ?>'>Bookmark me!</a>

// in template review
if (count($session->bookmarks)) {
  foreach ($session->bookmarks as $b) {
    echo 'You bookmarked ' . $b->title;
  }
} else {
  echo 'no bookmarks';
}
  • Like 2

Share this post


Link to post
Share on other sites

Wanze, soooooo helpful thank you. I have lots of work to do to explore the API and "get" the pseudo code to the fullest, but this conceptualization was great. I think that was a stiff push in the right direction.

Thank you again for taking the time to reply.

  • Like 1

Share this post


Link to post
Share on other sites

It sounds to me like what you need is a basic shopping cart.
You have products, which you can add to a cart (wish list in this case), can then review the list and then checkout (no payment info, just contact details).

I think you could build this around the Shop for ProcessWire module.
It provides you with a basic shopping cart and the visitor can then sumbit their contact details.
After installing the module you'll need to make some modifications like hiding prices in the front end and changing text on buttons and throughout the checkout process. ("Add to cart" to "Add to wishlist" etc).

However if you also want product variations (pink shirt XXL), I don't think it's possible out of the box, so maybe others can pitch in?

Share this post


Link to post
Share on other sites

Before actually starting to code, I would decide if some sort of login is necessary at all.

If anyone can create wishlists, you'd probably want to use cookies. If there's a user-login, you can store the items in the DB, i.e. in a custom user input field. (comma-delimited id page list reference, or JSON).

Share this post


Link to post
Share on other sites

Jacknails, we approached the issue more from a end-user UI perspective and decided they should jump through as few hoops as possible. The most accurate description might be that it's a contact form with an attached wishlist. Secondly, while I am definitely open to looking at, and trying to strip-down, a cart module I think it would be better for us (totally new to PW) to learn a bit more by building this feature up exactly how we want it to behave. 

Dragan, yes requiring user signup was also a consideration and, for now, it is not a requirement. And yes we could set a cookie, and that was something that occurred to me once I read the pseudocode.

Thank you both for following up.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peejay
      When I take a look in a PW database I see this:   pages are stored in “pages", templates are stored in “templates",  sessions are stored in “sessions",  forms are stored in "forms” (form builder),  ...   I want to make a website with a large catalog (1.5 million products). I don’t want that the products are stored in “pages” table in the database, but in the “products” table. Is this possible in PW? End will I maintain the same options, then when I store all products in “pages”?   Some advice would be helpful!   Kind Regards,  Peejay
    • By creativejay
      Just one of those things I often find myself wishing for:
      Could a future update add a "Siblings" list tab (or make a "Children & Siblings" combined tab) to /page/edit/?
      Save + Next is a godsend, but in many cases I need to jump around instead of cycling through. Sometimes I just want to reference how I titled other pages under one parent to keep the naming consistent. Other times I'm deep enough in my page tree that it's a half-dozen or so more clicks than I'd like to get back to where I was.
      So far my workaround is to right-click on the parent's name in the Breadcrumb nav, and open the page tree in a new tab. But when editing a site often has me opening ten or more browser tabs at a time, each one I can cut out is a blessing. 
      Thanks for your consideration!
    • By steveooo
      Hello,
      just another wish on my list: Multiple instances for same field. E.g. I have got a simple "text" field that's just a CKEdtior textarea. If I want to use two or more text fields, I need to dublicate the "text" field to something like "text2".
      I know that every field is unique because of the database structure behind. Is is still possible to make something like this for this problem? Maybe save everything to same table in database but somehow add a "instanceNumber" field that separates "text1" from "text2"?
      It isn't a big thing, because cloning is easy. I really like to keep redundancies low and cloning fields isn't that great, so I share this wishlist. Maybe there is some way and I don't know about it, so let me know
    • By steveooo
      Hello,
      One thing that I really would like is a group fieldtype. This group fieldtype is just for grouping other fieldtypes. E.g.:
      "dates" as group field has "dateStart" and "dateEnd" (both datetime fieldtype) as fields.
      This would be a great feature!
      Is something like this currently possible?
    • By Robin S
      It occurred to me that a good addition to the forums would be some way for PW users to indicate support for a module idea. Similar to the Wishlist subforum but for functionality that belongs in a module rather than in the core.
      I'm thinking mainly of commercial modules, although if someone wanted to take up a module request and release it freely that would be cool.
      So users could propose a module idea, then others would vote for it (using likes or some special voting option) so that a vote means "I'd buy that", with the expectation of pricing in the general ballpark of Ryan's pro modules and Apeisa's PadLoper.
      As a beginner-intermediate developer I'm really enjoying working with PW and learning as I go - the API is so intuitive that I've been able to build my own solutions to things that in another CMS I would have been reliant on someone else's module to achieve. But there are things that I know are beyond my current skills, and for those things I look to third-party modules. My clients are non-profits and small businesses so I'm never likely to have the budget to commission a custom module alone. But there might be other PW users out there with similar needs and maybe that demand would make it worthwhile for an experienced developer to take on a proposal and release it as a commercial module. Currently there isn't a way to measure the demand for modules apart from occasional forum posts like "Is there a module that...?"
      Any thoughts on this?
      Here's a module request to start off with:
      I would be happy to buy a full-featured event calendar module. I've searched the module directory and the forums and Lindquist's module is the most feature-rich I've seen, but it's in an alpha proof-of-concept state and some important functions aren't implemented. Features I would be looking for are:
      Calendar grid interface in admin, allowing for easy addition and editing of events. (Nice but non-essential) Week and day views in admin, in addition to month view, with drag editing for event date and duration (I'm dreaming of something awesome like the dhtmlxScheduler interface or Fullcalendar interface). Although drag operations would really need an undo to correct accidental edits, so this may be more trouble than it's worth. Events are edited in a modal window, to avoid losing one's place in the calendar. Recurring events, with user-friendly selection of recurrence options. The ability to individually edit or remove an event that is a child of a recurring event (i.e. make an exception for that individual event). (Nice but non-essential) A couple of out-of-the-box minimal rendering options for the frontend (read-only calendar view, list view). This is the kind of module I need frequently. I've been lucky that I haven't had a client request a full event calendar since I've been using PW, but it's only a matter of time. I'm sure there are other PW users who need this and who would, like me, be happy to pay for such a module.
×
×
  • Create New...