Dipak Posted July 10, 2020 Share Posted July 10, 2020 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 13, 2020 Share Posted July 13, 2020 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. 🙂 0 Quote Link to comment Share on other sites More sharing options...
Md Rasel Khan Posted October 11, 2021 Share Posted October 11, 2021 @brian! Is there any way to prevent adding same product twice in cart by book? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted October 11, 2021 Share Posted October 11, 2021 Same thing of using a module or hook that checks the cart for the product and removes / blocks it. 0 Quote Link to comment Share on other sites More sharing options...
Md Rasel Khan Posted October 11, 2021 Share Posted October 11, 2021 8 minutes ago, steven99 said: Same thing of using a module or hook that checks the cart for the product and removes / blocks it. Which module or hook? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted October 11, 2021 Share Posted October 11, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted October 11, 2021 Share Posted October 11, 2021 9 minutes ago, steven99 said: The one @bear means in the post above your post -- Product Limiter That was Brian. 😉 0 Quote Link to comment Share on other sites More sharing options...
Md Rasel Khan Posted October 11, 2021 Share Posted October 11, 2021 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 0 Quote Link to comment Share on other sites More sharing options...
bear Posted October 11, 2021 Share Posted October 11, 2021 (edited) NameSeba, I was included by accident in that mention. I can't help you. Edited October 11, 2021 by bear 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 11, 2021 Share Posted October 11, 2021 You could try this hook (info - code) and change it accordingly. Can't provide more details 🕳️ 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.