A
A
Anton Titov2018-02-04 19:20:18
Magento
Anton Titov, 2018-02-04 19:20:18

Why doesn't Magento 1.9 routing work?

I am writing a module for version 1.9;
Magenta sees my module (in the admin panel);
But at the url " query.com/someapi/product/last " I see 404 WHOOPS, OUR BAD... The
log is empty, the cache was cleared, chmod 777 -R enabled;
app/code/local/Some/Api/etc/config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Some_Api>
      <version>1.0</version>
    </Some_Api>
  </modules>
  <frontend>
    <routers>
      <Some_Api>
        <use>standart</use>
        <args>
          <module>Some_Api</module>
          <frontName>someapi</frontName>
        </args>				
      </Some_Api>
    </routers>
  </frontend>
</config>

app/code/local/Some/Api/controllers/ProductController.php
<?php

class Some_Api_ProductController extends Mage_Core_Controller_Front_Action
{
  public function lastAction()
  {
    die('PRODUCTS!');
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2018-02-04
@ZAnatoly

Everything seems to be correct. Perhaps the error is that the Id in the node is written with a small one, you should have it<some_api>...</some_api>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question