Viewing 14 posts - 1 through 14 (of 14 total)
  • #12525
    dazoulay
    Member

    Hi,

    It seems like sharing the wishlist via email/fb/twitter/etc generates the correct url which contained “user_id=XXX”.

    This would normally allow someone else, who is not logged into the site or anything, to view the wishlist of user id XXX.

    This feature does not work. The user id passed in the URL appears to be ignored resulting in showing an empty wishlist to other users.

    This functionality is stored in the theme’s wishlist.php which appears to be different from the plugin’s default wishlist.php template file. Even using the default template, it doesn’t work.

    Can you please look into this issue and let me know how it can be resolved? I’m sure that the plugin works normally, there must be something broken with the theme.

    Thank you,
    Dave

    #12955
    ap
    Member
    Post count: 14

    Yes, this would be great to get a fix for this. I’m going to start diving into it now. If anyone else has insight please chime in!

    #13009
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi guys,

    Try changing /woocommerce/wishlist.php lines 55-60 to:

    $wishlist = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . YITH_WCWL_TABLE . " WHERE user_id = %s" . $limit_sql, $user_id ), ARRAY_A );
    

    – Ed

    #13459
    ap
    Member
    Post count: 14

    Ed, your revision does return the user to the correct user_id page but the Wishlist items are not populated.

    #13789
    Melanie – SUPPORT
    Member
    Post count: 11032

    Hey, I’ll forward this to Ed again, he seems to be on the right track.

    #14063
    ap
    Member
    Post count: 14

    Thanks. We’ll wait for your reply.

    #14140
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Sorry about that, try changing lines 55-60 with the following:

    $wishlist = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . YITH_WCWL_TABLE . " WHERE user_id = %s" . $limit_sql, $user_id ), ARRAY_A );
    

    – Ed

    #14968
    ap
    Member
    Post count: 14

    Hey Ed,

    So I tried this out but when you now go to the wishlist nothing is populated.

    #15401
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Just edited up the /woocommerce/wishlist.php file a bit, and managed to get it working here, can you replace the file contents with – http://pastie.org/8221116 and let me know how you get on with it?

    Thanks,

    – Ed

    #15535
    ap
    Member
    Post count: 14

    Beautiful, Ed! Thank you. Will this be implemented in the next version?

    #15539
    ap
    Member
    Post count: 14

    Spoke too soon. Broke it after more testing. Almost there, Ed!

    New problem: you can’t view your wishlist items as a guest. You can see the items when you hover over the icon, however.

    The share feature DOES work with the new code though.

    #15978
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Thanks for pointing it out, this should hopefully be the last revision!

    http://pastie.org/8230798

    – Ed

    #16177
    ap
    Member
    Post count: 14

    There it is! Thanks for your work on the issue, Ed. Let’s mark this as resolved.

    #16638
    Melanie – SUPPORT
    Member
    Post count: 11032

    Great!

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register