Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [json]

This tag should be used for questions related to json data types

2
votes
1answer
2k views

Format Cart Totals HTML from JSON Response

My Controller File public function myAction() { $response = array(); $response['myresponse'] = $this->myAjax(); $this->getResponse()->clearHeaders()->setHeader('...
0
votes
4answers
3k views

json_encode error for special characters in magento

In checkout page in magento. In billing information when i select a country, states having special characters are not displayed.For ex: A Coruña,Ardèche .I got this error message in error.log Warning:...
2
votes
2answers
2k views

Alphabetically Sort The State/Province Drop Down

I have an issue in sorting alphabetically those items in the state/region drop down. // File: Mage/Directory/Helper/Data.php (line:150) $json = Mage::helper('core')->jsonEncode($regions); Mage::...
2
votes
2answers
5k views

Force JSON Encode to Return Object

As far as I understand, Magento has a JSON encode function by using zend framework. And my question, is there an option to force that function always return JSON object, not JSON array? Mage::helper('...
0
votes
2answers
969 views

AJAX Request JSON Response Always NULL

I'm creating an ajax add-to-cart module. It's working fine (adding product, respecting quantity, etc) BUT the response is always the full HTML page, instead of a JSON object. In particular, the ...