Hi guys,
need to change the state and country functions with my own since the CC functions don't have state/province for other countries, how can i do that? I always get the error messages below when i tried to fill-out the add_contact.php with the state and country changed to my own functions.
1 | 0.0007 | 797320 | {main}( ) | ..\subscribe.php:0 |
2 | 1.4506 | 1455760 | CC_Contact->createContactXML( ) | ..\subscribe.php:179 |
1 | 0.0007 | 797320 | {main}( ) | ..\subscribe.php:0 |
2 | 1.4506 | 1455760 | CC_Contact->createContactXML( ) | ..\subscribe.php:179 |
1 | 0.0007 | 797320 | {main}( ) | ..\subscribe.php:0 |
2 | 1.4506 | 1455760 | CC_Contact->createContactXML( ) | ..\subscribe.php:179
please help |
In the .Net sample project (I might assume there is a similar component in the php sample?) in the app_code folder there is a ConstantContact.cs file. In that file is a listing for US & Canada as well as a country name & code listing.
I would suggest porting this to php and adding the additional items.
Here are snipts of the top few rows of these sections...
public static DataTable GetStateCollection()
{
DataTable provinceTable = new DataTable();
provinceTable.Columns.Add("Name");
provinceTable.Columns.Add("Code");
provinceTable.Columns.Add("CountryCode");
#region State / Province Names and Codes
AddProvinceToDataTable(provinceTable, string.Empty, string.Empty, string.Empty);
AddProvinceToDataTable(provinceTable, "Alabama", "AL", UnitedStatesCountryCode);
AddProvinceToDataTable(provinceTable, "Alaska", "AK", UnitedStatesCountryCode);
AddProvinceToDataTable(provinceTable, "Alberta", "AB", CanadaCountryCode);
....
public static DataTable GetCountryCollection()
{
DataTable countryTable = new DataTable();
countryTable.Columns.Add("Name");
countryTable.Columns.Add("Code");
#region Country Names and Codes
AddCountryToDataTable(countryTable, string.Empty, string.Empty);
AddCountryToDataTable(countryTable, "United States", UnitedStatesCountryCode);
AddCountryToDataTable(countryTable, "Canada", CanadaCountryCode);
AddCountryToDataTable(countryTable, "Afghanistan", "af");
AddCountryToDataTable(countryTable, "Aland Islands", "ax");
AddCountryToDataTable(countryTable, "Albania", "al");
AddCountryToDataTable(countryTable, "Algeria", "dz");
AddCountryToDataTable(countryTable, "American Samoa", "as");
....
HTH
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article