Would be great to allow a user to make her wish list private, so it will be excluded from wish lists search results and won't be accessed at example.com/wishlist/wid (where wid is the ID of the list) just for the owner.

Comments

sgabe’s picture

Status: Active » Needs review
StatusFileSize
new6.19 KB

Here is my proposed patch.

Anonymous’s picture

@sgabe can you explain how your patch works?

I need this functionality and was thinking about just putting a hash in the URL, so you could email your friend's a link to it, but otherwise was private.

sgabe’s picture

@jackocnr: The patch adds a "Private" checkbox to the wish list settings form. Lists marked as private will be available just for the owner (friends won't be able to see it) and hidden from the wish list search results.

tparc’s picture

Submitting request to port this to D7 version. Thanks.

naveenvalecha’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Assigned: sgabe » naveenvalecha

moved to correct queue.

jaykainthola’s picture

@sgabe, I have reviewed the patch and its only for Drupal 6.

However, We will look into this feature and will implement into site.

sgabe’s picture

It's 2 years old, I suppose at that time the module did not even have a D7 version yet.

jaykainthola’s picture

I am sorry that I did not check the date of your comment. However, We will add implement this feature into Drupal 7.

Thanks

tparc’s picture

Has any work been done on this feature yet? Thanks.

naveenvalecha’s picture

Issue summary: View changes
StatusFileSize
new9.99 KB

Hi tparc,
I have rerolled the above patch for 7 this functionality.So please test the patch and provide your feedback.I will commit the patch after discuss with jay.
Hi jay,
Actually I added the code to redirect the user if user tried to access the wishlist from path wishlist/%. So I need your suggestions on this.

tparc’s picture

Thanks, naveenvalecha. I will test this as soon as I can find a moment.

tparc’s picture

Patch appears to be working for the most part. There seems to be an issue when updating the wishlist from the wishlist page, the wish list settings become unavailable. This appears to be a side effect of the patch.

Also, I wonder how hard it would be to give the administrator the option of making all wishlists private by default?

tparc’s picture

Hello, I tested this patch in December, it appears to be working.
I realized the issue I pointed out already existed before the patch was applied, so there may be another issue with module.
It would still be nice to give the administrator option to make all wishlists private by default.
Thanks. Please update status if possible.

tparc’s picture

It appears that administrators cannot view wishlists set as private. It would also be nice to give the administrator the option to make all wishlists private by default.

naveenvalecha’s picture

StatusFileSize
new9.67 KB

Hi Jay

Here is the updated patch with the latest updated code.Please review so that we can go further.
Now this patch provide the option to admin :

  • Make users wishlist private by default.
  • Allow users to make their wishlist private.

as @tparc suggested in #14

Thanks
Naveen Valecha

naveenvalecha’s picture

Status: Needs review » Fixed

Hi @tparc

patch #15 Committed c7955e5
Also fixed some spaces issues.Use the latest dev release.So closing this issue.

Thanks
Naveen Valecha

tparc’s picture

One comment/suggestion is to remove the restriction 'This will not give the option to users to set the privacy of their wishlists.' from 'Make users wishlist private by default.' This is to permit users to have a private wishlist by default, but allow them to share it as a gift registry when necessary.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sagar ramgade’s picture

Status: Closed (fixed) » Active
StatusFileSize
new1.18 KB

Hi,

The above patch doesn't work if "Make users wishlist private by default." and "Allow users to make their wishlist private." are enabled in the wishlist settings. It gives db exception given below :
"PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'private' cannot be null: UPDATE {uc_wishlists} SET title=:db_update_placeholder_0, expiration=:db_update_placeholder_1, address=:db_update_placeholder_2, private=:db_update_placeholder_3 WHERE (wid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => admin's wish list [:db_update_placeholder_1] => 1419877800 [:db_update_placeholder_2] => O:8:"stdClass":10:{s:9:"firstname";s:5:"Sagar";s:8:"lastname";s:7:"Ramgade";s:7:"company";s:0:"";s:5:"addr1";s:4:"abcd";s:5:"addr2";s:0:"";s:4:"city";s:6:"Mumbai";s:7:"country";s:3:"124";s:4:"zone";s:2:"77";s:8:"postcode";s:6:"400065";s:5:"phone";s:13:"+919892050550";} [:db_update_placeholder_3] => [:db_condition_placeholder_0] => 1 ) in uc_wishlist_update_wishlist() (line 725 of C:\wamp\www\drupal7.32\sites\all\modules\uc_wishlist\uc_wishlist.module)."
I had attached the patch which takes care of this.

  • 2f72ea5 committed on
    #1234434 by sgabe,tparc: Allow private wish lists.
    
  • 4ad5356 committed on
    #1234434 by sgabe,tparc: Allow private wish lists.
    
  • naveenvalecha committed c7955e5 on
    #1234434 by sgabe,tparc: Allow private wish lists.
    
naveenvalecha’s picture

Sagar,
is this issue still exists.I am not able to reproduce it.

sagar ramgade’s picture

If you negate this condition

if (!variable_get('uc_wishlist_default_private', TRUE) && variable_get('uc_wishlist_allow_private', TRUE)) {

i.e Set uc_wishlist_allow_private to false, you might get pdo exception error. I got it when I enabled the module on a clean drupal install.

chiranjeeb2410’s picture

@Sagar Ramgade,

Does the issue exist now, and if so, how can it be resolved?