we are assigning 5 store views for 200 countries using below code.
now I am following as below code where IN, AT, IR, AU
are country codes. usa, canada
are store views.
like this I need to assign each country code for one store view for all 200+ countries. Is there any way i can use array and use only 5 switch cases & include many country codes in one switch case.
switch ($cnCode) {
case "IN": {
Mage::app()->setCurrentStore('usa');
break;
}
case "AT": {
Mage::app()->setCurrentStore('usa');
break;
}
case "IR": {
Mage::app()->setCurrentStore('usa');
break;
}
case "AU": {
Mage::app()->setCurrentStore('canada');
break;
}
}
also i am fine with any other way with less code.