Skip to Content Skip to Menu

[SOLVED] [#8078] [SUBSCRIPTION_VALIDITY_PERIOD_REMAINING] generating wrong value

  • fdinkler
  • fdinkler
  • ONLINE
  • Posts: 215
  • Thanks: 27
  • Karma: 0
4 years 4 months ago - 4 years 4 months ago #319359 by fdinkler
Using this substitution string in the CBSubs Mailer returns the total subscription validity period, not the validity period remaining.

I defined a test mailer as "90 days before" Subscription expiry date, on all my annual (one year) plans
The email subject:
Code:
[SUBSCRIPTION_EXPIRY_DATE] - [SUBSCRIPTION_VALIDITY_PERIOD_REMAINING]

The [SUBSCRIPTION_VALIDITY_PERIOD_REMAINING] values were all "1 year" - not the difference between the expiration date and today's date, which is what I expected.

Thanks,
Fred
Attachments:
Last edit: 4 years 4 months ago by beat. Reason: Added [#8078] tag to subject

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
4 years 4 months ago #319364 by beat
Thanks for reporting. Confirming as bug.

Probably that display should be renamed into [SUBSCRIPTION_VALIDITY_PERIOD] and see how we can have a reasonable time-left display for [SUBSCRIPTION_VALIDITY_PERIOD_REMAINING].

Looking into it.

Tracking as #8078 here:
forge.joomlapolis.com/issues/8078

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
4 years 4 months ago #319368 by beat
Implementation of this fix (and a natural language display of subscription time left too) is moving forward well, should have something very soon.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
4 years 4 months ago #319374 by beat
This is now fixed in latest nightly.

[SUBSCRIPTION_VALIDITY_PERIOD_REMAINING] is now outputing a human-readable date/time interval.

and old current subscription total period is now:
[SUBSCRIPTION_VALIDITY_PERIOD]

To upgrade, as usual backup site, then go to "Community Builder" / "Plugin management" / "Install and update", then click bottom right on "Refresh" button, then on top right "Upgrade All".

Can you please check and reply if that solves the bug for you too ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

  • fdinkler
  • fdinkler
  • ONLINE
  • Posts: 215
  • Thanks: 27
  • Karma: 0
4 years 4 months ago #319379 by fdinkler
Beat -
Yes, the value now returns the correct human-readable value. However, the word "left" at the end of the string should be removed.
It would be just as valid to say "You have 2 months and 25 days remaining..." or "2 months and 25 days until your access expires..."
Just the value string, please, no additional words.
Thanks,
Fred

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
4 years 4 months ago #319381 by beat

fdinkler wrote: Beat -
Yes, the value now returns the correct human-readable value. However, the word "left" at the end of the string should be removed.
It would be just as valid to say "You have 2 months and 25 days remaining..." or "2 months and 25 days until your access expires..."
Just the value string, please, no additional words.
Thanks,
Fred


Hi Fred,

Great!

Ok, makes sense to remove the word " left" as it might sound negative and gramaticaly poor. Will remove for the next build.

In the mean time you can personalize that string in the Language overrides as follows:

Key: "CBPTIMELEFT"
String "[YEARS_AND_MONTHS_AND_DAYS_HOURS_MINUTES] left"

(for overrides, go to CB, plugin management, filter by type languages, click on your language (if none, just select the "Default Language" English plugin), then on "Overrides" tab, then enter the key and the string of your will, e.g. "You have [YEARS_AND_MONTHS_AND_DAYS_HOURS_MINUTES] remaining", and click save).

That string definition will stay even with the word " left" at end removed, so your override will remain valid after the next upgrade.

Does that fully solve your question ? :-)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum