zitu4life Posted August 26, 2019 Share Posted August 26, 2019 (edited) Hello there After Adding a client a products and Addon for this products, I manually invoice it...the point is that on invoice we see: Line 1: with Product Line 2: with a addon English is not my default language so I would like to edit on language override file a name addon that WHMCS auto creates on you generate addon on invoice, but I can not find this word addon that are allocated to invoice...I have tried change some word addon on language file but do not work. Would be even better I could removed it automatically from invoice.😉 Steps followed... Now a invoice is auto generated and I have this... I know language can be override but i cant find it to edit it, maybe I am missing something, if so, a help is appreciate... some clients never heard a name addon. I am looking to have it like this or just edit it from language override, hope it is not hardcode... Hope I am not being using such detail on my thread, but i guess when we ask help, at least we should explain well, to avoid lot of question for who are spending their time in helping us. Edited August 26, 2019 by zitu4life 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 27, 2019 Share Posted August 27, 2019 9 hours ago, zitu4life said: I am looking to have it like this or just edit it from language override, hope it is not hardcode... it's hardcoded. 😞 I don't think that there's any technical reason why it has to be hardcoded in English and not using a language string - it's just the way that WHMCS has always been. 10 hours ago, zitu4life said: Hope I am not being using such detail on my thread, but i guess when we ask help, at least we should explain well, to avoid lot of question for who are spending their time in helping us. detail is good. 🙂 I suspect you're going to need a hook, probably InvoiceCreationPreEmail (which runs after the invoice has been created, but before it's sent to the client) - and in that hook, you would get the invoice ID; use that value to get an array of invoiceitems for that invoice; loop though that array checking if each line description starts with "Addon - " and either remove or replace, then save the results back to the database... that way, by the time the client gets their invoice, "Addon - " should have been removed/replaced from both the invoice and email. of course, that hook wouldn't change previous invoices that already contain "Addon - " - but these could be changed manually (if you don't have many of them), via SQL or through other ways. 0 Quote Link to comment Share on other sites More sharing options...
zitu4life Posted August 27, 2019 Author Share Posted August 27, 2019 So it would be another case for future requests, I will submit it as future request, and hope that developers undestand that it is needed, because we can not force other to understand english at any price...especialy when we are talking related INVOICES. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 27, 2019 Share Posted August 27, 2019 2 minutes ago, zitu4life said: So it would be another case for future requests, I will submit it as future request, and hope that developers understand that it is needed, because we can not force other to understand English at any price...especially when we are talking related INVOICES. but what's the use of a request with not even a handful of votes ? it will never get implemented, and even if it does, it will be years away (unless it's already on their radar). the point with WHMCS is that they give you avenues to make changes yourself - so that might be template or css changes, hooks, API or other paths.... i'm not suggesting that you don't submit a request, that's up to you, but the solution to your issue is above... and there are hardcoded strings all over the place in WHMCS, so this is not an isolated incident. 1 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 27, 2019 Share Posted August 27, 2019 actually, I think i'm wrong on this and it's not hardcoded... 🙄 $_LANG['orderaddon'] = "Addon"; so you could replace it with a language override, but not really remove it (without a hook) - as it would leave an orphaned hyphen (-) at the beginning of the output. 0 Quote Link to comment Share on other sites More sharing options...
zitu4life Posted August 27, 2019 Author Share Posted August 27, 2019 14 minutes ago, brian! said: actually, I think i'm wrong on this and it's not hardcoded... 🙄 $_LANG['orderaddon'] = "Addon"; so you could replace it with a language override, but not really remove it (without a hook) - as it would leave an orphaned hyphen (-) at the beginning of the output. Not sure about that, I guess i have tried to edit it before and not work... will give it a try again and see if perhaps I have override language from client or admin (vice-versa)... 0 Quote Link to comment Share on other sites More sharing options...
zitu4life Posted August 27, 2019 Author Share Posted August 27, 2019 (edited) Well Well...it works...Many thanks, I guess I was looking for language in Admin folder... Any way happy I could overpass this issue. Edited August 27, 2019 by zitu4life 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 28, 2019 Share Posted August 28, 2019 21 hours ago, zitu4life said: Well Well...it works...Many thanks, I guess I was looking for language in Admin folder... Any way happy I could overpass this issue. that's the mistake I initially made - I was checking the admin language files.... it was only later in the day, that it occurred to me they were client language files. be aware though, that this will only affect new orders - existing invoices should still contain the word "Addon" rather than your new override. 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.