postcd Posted March 14, 2017 Share Posted March 14, 2017 Hello, in this post, Brian mentioned rule on how to prevent checkout when there is too many domains in the cart. Used variable in viewcart.tpl is: $smarty.session.cart.domains|count What is the variable for domain count that the client already purchased and have in his/her account? (this way i can disallow order if client have too many domains) Moreover can i enhance it by allowing maximum 3 client accounts per IP and rest orders can not proceed to checkout? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted March 14, 2017 Share Posted March 14, 2017 Why not use coupons to limit the amounts and then pass the coupon link automatically with the order? You can then limit by customer, number of domains, etc. You don’t want to do it by IP, users constantly change their IP’s so that is mostly worthless. You should limit it per user account. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 14, 2017 Share Posted March 14, 2017 What is the variable for domain count that the client already purchased and have in his/her account? (this way i can disallow order if client have too many domains) if the user is logged in, then {$clientsstats.numdomains} will give you how many domains they have, and {$clientsstats.numactivedomains} will tell you how many active domains they have. if they're not logged in, there's no reliable way to identify them. Moreover can i enhance it by allowing maximum 3 client accounts per IP and rest orders can not proceed to checkout? Why not use coupons to limit the amounts and then pass the coupon link automatically with the order? You can then limit by customer, number of domains, etc. You don’t want to do it by IP, users constantly change their IP’s so that is mostly worthless. You should limit it per user account. as yggdrasil suggests, i'd be inclined to go along the promotion code route if possible too. technically, you could do the IP test as the cart has access to the user's IP, so it's then just a database lookup to see how many other clients used that IP on their last login - but if I wanted to beat that test, i'd just login using a VPN and/or create a new account. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.