[SOLVED] Need help for a query integration

10 years 11 months ago #227276 by myann
Replied by myann on topic Need help for a query integration
I use my own invoice component because I have several services and I want all the invoices of all my services be in the same place in the website with the same template. So, when the user subscrbe a plan, I create an invoice with the SQL Queries that the user can see the the invoice component.
When I do not use promotion, everything is OK. But I use a promotion, the invoice amount stays at the entire amount of the plan without promotion. It's a little bit confusing.

Hope you understand better now.

Regards
Myann

Please Log in to join the conversation.

10 years 11 months ago #227305 by krileon
Replied by krileon on topic Need help for a query integration
I see, I believe you just need to use [PLAN_PRICE] in your query. Example as follows.
INSERT INTO `#__myinvoices` ( `price` ) VALUES ( '[PLAN_PRICE]' )

There is also [PLAN_RATE]. Give each a try as 1 of them should give you the properly calculated value.


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.

10 years 11 months ago #227324 by myann
Replied by myann on topic Need help for a query integration
[PLAN_RATE] and [PLAN_PRICE] give the total amount of the plan without the promotion.
I just checked it.

Please Log in to join the conversation.

10 years 11 months ago - 10 years 11 months ago #227334 by krileon
Replied by krileon on topic Need help for a query integration
Have reviewed further and this isn't possible. Subscription events and states are not the same as basket events and states. The basket contains the totalizers and its adjustment. The basket can exist without the subscription and the subscription exist without the basket. It's possible to try and grab the last basket for that subscription, but that's going to be a heavy query and completely inaccurate in most cases. So no substitution for this is available it would seam, sorry.


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.

10 years 11 months ago #227338 by myann
Replied by myann on topic Need help for a query integration
So there is no way to create my invoices !!! :s It's very annoying.
Perhap's to put the query in another place ?

And about the proposition, can't I create a select of the last subsctiption of a specific user?? Get the amount really paid?

hum I really have to find a solution. How cb manage to create its own invoice ? It does not use subtitution ?

Sorry for all these questions but I really need to manage this process.

Myann

Please Log in to join the conversation.

10 years 11 months ago #227484 by krileon
Replied by krileon on topic Need help for a query integration
CBSubs uses internal API to assemble the basket again and grab the totalizers. This information can't be used in an integration, because it likely isn't available yet. I'm not sure why you even need a custom invoicing solution as all the information you need is available in CBSubs > Payments, CBSubs > Subscriptions, and CBSubs > Baskets. If you still need this then you're going to have to query multiple database tables and construct the totalized price.


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

Facebook Twitter LinkedIn