- This topic has 1 reply, 2 voices, and was last updated 14 years, 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 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 eMember › Show "Buy Now" Button only when user is logged in
Hi,
I want to create a product page that has a “buy now” button.[using wp- estore plugin] I want to put in a condition on this page that if user is logged in only than show the “Buy Now” button else show a login button( instead of buy now button) which will take the user to the login page and after successful login user will automatically redirected to the product page.
I know how to check user is logged in OR not. The only problem i am having how to take user back to product page after successful login.
Please help…
You can create a “product” page with “Buy Now” button and Put that “product” page URL in the “Redirect after login” field while adding/editing a membership level in WP eMember. So when a user of that membership level logs in, he/she will be redirected to your product page. Also set protection to the “product” page so that anyone visiting that page needs to be logged in to view the content (this way only logged in members have access to that content). You can also protect the buy buttons using eMember’s section protection depending on what you are trying to do:
http://www.tipsandtricks-hq.com/wordpress-membership/how-to-protect-a-section-of-a-post-or-page-88
There is also this option: