Magento非CMS页面显示404错误

时间:2013-08-24 22:06:27

标签: php magento zend-framework

我是Magento的新手,并继承了一个在CMS之外建造的商店。该页面是3个产品的硬编码,包括购物车,运费和付款在一个页面。我需要启用更多产品(我已经完成),启用产品详细信息页面,单独的购物车以及单独的送货和付款页面。

当我经营三家商店时,网址包括语言和位置信息。所以,我有www.company.com/en/shop/eu/products,这给我看了正确的页面。我想请www.company.com/en/shop/eu/detail详细展示一个产品。

为此,我使用简单/shop/app/code/local/Company/DetailIndexController.php创建了config.xml。我还创建了/shop/app/design/frontend/company/detail并在那里有content.phtml。我也有/shop/app/etc/modules/Company_Detail.xml。我也将content.phtml放在/shop/app/design/frontend/default/default/template/detail/中。我正在学习本教程.... http://www.human-element.com/Blog/ArticleDetailsPage/tabid/91/ArticleID/69/Magento-Non-CMS-Pages-Creating-Pages-Via-Frontend-Routers.aspx

启用并安装了URL重写。一切都重新编入索引,所有缓存都刷新了。还有什么指针?

STACK TRACE

0 include()在[/var/www/co/shop/app/code/core/Mage/Core/Block/Template.php:235]中调用

在[/ var / www / co / shop / app / code / core / Mage / Core / Block / Template中调用1 page_Core_Block_Template-> fetchView(frontend / changers / changers / template / page / 404.phtml)。 php:266]

2 Mage_Core_Block_Template-> renderView()调用于[/var/www/co/shop/app/code/core/Mage/Core/Block/Template.php:280]

3 Mage_Core_Block_Template-> _toHtml()在[/var/www/co/shop/app/code/core/Mage/Core/Block/Abstract.php:758]中调用

4 Mage_Core_Block_Abstract-> toHtml()在[/var/www/co/shop/app/code/core/Mage/Core/Model/Layout.php:529]中调用

在[/var/www/changers/shop/app/code/core/Mage/Core/Controller/Varien/Action.php:391]调用的5 Mage_Core_Model_Layout-> getOutput()

在[/var/www/changers/shop/app/code/core/Mage/Cms/controllers/IndexController.php:91]中调用的6 Mage_Core_Controller_Varien_Action-> renderLayout()

在[/var/www/co/shop/app/code/core/Mage/Core/Controller/Varien/Action.php:420]调用的7 Mage_Cms_IndexController-> defaultNoRouteAction()

在[/var/www/co/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php:253]调用的8 Mage_Core_Controller_Varien_Action-> dispatch(defaultNoRoute)

9 Mage_Core_Controller_Varien_Router_Standard-> match(Mage_Core_Controller_Request_Http Object([] => / detail,[] =>,[] => / detail,[] =>,[] =>,[] = > Array(),[] => cms,[] =>数组([api] =>,[xmlconnect] =>),[] => Mage_Cms,[] =>,[] =>数组([params] =>数组(),[action_name] => noRoute,[controller_name] => index,[module_name] => cms),[] =>数组([0] => _GET,[1] => _POST),[] => / en / shop / eu / detail,[] => / en / shop,[] =>,[] => / detail,[] => Array(),[] =>,[] => Array(),[] => 1,[] => cms,[] => module,[] = > index,[] => controller,[] => defaultNoRoute,[] => action))调用[/ var / www / changers / shop / app / code / core / Mage / Core / Controller / Varien / Front.php:176]

10 Mage_Core_Controller_Varien_Front->在[/var/www/co/shop/app/code/core/Mage/Core/Model/App.php:340]调用的dispatch()

11 Mage_Core_Model_App->运行(在[/ var / www / co / shop /]中调用的Array([scope_code] =>,[scope_type] => store,[options] => Array())) app / Mage.php:627]

12 Mage :: run(,store)在[/var/www/co/shop/index.php:80]上调用

1 个答案:

答案 0 :(得分:0)

URL重写将在shop / app / code / local / Company / Detail / etc / config.xml文件中,您可以按以下方式在xml中使用路由器功能:

    <routers>
  <detail>
    <use>standard</use>
      <args>
        <module>Company_Detail</module>
        <frontName>detail</frontName>
      </args>
  </detail>
</routers>