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!