Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Reply To: Automatically require users to be logged in?

by

Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Simple Shopping Cart Tweaks › Automatically require users to be logged in? › Reply To: Automatically require users to be logged in?

December 15, 2009 at 7:31 am #16741
amin007
Participant

Yeah this should be easy to implement. All you gotta do is check if the visitor is logged in when they hit the “Add to Cart” button. If they are logged in then let them process as usual or else redirect them to the Login page.

Search for the following piece of line in the code (this is what gets executed when the button is clicked:

if ($_POST['addcart'])

You will need to add the check for is_user_logged_in() inside this if statement block and redirect to the login page if the user is not logged in.

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ