Jump to content

Limitting number of .tk domains per member / IP address


postcd

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated