Has anyone created an Amazon-style wish list with Editor?
Has anyone created an Amazon-style wish list with Editor?
I want to create an Amazon-style wish list, where people can have multiple lists and add items to one or more lists.
My thought is to create a "lists" table where users can add and edit their wish lists. The wish list table would appear on every item page. One of the columns in the wish list table would be an "item status" column. This "item status" column would have a checkbox to indicate if the rows of wish lists contained the item.
If the row (wish list) didn't contain the item, the user could click the checkbox and the item would be added to that list. This is the part I don't know how to design yet. I could create a link table but I don't know how to create a new row in that table (a row would represent the link between the item and a particular wish list), or to delete the row in that table when a user unchecks the checkbox.
Got any ideas?
Answers
okay, I've got something working.
Here are two screenshots of it:
This is the code I used.
It requires jQuery and Defiant.js.
PHP:
JavaScript:
The function
changeItemStatus()
is a custom function that goes to a custom API that I wrote that simply adds or deletes a row to the "wishlists_items" table, based on clicking the checkbox.That looks good to me. How are you finding the interaction?
One possible enhancement, which is based on what you mentioned about Amazon, would be to have another column called "wish_list" (or whatever) which would allow the user to group their items into multiple lists via a
where
condition.Allan
You can see it in action!
https://www.chicagocityscape.com/permits.php?pid=100717579 - look for "My Lists"
You'll have to sign up for a free account to be able to use it.
So just to confirm - at you happy with how it is working just now, or are there any outstanding issues?
Allan
@allan I'm happy with the way it works now!