WordPress.org

Ready to get started?Download WordPress

Forums

RSVP Plugin
Associates do not import Associates (5 posts)

  1. Gayatriom
    Member
    Posted 1 year ago #

    Hi! So I used the excel document to import in all of my guests.
    I had my main guest and his associates.
    What is not working is that if an associate wants to rsvp it doesn't serve them the rest of the 'family', only the head of the family.
    So if the wife is rsvping for the family, she can only see her husband's name, not her kids.
    She would need to rsvp under her husband's name to see the kids' names.

    Is that a glitch in the way I've formatted my excel document?
    I felt like before this update the import function worked correctly.

    http://wordpress.org/extend/plugins/rsvp/

  2. fergbrain
    Member
    Posted 1 year ago #

    Gayatriom,

    I also have this issue, so I don't think your formatting is an issue.

    I resolved the issue by making the following changes to rsvp_frontend.inc.php:

    Replace lines 197-201 with:

    $sql = "SELECT id, firstName, lastName FROM ".ATTENDEES_TABLE."
     	WHERE (
     			id IN (SELECT attendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE associatedAttendeeID = %d)
    		 OR id IN (SELECT associatedAttendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE attendeeID = %d)
    		 OR id IN (SELECT associatedAttendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE attendeeID IN (SELECT associatedAttendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE attendeeID = %d))
    		)
    		 AND id <> %d
    		 AND rsvpStatus <> 'NoResponse'";
    $associations = $wpdb->get_results($wpdb->prepare($sql, $attendeeID, $attendeeID,$attendeeID, $attendeeID ));

    and replace lines 212-217 with:

    $sql = "SELECT id, firstName, lastName personalGreeting FROM ".ATTENDEES_TABLE."
     	WHERE (
     			id IN (SELECT attendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE associatedAttendeeID = %d)
    		 OR id IN (SELECT associatedAttendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE attendeeID = %d)
    		 OR id IN (SELECT associatedAttendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE attendeeID IN (SELECT associatedAttendeeID FROM ".ASSOCIATED_ATTENDEES_TABLE." WHERE attendeeID = %d))
    		)
    		 AND id <> %d
    		 AND rsvpStatus = 'NoResponse'";
    $associations = $wpdb->get_results($wpdb->prepare($sql, $attendeeID, $attendeeID,$attendeeID, $attendeeID ));
  3. Gayatriom
    Member
    Posted 1 year ago #

    oh man we did this manually since the wedding is SO close! thanks though! will use this for another client.

  4. fergbrain
    Member
    Posted 1 year ago #

    I have a mirror of the project on GitHub that I keep my changes in: https://github.com/fergbrain/mirror-rsvp

  5. nicolerunde
    Member
    Posted 11 months ago #

    @fergbrain,

    Thanks for these code snippets!

    When I use them, though, it's doing something funny with the Last name of the Associated Attendees. It's inserting it below the "Will you be attending?" question, instead of next to their first name.

    Take a look, if you wouldn't mind.

    Visit http://www.carrieandkristaps.com/rsvp and enter Suzanne DiFurio as the guest

    Any thoughts?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.