- This topic has 4 replies, 2 voices, and was last updated 9 years, 8 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore – Want PHP code to know if user did buy 1 particular product?
I have Emember 8.8.5 and e-store. I need to do something easy for you.
On My Website Free content is available to Visitors (so No free membership)
I have one Membership ONLY and No subscription
As a member you can buy products. I have 5 products.
Member can buy any of the 5 products, or 2 or 3 or all of them.
I want to know (for a logued in member) :
In a WP custom page I want to show information according their purchase.
So If products are A,B,C,D,E ( or using productID from e-strore)
In PHP how do I know if their purchased one particular product?
I need php because I do calculation after
If a shortcode exist I can try to work with it
thank you
If you allow anonymous checkout (meaning you don’t know which member is buying what) then you can’t magically figure out who bought what afterwards.
It seems like you want to use a purchase history system:
https://www.tipsandtricks-hq.com/wordpress-membership/how-to-display-a-members-purchase-history-158
You will need to make sure the members are logged into the site when they purchasing the item. Only then the plugin can track which member is buying what.
Well may be I was not clear enough.
Only members can buy products.
I need to make calculation based on specific product they purchased.
They are all registered and loggued.
Is there in the database something that links eMemberID to ProductID ?
Does not have to be a shortcode. PhP is fine
Yes. Check the “eStore_show_members_purchase_history” function from the “eStore_misc_functions.php” file to see how it can find all the products purchased by a member.
Ok thanks I will do that