cancel
Showing results for 
Search instead for 
Did you mean: 

City dropdown

City dropdown

Following this topic I'm still having an issue with it. I get the response with the correct stateId, but it doesnt parrsed it to query.

Inspecting the city dropdown, it display like this

<select class="required-entry" name="billing[city]" id="billing:city">
    <option value=""></option>
    [object Object]
</select>

I've modified IndexController.php to the following since the one from topic didnt work

<?php
class Zeo_Citydropdown_IndexController extends Mage_Core_Controller_Front_Action{
    public function getCitiesAction($selectedCity = '',$stateId = ''){
        $result=array();
        $result['mycities'] = $this->getRequest()->getParams();
        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
    }
}
?>

Response from firebug

{"mycities":{"state_id":"278","default_city":"TestCity"}}

Tks for your time

 

Tags (1)
1 REPLY

Re: City dropdown

Hi,

 

We have made an extesnion for this. It is available here.http://www.magentocommerce.com/magento-connect/city-dropdown.html

 

Good luck!