consc198 Posted December 30, 2015 Share Posted December 30, 2015 Hello. I need to limit the amount of domain registrations from each client for a promotion we are running, the WHMCS promotion system doesn't offer this. I've located http://www.jetserver.net/whmcs-product-limiter however it doesn't work with domains. Does anyone know of possible solutions to this? I'm willing to pay to get a solution developed. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 30, 2015 Share Posted December 30, 2015 I need to limit the amount of domain registrations from each client for a promotion we are running, the WHMCS promotion system doesn't offer this. couldn't you use the "Apply Once" options to both the order and the client ? e.g the promotion code only works on one product/domain in the cart (regardless of how many are in the cart), and they're not allowed to re-use the promotion code for other orders. http://docs.whmcs.com/Promotions The final 4 checkboxes allow you to specify who can use the promotion: Apply Once - If the client orders multiple qualifying products the discount is only applied once. Apply Once / Client - If a client has an existing active order using this promotion they will not be able to use the code a second time. 0 Quote Link to comment Share on other sites More sharing options...
consc198 Posted December 30, 2015 Author Share Posted December 30, 2015 couldn't you use the "Apply Once" options to both the order and the client ? e.g the promotion code only works on one product/domain in the cart (regardless of how many are in the cart), and they're not allowed to re-use the promotion code for other orders. http://docs.whmcs.com/Promotions That wouldn't work unfortunately as want to limit customers so they can purchase up to 50 domains with the promo - i'm sure it can be done just need some sort of hook developed that will reject orders with over 50 domains basically. - - - Updated - - - If someone here can develop this for us please reply to this thread or PM me. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 30, 2015 Share Posted December 30, 2015 That wouldn't work unfortunately as want to limit customers so they can purchase up to 50 domains with the promo - i'm sure it can be done just need some sort of hook developed that will reject orders with over 50 domains basically. or perhaps disable the checkout button if there are 50+ domains in the cart - that would prevent the order even occurring.... that might just require an edit to a template. If someone here can develop this for us please reply to this thread or PM me. they won't be allowed to reply to this thread as it's against the forum rules to quote for paid work outside of Marketplace... 0 Quote Link to comment Share on other sites More sharing options...
consc198 Posted December 30, 2015 Author Share Posted December 30, 2015 But how can I find the total amount of domains in a cart? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 30, 2015 Share Posted December 30, 2015 But how can I find the total amount of domains in a cart? depends where you want to do it! e.g the hook code in the thread below calculates the number of domains and products and adds it to the navbar.. http://forum.whmcs.com/showthread.php?108886-Add-a-cart-icon-hook-to-the-script&p=445939#post445939 0 Quote Link to comment Share on other sites More sharing options...
consc198 Posted December 30, 2015 Author Share Posted December 30, 2015 (edited) depends where you want to do it! e.g the hook code in the thread below calculates the number of domains and products and adds it to the navbar.. http://forum.whmcs.com/showthread.php?108886-Add-a-cart-icon-hook-to-the-script&p=445939#post445939 Btw I put a thread in the marketplace aswell hehe. I was thinking of adding a check in the checkout button to show an error if there is over 50 domains. Edited December 30, 2015 by consc198 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 30, 2015 Share Posted December 30, 2015 Btw I put a thread in the marketplace aswell hehe. I was thinking of adding a check in the checkout button to show an error if there is over 50 domains. exactly how might depend on which order-form template you're using, but as a very basic example with standard_cart, you could modify viewcart.tpl and change... <a href="cart.php?a=checkout" class="btn btn-success btn-lg btn-checkout{if $cartitems == 0} disabled{/if}" id="checkout"> {$LANG.orderForm.checkout} <i class="fa fa-arrow-right"></i> </a> to... <a href="cart.php?a=checkout" class="btn btn-success btn-lg btn-checkout{if $cartitems == 0 or $smarty.session.cart.domains|count gt 50} disabled{/if}" id="checkout"> {$LANG.orderForm.checkout} <i class="fa fa-arrow-right"></i> </a> untested, but that should disable the checkout button if the cart is empty or there are more than 50 domains in it. 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.