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?
I’m sorry, I really have almost no idea how to do this. Everywhere I try and add code it is telling me I’ve made a fatal error and it deactivates the plugin on me. Would it be too much trouble if you could add it to my code? I’m fairly certain this is the if block, correct? It’s not that big of a deal, it’s just a personal pet peeve I would have with orders from unregistered users. Thank you very much so if you can!
$count = 1;
$products = $_SESSION;
foreach ($products as $key => $item)
if ($item == $_POST)
$count += $item;
$products = array();
if ($count == 1)
$price = $_POST[$_POST];
$price = $_POST;
$product = array(‘name’ => stripslashes($_POST), ‘price’ => $price, ‘quantity’ => $count, ‘shipping’ => $_POST, ‘cartLink’ => $_POST, ‘item_number’ => $_POST);
$_SESSION = $products;
$checkout_url = “http://www.mydomain.com/checkout”;
$redirection_parameter = ‘Location: ‘.$checkout_url;