Rather than showing the username on the /wishlist page, it would be nice to show first and/or last name. I understand that by default, the profile module isn't installed so this may not be possible. I am not sure how this could be done. Thank you for the great module. My family uses it a lot for gift buying.

CommentFileSizeAuthor
#5 wishlist-profile-info-1072172.patch6.64 KBpolynya

Comments

scott.mclewin’s picture

Assigned: Unassigned » scott.mclewin

I'm glad your family finds the module handy.

Once I'm finished with the D7 refactoring I'll learn how to detect if the profile module is installed and then how to pull the first and last name. It's a good idea and if it is possible I'll get it in.

Patches are also welcome.

scott.mclewin’s picture

The Drupal 7 module has a beta version available and patches against it are welcome for this issue.

polynya’s picture

The Profile module is deprecated in Drupal 7 so site builders may want to use the contributed module Profile2 or to add fields to the user entity (admin/config/people/accounts/fields)

I think the best solution would be to use tokens so that the site builder can choose which fields to use. On the Wishlist settings page there could be a new text field to type in a phrase, e.g.
[current-user:field-user-first-name] [current-user:field-user-last-name]

I'll look at this in more detail if you think this is the way to proceed.

scott.mclewin’s picture

Version: 6.x-2.4 » 7.x-2.x-dev

That solution makes a lot of sense to me. Elegant and simple loosely coupled integration.

polynya’s picture

Status: Active » Needs review
StatusFileSize
new6.64 KB

Here's the patch. The giftee's user name is replaced in the breadcrumb and in the information at the top of the wishlist page.

On the settings page there is a new field to enter the tokens, which can be any a combination of any starting with [user:

If the Token module is not enabled or if none of the tokens can be replaced then the standard user name is displayed.

If the module Profile2 is used then Entity Tokens must be enabled as well.

scott.mclewin’s picture

Status: Needs review » Closed (fixed)

Thanks. The patch didn't cover the main wishlist listing page /wishlist and also in the wishlist block. I applied your patch and built on it to cover the remaining cases I spotted where a username was needed.