@@ -10,6 +10,7 @@ class Clerk_Clerk_ApiController extends Mage_Core_Controller_Front_Action
10
10
*/
11
11
public function preDispatch ()
12
12
{
13
+ $ this ->setStore ();
13
14
$ this ->getResponse ()->setHeader ('Content-type ' , 'application/json ' );
14
15
15
16
$ input = $ this ->getRequest ()->getHeader ('CLERK-PRIVATE-KEY ' );
@@ -53,7 +54,6 @@ public function versionAction()
53
54
*/
54
55
public function storeAction ()
55
56
{
56
- $ this ->setStore ();
57
57
$ data = [];
58
58
59
59
foreach (Mage::helper ('clerk ' )->getAllStores () as $ store ) {
@@ -74,8 +74,6 @@ public function storeAction()
74
74
*/
75
75
public function productAction ()
76
76
{
77
- $ this ->setStore ();
78
-
79
77
// Handler for product endpoint. E.g.
80
78
// http://store.com/clerk/api/product/id/24
81
79
$ id = $ this ->getRequest ()->getParam ('id ' , false );
@@ -112,8 +110,6 @@ public function productAction()
112
110
*/
113
111
public function categoryAction ()
114
112
{
115
- $ this ->setStore ();
116
-
117
113
$ page = $ this ->getIntParam ('page ' );
118
114
$ limit = $ this ->getIntParam ('limit ' );
119
115
@@ -160,8 +156,6 @@ public function categoryAction()
160
156
*/
161
157
public function orderAction ()
162
158
{
163
- $ this ->setStore ();
164
-
165
159
$ page = $ this ->getIntParam ('page ' );
166
160
$ limit = $ this ->getIntParam ('limit ' );
167
161
$ days = $ this ->getIntParam ('days ' );
0 commit comments