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

3 years 8 months ago - 3 years 8 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:
[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:

Please Log in to join the conversation.

3 years 8 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 to join the conversation.

3 years 8 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 to join the conversation.

3 years 8 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 to join the conversation.

3 years 8 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 to join the conversation.

3 years 8 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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 1.532 seconds

Facebook Twitter LinkedIn