techwthquestion Posted May 3, 2023 Share Posted May 3, 2023 want to apply discount code automatically of customer select shared hosting plan with biannually billing cycle {if $productinfo.type eq "hostingaccount"}<input type="hidden" name="promocode" value="YourCode" /> {/if} I found this code but it apply code for all billing cycle How can i apply this only for biannually billing cycle 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted May 3, 2023 Share Posted May 3, 2023 I think you'd be better off using the OrderProductPricingOverride hook to do this: https://developers.whmcs.com/hooks-reference/shopping-cart/#orderproductpricingoverride 0 Quote Link to comment Share on other sites More sharing options...
techwthquestion Posted May 4, 2023 Author Share Posted May 4, 2023 5 hours ago, leemahoney3 said: I think you'd be better off using the OrderProductPricingOverride hook to do this: https://developers.whmcs.com/hooks-reference/shopping-cart/#orderproductpricingoverride I am not sure how to use this hook. can you give me an example for applying promocode? 0 Quote Link to comment Share on other sites More sharing options...
techwthquestion Posted May 6, 2023 Author Share Posted May 6, 2023 {if $productinfo.type eq "hostingaccount"}<input type="hidden" name="promocode" value="YourCode" /> {/if} Ths is partially working for me. But how can I add billing cycle here? I tried billingcyle eq "annually" but it is not working for me. and 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.