CBSub importing baskets from CRM

8 years 3 months ago - 8 years 3 months ago #276260 by activha
Replied by activha on topic CBSub importing baskets from CRM
It occurs only on some, can you tell me what info is missing from this error code ?
I cannot figure it

The payment basket goes until we chose offline payment, then we get the correct payment button and the slip until the print button.
At the print button, we only get a blank page and an initiated payment but not a pending payment.

This occurs only on a few and seem to be related to the promotion plugin

Please Log in to join the conversation.

8 years 3 months ago #276262 by krileon
Replied by krileon on topic CBSub importing baskets from CRM
You must populate the data the same way CBSubs would or you'll have missing information that CBSubs expects to exist. Could be $plan being null due to a basket generated with a plan id that doesn't actually exist or it could be $promo that's null due to an invalid promotion entry for that 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.

8 years 1 month ago #279921 by activha
Replied by activha on topic CBSub importing baskets from CRM
Hallo
I am coming back on this subject.
We successfully imported baskets and payments and now have an history looking like what we had in the CRM.
However I have noticed that for payment_totalizers there were several rows corresponding to only one payment or basket.

Could you tell me what SQL query to write to correctly dispatch all the information that we imported in payment_baskets and payment tables to other tables.

We imported roughly 2000 lines with the same id for baskets and payments ranging from 1000 to 3000.

I'll test first on my local dev site but this would be much needed to populate CBsubs statistics for the past years.

Thanks in advance

Please Log in to join the conversation.

8 years 1 month ago #279929 by krileon
Replied by krileon on topic CBSub importing baskets from CRM
I recommend creating an empty CBSubs site and making a test purchase. Then using the database rows created by it as an example/template for your import. The multiple rows in the totalizer table depends entirely on your usage. For example if you've a sales tax being applied you'll have the subtotal before tax, the tax totalizer (how much to tax), and finally the grandtotal combining those 2 rows.


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.

8 years 1 month ago #279939 by activha
Replied by activha on topic CBSub importing baskets from CRM
Yes this is exactly what we have usually : three rows as you described

The 2000 new lines imported in the payment and basket tables have all the same behavior with all taxes at 20%

Is it possible to have only one SQL query to insert the three lines in payment totalizers from the one line inserted in the payement or basket table ?

Could you tell me where it is located in the files ?

Please Log in to join the conversation.

8 years 1 month ago #279959 by krileon
Replied by krileon on topic CBSub importing baskets from CRM
Well the first row is going to be the plans total before taxes. The second line is going to be the amount of tax (e.g. if it's 10% then it's 10% of row 1). The last line is with those 2 lines added together.

There's nothing to locate in the files. Don't understand what you're asking. Yes, you can generate all 3 from the single payment line as needed as MYSQL supports math operations. You'll need 2 things, the amount of the plan and the tax rate. Review those 3 rows carefully to further see how to setup your query.


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

Facebook Twitter LinkedIn