Jump to content


Regular Collector
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Believe_

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I was looking to create a promo code that can be applied only if the customer purchased 5 services at a time while ordering. Also, those clients who have at least 5 active services on their account should be able to use this promo code to get the discount. Is there any way to set this up? Also, if the client purchased 10 service at a time or when they has 10 active services, then need to provide quite more discount with another promo code. Is it possible to set up? Any help/advise would be much appreciated. Thanks, 🙂
  2. Hello Guys, I was writing up a hook to run while activating an Addon product. The issue I found is the vars on AddonActivation is throwing the values twice that affecting my script. For eg: The debug output shows in accaddon.log file is: Here the service id is 16 and client id is 1, the output should be like 161 not 161161. Why this hook throwing the values twice? I also tried AddonActivated hook but this even not showing anything. Can someone shed some light on this, thanks 🙂
  3. Appreciate your efforts to publish this hook code since there are many paid versions available on the market for the same. The current hook code will cancel the entire invoice even if only one products require termination. If the invoice has two or more items, and if a product requires termination along with its Addons (if any) then we will need to split the invoice and mark the one which terminates as cancelled and other one stay as unpaid on the account. Also it would be good to provide log in Activity log as he suggested. Can you write it up, and your effort is much appreciated! 🙂
  4. Team, I'm looking to create two WHMCS hooks using AcceptOrder and AfterModuleTerminate. We have several custom products available with a few custom fields in it as follows: - Linux product 1 - Linux product 2 - Windows product 1 - Windows product 2 All the above products having three custom fields, where the client's will give some values when making the order. The field name is same, but the customfiled ID should varies in databases as far as I can see. What I need to do is, when we accept an order in WHMCS, I've to compare whether they purchased Linux or Windows product, and collect an IP address they are giving in one of the customfield to variable, and echo/insert to a file accordingly as follows: - If it is Linux echo linux [IP] or insert "Linux: [IP]" to a file named servercollection.txt (here the linux is just text not the product name) - If it is Windows echo windows [IP] or insert "Windows: [IP]" to a file named servercollection.txt (here the windows is a test not the product name) Same way, when the product terminate in WHMS, have to just collect the associated IP address to the product and echo/ insert to a file accordingly as follows: - Same for both Linux/Windows: echo [IP] or insert "[IP]" to a file named termination.txt A product comparison and collect the customfield data is required for AcceptOrder hook, and associated custom field data required in AfterModuleTerminate hook. Can anyone please share me a sample code to get this output for both hooks. Your assistance/help would be much appreciated! 🙂
  5. Hi Kian, Thank you so much for this code. Can you change it a bit to include Last Name too, and the Name should include both First and Last name before passing to the script. Also, is it possible to use shell_exec function within this hook to execute the script there? I would also like to confirm if I have more than one products with the same custom field name, then the customfield ID would varies so how I would set if ordered product is 'Hosting' then CustomFieldID would be 4, and if it is 'Email Hosting' then CustomFieldID would be 5. So a if check needed before that statement. Can you assist me to implement this. Once again thanks for this code 😊
  6. Hello Guys, I've set up a bash script to automate few tasks that we did manually, but to complete this we would need to execute this script at the time of accepting an order. From reviewing some online threads, I guess it could be possible using the WHMCS AcceptOrder hook [ https://developers.whmcs.com/hooks-reference/shopping-cart/#acceptorder ] , but I'm not sure how this can be applied to get it work. My requirement is: - We have a custom product, once they have paid the fee and when the order accepted a bash script need to execute. - The client will give an IP address on a custom field at the time of order, and that need to pass as an argument to the script including the client name and email address. - for eg: /root/automate_script.sh $ipaddress $name $email If so, how would I go further doing it? Can someone shed some light on this with an example code, that would be much helpful. Thanks, 🙂
  7. Welcome to WHMCS.Community Believe_! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  • 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