Closed (fixed)
Project:
Commerce Wishlist v3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 May 2015 at 14:51 UTC
Updated:
16 May 2015 at 22:42 UTC
Jump to comment: Most recent, Most recent file
The browse wishlist page (commerce_wishlist_page_browse_wishlists() in .pages.inc) assumes the following fields to be attached to a user:
When these are not present the user is presented with a fatal error when visiting the /browse-wishlists page.
These fields are used to generate the username on the browse wishlist page, which can be done using format_username(). The other use for them is to allow searching wishlists by username.
I will provide a patch this evening.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2485627-browse_wishlist_page_view.patch | 11.68 KB | neograph734 |
Comments
Comment #1
neograph734I came quite far with this, but got stuck on the search filter. There are off course possibilities for detecting realname and joining that table to the search, but that would only detect one module. Though I am not aware of others, there is possibly another module providing similar functionality.
While writing #2485725: Allow multiple (nameable) wishlists per user I thought of searching on the wishlist name rather then the username, where a default wishlist can be named after it's owner's name. We can even write an update hook to convert existing wishlists to this new format.
And finally I came to the conclusion this page could be replaced by a default view. It would allow the site builder to add additional data to the table and the search query (exposed filters) and it has full support for any field the site builder wants to filter on.
This as simple as building a view of commerce_orders, adding the default filters (orderstatus = wishlist, user status = 1, uid > 0), adding an exposed filter for the user/wishlistname and pasting the export in hook_views_default_views().
Comment #2
neograph734I suppse a view like this would work:
Comment #3
neograph734Patch added
Comment #4
aramboyajyan commentedI'll check this these days and let you know my comments. If everything is okay, I'll just commit it.
Thanks!
Comment #5
neograph734This has been merged in with #2485725: Allow multiple (nameable) wishlists per user and is already patched there.