Jump to content

Enable only once each e-mail


Recommended Posts

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

7ZsT8ag.png

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

fJgTRKp.png

Link to comment
Share on other sites

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.

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