How to spilt the subscription year?

3 months 6 days ago - 3 months 6 days ago #322293 by rbuelund
Replied by rbuelund on topic How to spilt the subscription year?
The above solution has worked until now ! It has triggered on the 4/1 2021 - which it should not! Maybe it is because that we have had a week 53 ?

Here is my condition:


And the used promotion with the above condition:
Attachments:

Please Log in to join the conversation.

3 months 5 days ago #322307 by krileon
Replied by krileon on topic How to spilt the subscription year?
It's based off the order date. What's the date attached to the basket that used the promotion? That promotion is valid 6 months after the beginning of the year. So it should be valid at the end of December for example.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 months 5 days ago #322311 by rbuelund
Replied by rbuelund on topic How to spilt the subscription year?
Well that is the problem - on the basket "Initiated on" and "Completed on" are both 4/1 which should not trigger the promotion.

Please Log in to join the conversation.

3 months 5 days ago #322315 by krileon
Replied by krileon on topic How to spilt the subscription year?
Are you able to reliably trigger the promotion now in a test basket?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 months 5 days ago #322319 by rbuelund
Replied by rbuelund on topic How to spilt the subscription year?
As you can see here, the promotion is still added today !

Attachments:

Please Log in to join the conversation.

3 months 5 days ago #322322 by krileon
Replied by krileon on topic How to spilt the subscription year?
Ok, I see the issue. The comparison function expects a DateTime. It's being given just a Date which results in a Timestamp of 0. The below fixes it.

FROM: [cb:date format="Y" /]-01-01
TO: [cb:date format="Y" /]-01-01 00:00:00

Once the change is made cancel the basket and retry. I've dumped the raw comparison code in my test to confirm this absolutely works as well.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.451 seconds

Facebook Twitter LinkedIn