Got as far as being able to display all the purchases from the SCM on a custom profile page but can’t pare it down to the logged in user.
Am using this following code courtesy of Andre Weaver in this thread but can’t get it to work showing the items of only the logged in member.
SELECT p.purchase_id,
p.member_id,
p.item_id,
p.purchase_date,
p.item_cost,
p.paypal_details,
t.entry_id,
t.title,
t.url_title,
t.status
FROM exp_simple_commerce_purchases p
INNER JOIN exp_simple_commerce_items i ON p.item_id = i.item_id
INNER JOIN exp_channel_titles t ON i.entry_id = t.entry_id
WHERE p.member_id = 1;Obviously can’t show the logged-in member ID variable on the last line and tried a few solutions from the forums but no luck…anyone able to help?