Skip to Content Skip to Menu

CBSubs invoice fields problem

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 391
  • Thanks: 36
  • Karma: 2
  • Add-ons
4 years 11 months ago - 4 years 11 months ago #315497 by liaskas
CBSubs invoice fields problem was created by liaskas
Hello...
we have managed to set the Countries and states list on cb registration to populate the same values with CBSubs invoice Country and states list. For this we used 2 query fields.

One is calling the country list with this query:
Code:
SELECT `country_name`, `country_region` FROM `#__comprofiler_countries` WHERE `country_region` != '' ORDER BY `country_name`
The other is calling the states list with this query:
Code:
SELECT p.`province_latin_name`, p.`province_iso_code`, c.`country_name` FROM `#__comprofiler_provinces` AS p LEFT JOIN `#__comprofiler_countries` AS c ON c.`country_iso_code2` = p.`country_iso_code2` WHERE c.`country_name` = '[cb_country]' ORDER BY c.`country_name`, p.`province_latin_name`

This works fine for us. All set, on coutry selection the states show fine etc.

Now we go to CBSubs...

We have mapped the invoice fields to the appropriate #__comprofiler fields where each user's data are stored.
All the mapped fields are populated fine, but not the field that has the user's state. The record exists in this field but it is not populated.

Instead, it shows the dropdown selection with the pre-selected country states. And here is the point...

We noticed that the states in the CBSubs invoice "State / Province" field are populated by "province_name" and not by "province_latin_name" column that we use to query the states in cb registration.

Is there a posibility that the "State / Province" field is not populated because of this difference?

How will we set the "State / Province" field to populate values from "province_latin_name" column?

Thank you in advance!
Last edit: 4 years 11 months ago by liaskas. Reason: Changed subject title.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 11 months ago #315505 by krileon
Replied by krileon on topic CBSubs invoice fields problem
State in CBSubs is stored as COUNTRY_ISO-STATE_ISO. More specifically it's the province_iso_code of the _comprofiler_provinces table. So you'll need to be sure that that column is set as the value for your query select field. Now for country it's a little different. That's stored as the country name so you'll need to use the country_name column in _comprofiler_countries as the value for country query select. CBSubs is supposed to be able to handle translating the supplied values to the necessary values, but it doesn't work as reliably as it should and we've a ticket already to improve this.


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 or Create an account to join the conversation.

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 391
  • Thanks: 36
  • Karma: 2
  • Add-ons
4 years 11 months ago #315509 by liaskas
Replied by liaskas on topic CBSubs invoice fields problem
So if i understood good....

i have to query the province_iso_code of the selected state in a field (for example cb_province iso code) and then map the "State / Province" to that field?

Please advise...

Thank you.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 11 months ago #315511 by krileon
Replied by krileon on topic CBSubs invoice fields problem
Yes, configure the value column for your query select field to use province_iso_code. That should pass to CBSubs fine or at least is the expected value stored in the database that CBSubs will use for state. There's a known bug however with the edit invoice address page not having its initial value set correctly, but it should display correctly when viewing the 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.
The following user(s) said Thank You: liaskas

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum