If you're building an ecommerce website that sells a number of different kinds of goods, you might want to institute tagging. This mainstay of many Internet sites makes it easier to categorize items, and can assist your visitors in finding what they're looking for. This four-part article series shows you how to add tagging support to your site using Ruby on Rails. This article is excerpted from chapter seven of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).
Tagging Support - Getting the Tagging Requirements (Page 2 of 4 )
Back when we were getting George’s requirements for the book inventory management system (in Chapter 3), George told us that he wanted the online store to recommend related items when users look for books, as he has seen on Amazon. Now we’re ready to tackle the implementation of this feature in this sprint.
George tells us “I feel really stupid today! I was going to buy just one book on home brewing from Amazon, but they tricked me into ordering both The Brewmaster's Bible: Gold Standard for Home Brewers and Homebrewing for Dummies. I was viewing the details of The Brewmaster's Bible, when I noticed that they recommended Homebrewing for Dummies, and I just had to buy it!” He hopes that adding this feature will have the same effect on his customers and that it will double his sales.
We agree with him that this is a good idea, and tell him that this would be easy to implement with a tagging system. We also point out that it can be used for categorizing books, so that customers can browse a list of categories. After a brief discussion, we come up with the following user stories:
Assign tags: George must be able to assign a set of tags to a book by typing in a comma-delimited list of tags on the add book page. This extends the Add Book user story we implemented in Chapter 3.
Edit tags: George must be able to remove or add tags to an existing book on the edit book page. This should be possible by editing the Tags text field. This extends the Edit Book user story we implemented in Chapter 3.
List tags: Emporium’s customers must be able to view all tags that have been used in the system.
Show tag: While viewing the details of a book, a customer must be able to click each tag and display books having the same tags.
Recommend books: While the user is viewing a book, the system must be able to recommend similar books to the user. The system must provide links to both books and tags that are related to the current book.
We tell George that it will take about a day to implement the tagging functionality. George responds, “No worries. It can cost a million dollars, as long as it doubles my sales.”