Typo in English language key ?
Here is the key:
"_bx_payment_et_txt_body_wrong_balance" and it looks like this:
{email_header} <p>Hello,</p> <p>You have insufficient funds to write off for paying a subscription.</p> <p>Subscription info:<br />ID: {sibscription_id}<br />Customer: {sibscription_customer}<br />Payment provider: {sibscription_provider}<br />Date: {sibscription_date}</p> {email_footer}
mind the word "sibscription_..." - I belive it should be "subscription_..."
Correct?
-
- · PavelS
- ·
Correct :)
-
- · Mayki
-
·
In reply to PavelS
- ·
😀👍
-
- · Mayki
-
·
In reply to PavelS
- ·
And the key is in Payment module:
/modules/boonex/payment/install/langs/en.xml
Corected 😀
-
Nice spot.
-
- · Jerome Mingo
- ·
Do not make any changes to this. The code is expecting 'sibscription' and if you change it to 'subscription', you will break the coding. {sibscription_id} and {sibscription_customer} are simply placeholders that will be replaced when the code is executed.
-
Hi @Jerome Mingo - thanks for your input. It is a bit strange that no one else from UNA Team ( @Alex T⚜️ , @Alexey or @LeonidS ) didn't mentioned that....
-
It looks like it's written subscription_id in the `bx_payment_subscriptions` and `bx_payment_subscriptions_deleted` database tables.
-
That is unrelated to the reference above. As I stated, the coding is expecting exactly what is there and if you guys change it, there will be undesired results. Take a look at lines 147-150 in the file modules/boonex/payment/classes/BxPaymentProviderCredits.php and you will see that the code has sibscription_id and sibscription_customer. As stated previously, these are simply placeholders that will be replaced with actual data and it does not matter what you call them as long as it is the same in the code and in the language string. PHP does not require that words are spelt properly.
-
Strange workings indeed. And what if those 'typos' were changed?
-
You could change them in both the PHP files and the language keys, however there is no benefit in doing so. Furthermore, every time UNA releases an update you will have to redo the change if those files are overwritten. This is really a "behind the scenes" functionality. There is no importance in correct spelling. In the language strings, anything that is enclosed in {} will be replaced in the code and should not be touched.