Jump to content

Can not translate word Addon on auto invoice selected items


zitu4life

Recommended Posts

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...

image.thumb.png.b96f1f6ee8d7e52ec591d5e10e04a3e4.png

Now a invoice is auto generated and I have this...

image.thumb.png.ff2918aa2694bf4f6cb14cead0191ac5.png

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...

image.thumb.png.d04aba7cab366e434b87a99f14066377.png

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 by zitu4life
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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