How can i set payments status?

5 years 1 month ago #310901 by wegda
Replied by wegda on topic How can i set payments status?
Now its show the same result (at this time it is only one row inside the db ) on any user.
SELECT `time_completed_date` FROM `#__cbsubs_payment_baskets` WHERE `user_id` = '[user_id]' LIMIT 1

Please Log in to join the conversation.

5 years 1 month ago #310907 by krileon
Replied by krileon on topic How can i set payments status?
It's not possible for it to show the exact same result on every single profile unless every profile has a basket that was completed at the same time. The user_id where statement in it ensures it will only display the time completed from a basket of the profile owner. Your usage should be as follows.

Query:
SELECT `time_completed_date` FROM `#__cbsubs_payment_baskets` WHERE `user_id` = '[user_id]' LIMIT 1
Output: Single Row
Columns: Single Column

This works perfectly fine in my tests.


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.

5 years 1 month ago #310910 by wegda
Replied by wegda on topic How can i set payments status?
ok, how can we manipulate the output , so thats only payed users have a date result?

An i cant found any information about the abonnement information? Like date expired , payed or open, next payment and so on

Please Log in to join the conversation.

5 years 1 month ago #310920 by krileon
Replied by krileon on topic How can i set payments status?

ok, how can we manipulate the output , so thats only payed users have a date result?

You'd need to use SQL functions to modify the value. CB Query Field just displays the results of your query and nothing more. See the below SQL documentation for date functions if you need to reformat the date.

dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html

An i cant found any information about the abonnement information? Like date expired , payed or open, next payment and so on

There is no documentation for that as you're just asking for database structure, which is in your database. Specifically for baskets that's the _cbsubs_payment_baskets database table.


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.

5 years 1 month ago #310959 by wegda
Replied by wegda on topic How can i set payments status?

krileon wrote: It's not possible for it to show the exact same result on every single profile unless every profile has a basket that was completed at the same time. The user_id where statement in it ensures it will only display the time completed from a basket of the profile owner. Your usage should be as follows.

Query:

SELECT `time_completed_date` FROM `#__cbsubs_payment_baskets` WHERE `user_id` = '[user_id]' LIMIT 1
Output: Single Row
Columns: Single Column

This works perfectly fine in my tests.

Ya but it shows the same result on any users. Not only of my own or the payed user. Can we say if there is no entry of the user inside the basket table the output is nothing? And how can we do this?

Please Log in to join the conversation.

5 years 1 month ago - 5 years 1 month ago #310964 by krileon
Replied by krileon on topic How can i set payments status?

Ya but it shows the same result on any users. Not only of my own or the payed user.

That's not possible. It's substituting in the user id of the profile owner. It can only show the completed date for the basket attached to the profile you're viewing. Are you replacing [user_id] with your user id? It should be left as [user_id] to substitute in users id. Review your _cbsubs_payment_baskets database table using phpmyadmin to see what rows are available and their completed dates as well as who they're attached to via user_id column.


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

Facebook Twitter LinkedIn