I’ve hit a bit of a problem with the above. I’m running EE2.2.2.
Basically, I have a page wrapped in:
{exp:channel:entries channel="courses" limit="1" require_entry="yes"}
{exp:simple_commerce:purchase entry_id="{entry_id}" success="site/success" cancel="site/index" country_code="GB" currency="GBP"}
... PAGE CONTENT ...
{/exp:simple_commerce:purchase}
{/exp:channel:entries}The main content pulls in the info from the channel entry, which is also assigned as an entry inside the SCM. The user is basically able to book a course via SCM based on the information presented to them. There is a custom PayPal form within the content to handle the cost, course name and stuff like that - nothing fancy.
It’s all working perfectly, except that any logged-in user who makes a purchase gets logged in the SCM purchases list as being the super-admin. It seems that SCM records the purchaser ID from the {member_id} value. I have found that {member_id} within the channel:entries loop always returns “1” (super-admin), I guess it’s pulling it from the author_id of the entry.
What’s particularly annoying is that {member_id} is not even listed as a valid variable for channel:entries (we have {author_id} for that), so I’m not too sure why this is should getting returned incorrectly in the first place.
Can anyone suggest a way around this? It’s so frustratingly close yet cripples the whole system just because of this one mis-reported variable. The documentation reports the “{member_id}” Global as “The Member ID for the currently logged-in user”, well, that’s obviously not quite the case.