Sessa Posted December 16, 2018 Share Posted December 16, 2018 Hello, I would like to offer a product that can only be ordered once per confirmed account (e-mail verification). How do I configure this? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 17, 2018 Share Posted December 17, 2018 22 hours ago, Sessa said: I would like to offer a product that can only be ordered once per confirmed account (e-mail verification). How do I configure this? this isn't really a configuration question - because out of the box, you can't do this... you could price it expensively (to prevent casual ordering of the product) and use a Promotion Code to discount the price and ensure that this promotion is only used once per customer... .. but that wouldn't check whether the account was verified or not. you'd likely need to write an hook or addon that would check the verified status of the account and whether the current user already had this product - both would be simple queries to the database... you would likely need to post in Service Offers & Requests to pay a developer to write it for you (or if your lucky, someone might reply with a hook). there is the free Product Limiter addon, and it still works with v7.6.1, but it wouldn't check the verified account status without further coding - but it will limit the user to only have one (or another number specified by you) of a particular product... if they try to purchase more than the allowed limit per user, they'll get a custom (written by you) error message at checkout and they will have to remove the product before they can successfully checkout. 0 Quote Link to comment Share on other sites More sharing options...
Sessa Posted December 17, 2018 Author Share Posted December 17, 2018 2 hours ago, brian! said: and it still works with v7.6.1, Not for me: I already use a hook which checks if the accounts / emails are validate. So in this case i only need a solution to limit a product to one each account :) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 19, 2018 Share Posted December 19, 2018 On 17/12/2018 at 14:07, Sessa said: Not for me: then let me clarify - it works in WHMCS v7.6.1 (and therefore probably any earlier version of WHMCSv 7.x), but seemingly does not work when using PHP 7 or later... On 17/12/2018 at 14:07, Sessa said: I already use a hook which checks if the accounts / emails are validate. So in this case i only need a solution to limit a product to one each account 🙂 then you would either need to expand the hook or rewrite the addon for PHP7 - basically, it's just the SQL queries of the addon (they're not encrypted so you can see the code) that are the problem and the fact it was written years ago before these functions were deprecated from PHP7. 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.