Jump to content

Restrict client to add same product in cart


Dipak

Recommended Posts

Hello

Please suggest me some way i can handle client cart for adding same item in cart in same order as well as if service is activated then don't show in cart while he want to purchase.

e.g

1) For same product in same order

  • Login into Client panel
  • purchase service from product group
  • go to checkout page
  • click on continue shoping
  • again select same product it will be allow to take same product two times(i want to restrict this)

2)For new order

  • i have activated service x in order id-1
  • now i am purchasing same service again in order 2 (i don't want to show or select service that i have already activated in order-1).

Than you

Link to comment
Share on other sites

On 10/07/2020 at 11:38, Dipak said:

Please suggest me some way i can handle client cart for adding same item in cart in same order as well as if service is activated then don't show in cart while he want to purchase.

not from settings - you'd have to code a solution.

there was a free addon, Product Limiter, that does what its name implies and allows you to limit how many times a client could purchase a particular product - if you're using an older version of WHMCS, and PHP5.6 or earlier, then it will probably still work.

however, if your version of PHP or WHMCS is later, then there is a commercial addon of the same name in Marketplace that performs the same task.

ultimately, it's just a simple hook that either checks the content of the cart, or if logged in, the content of the cart against that client's existing services.

of course, the way around 2) for a user might just be to create a new account in WHMCS each time they want to order the limited product. 🙂

Link to comment
Share on other sites

  • 1 year later...
11 minutes ago, steven99 said:

The one @bear means in the post above your post -- Product Limiter .   Does not say right off if it can block during the same order but worth at least talking to them about it. 

As far I know that is, if someone has an active order then the second order of that product not possible to place. But I want, visitors or customers can not to add the same product twice to the cart. Is it possible?  @brian! or  @bear 

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