We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [json]

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

Filter by
Sorted by
Tagged with
1
vote
3answers
5k views

“Zend_Json Decoding failed: syntax error” when submitting order

I recently switched from Apache/PHP 5.5 to a new nginx/PHP 7.0.4 server and now I am getting once in a while a "Decoding failed: Syntax error" when customers try to checkout, apparently when they ...
0
votes
1answer
62 views

how to get current cart items for different mobile app user with magento database?

I want to get cart items in json formate for different mobile app user . It works same as magento cart system how can get ? help me ..
0
votes
1answer
439 views

Create Product using the json data

I have a task to create products programmatically using the JSON data. I created a new module to make a custom controller. Then I hit the url using the http requester add on through Mozilla browser, ...
1
vote
1answer
1k views

Create product using SOAP API and JSON input

I need to create product with SOAP API and JSON, here is my JSON input: {"sku":"tsett","name":"TEST","weight":"3.0000","qty":"18.0000","brand":"sample","category_ids":["107","108","109"],"pirce":"...
-2
votes
1answer
2k views

How to get JSON data output on backend using API? [closed]

In here I have not experience with JSON on Magento. So I need to know useful links or tips to learn that.
23
votes
9answers
35k views

How to update magento2 from 2.0.0 to 2.0.2

The docs here say that you should use the system upgrade utility: http://devdocs.magento.com/guides/v2.0/comp-mgr/upgrader/upgrade-start.html and do it from the admin. I thought that you would be ...
5
votes
3answers
21k views

Magento2 - How to get JSON response from Controller [closed]

I've created my custom controller and I want to return the result formated with JSON. I always get a JSON parse error "JSON.parse: unexpected character at line 1 column 1 of the JSON data" and the ...
0
votes
3answers
797 views

java script 404 error in custom module

I created one module and i want to add js file to that module but in DOM i am getting "404 not found" my file are My\Helloworld\view\frontend\requirejs-config.js var config = { map: { '*':...
7
votes
4answers
20k views

How do I get a response from REST API in JSON format in Magento 2?

I used the resources in “Creating a New REST Web Service in Magento 2” and “Creating a New REST Web Service in Magento 2” to create a custom API module, but the response is in XML format. I need a ...
3
votes
1answer
1k views

Magento 2: Intercept controller's JSON response

I'm trying to intercept a controller returning a JSON object of Magento\Framework\Controller\Result\Json class. The problem is that no matter if I use a plugin or a preference to "catch" the ...
0
votes
1answer
119 views

ajax call failing

On the same page I have 2 sections. First section is generated dynamically (when I enter a text in an autocomplete field) and the second section is loaded on pageload. There is an ajax all I need to ...
3
votes
0answers
436 views

Reset super-attributes in select drop down for configurable products [closed]

Currently I have 2 select options: size and color as dropdown menus for my configurable products. On the frontend, users can select size, then color. Options for color are greyed out accordingly if ...
7
votes
4answers
2k views

Creating a custom module to send order details to external supplier API via XML or JSON

I'm trying to write a custom module for Magento that when certain items are ordered and payment has been made, posts to our clothing supplier's site with details of the ordered item, delivery address ...
1
vote
0answers
87 views

How to return global_messages as JSON string?

I am trying to echo global_messages via JSON on the frontend. I have been looking around for some examples of how to return global_messages as a JSON string but cannot find anything that has helped ...
2
votes
1answer
5k views

Properly convert Magento's returned object to JSON

I made a customer log-in to the site programmatically... I am properly returned the session values in form of an object. Now i want this data carried over and returned from the function in JSON ...
0
votes
2answers
270 views

proper JSON-encode of magento object (decimals/currency)

I'm trying to process a Magento object with JSON. Using json_encode($order->getData()) or Mage::helper('core')->jsonEncode($order->getData()), I get output such as the following: { "entity_id": "...
1
vote
1answer
1k views

How to get json of products/storeConfig by making a request with an url?

I'd like to setup Magento so that if I make a request with an URL such as: http://mymagento.com/api/storeconfig (actual url format not important) would return json with the data requested. How can I ...
4
votes
3answers
3k views

No response from POST to custom REST Api route

I set up a working custom route for Magento's REST Api. It works fine for GET requests, as the _retrieve() function of the corresponding V1.php class is being called as expected and returns the data. ...
0
votes
1answer
163 views

Using a controller to scrape own youtube video descriptions for outdated urls

Our website issues approximately twenty 503 errors a day from outdated URLs located on various videos on our YouTube channel. We have a large number of videos and it is completely unfeasible to ...
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
986 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 ...