Perch Shop Members Issue

  • Hello Everyone :) I'm hoping someone can help me with a Perch Shop issue.


    I have created a password less checkout on my Perch Shop following the examples in the documentation. All works fine, I go through the checkout process and a member and order is created as expected. The issue I have is if a second order is placed. If I use the same email address at checkout a new member is created with the same email address but a different member ID. Then in the order details in Shop, it's pulling through the member details from the first order with that email address rather than the details that were entered during checkout for that order. So the end result it's it's showing the wrong address.


    I do have the PerchMembers_Members::check_email helper on the email field during checkout, but it doesn't stop multiple members with the same email address from being created. Is it supposed to? The password field is also there and set to hidden with a value of __auto__


    Ideally how I would like it to work is if the same email address is used during checkout, it just updates the details for that member, without them having to enter a password.


    I've attached my checkout template below. Can anyone see anything wrong with it?


    Thank you :)


  • I've tracked the issue down and fixed it. If anyone else runs into this: The member that was created from the previous order was still logged in when placing the second order. And even if I entered different details in the checkout, if the email address was the same it would link that order to the logged in user and use that name and address. Strangely, it does actually create a new member, even though you're logged in. It just doesn't use their details for the order.


    I thought this was to do with multiple members with the same email address being created, as it was a full day between me placing the first and second order. But I must have still been logged in as the first member.


    The way I've "fixed" this is to add perch_member_log_out(); at the top of my checkout form. So a user isn't able to checkout while still being logged in from a previous session.


    I still have the issue with multiple members all with the same email addresses. But as I'm not having a members area I guess it isn't an issue for me. It just seems strange to allow it in the first place.