Jump to content

dylanfriedewald

Member
  • Posts

    4
  • Joined

  • Last visited

About dylanfriedewald

dylanfriedewald's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hey Reportmaker. I did a similar thing with the freeradius module. Take a look at the following link, which should help you on your way with what you want to achieve. http://docs.whmcs.com/Provisioning_Module_Developer_Docs#Admin_Services_Tab You will probably have to get the product ID, then get the group ID (gid) of that product via a SQL query and then simply just do an if statement - if it is the group ID you want then display, otherwise do nothing. I actually just finished implementing something like this for us yesterday, if you need any help just let me know.
  2. Anyone able to assist in any way? Is there any hook that is called when a service is "created" in the databases etc.. (set to pending) as a result of the order being placed? Dylan
  3. Hi everyone. Really hoping someone is able to help me. To give you a bit of a background. We are using Freeradius and placing orders via the admin area of whmcs. We do not really allow clients to order this product via their client area, as they are set to hidden and we enter it ourselves. I have added a link on the admin order page using jquery to call an external PHP script and generate a service ID which we use to track our services. Previously we have manually allocated these from a spreadsheet and entered them in to the domain field when ordering. The domain field contains the service ID as well as the username for the service. I am writing the returned service ID in to the domain field, but I need to take this value and write it in to a custom table I have and also store the service ID (whmcs service ID) that it has been allocated to. I thought about adding "custom fields" to each product (over 50 of them!), however the custom field ID changes each time a new one is created per service so this won't really work. What I am thinking I need to do to achieve this is one of the following methods: 1) Write a custom order page that taps in to the API to place the order, therefore getting all the relevant information (I assume) such as order ID, and then I can fetch the service ID from this order -- is someone able to clarify. I would prefer not to do this, but I am prepared if this is the only option. 2) Find a hook point that allows me to get the order ID of the order placed, or the service ID that has just been created. I would also like to be able to get the POST data from the form as well to retrieve the service ID that I have put there with my jQuery and custom script. If I could say, get the order ID and the POST data once it has been placed I could then call back on my service ID generation page and submit this information back to it and work with that. The closest hook point I have found to this is "OverrideOrderNumberGeneration" - however this just gives me the POST information from the order form and of course just lets me define an order number. Nothing about giving me the order ID. I have also looked at ShoppingCartCheckoutCompletePage but I believe this is a client side only hook. I have looked at PendingOrder but this only seems to run when setting an order to "Pending" so it's not really running when an order is entered in to the system, and a service generated (pending status). I have contacted WHMCS support to ask them about possible hook points and whether I could get some information regarding where these hook points run -- but haven't had much luck in terms of responses and I haven't really been able to find a suitable hook point to run. Would appreciate any input -- perhaps I am looking at doing this the wrong way so I am definitely open to suggestions. We really need to allocate our service ID's for the service being ordered from the get-go, and can't be allocated after the fact. We need to stamp it with our service ID from the moment the service is created in the database. Dylan
  4. Hi Kirill. We actually need to charge pro-rata once the service has been provisioned, and then charge the first full month the following month. As a result we had to disable pro-rata for WHMCS. We also have billing done on the same day for all clients. I wrote a function to tie in to the API. so I have a "Create pro-rata invoice" button that appears under module commands, this then calls the pro rata function which fetches the plan, monthly cost, the date and works out a pro-rata invoice with a setup fee line item - feeds it to the API and sets the next bill date for the service to be first of the following month. I guess you could probably do something like this to achieve what you are looking for - alternatively you may be able to tap in to the create function of whatever module you are using, and have it call a custom function to generate the invoices that way. Hope this information helps you at least a little bit. Dylan
×
×
  • 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