Overriding magento cms controller for noRoute action - magento

I'm looking for example of overriding cms controller for noRoute action. I'm trying to make my 404 page send me an email when it happens.
I have followed this tutorial and did everything exactly as written but nothing happens.
I googled some more and found this which also doesen't work for me.
My Magento version is 1.5.0.0-rc1.
Could anyone give me any link to some tutorial or example code? Thank you very much!

I've did some try/error research and managed to create my module. After a lot of search I found that Magento uses custom No-route controller for 404 pages (this page is GOLD: http://alanstorm.com/magentos_many_404_pages). This can be set as following:
Under "System -> Configuration -> Web -> Default Pages" I've changed the setting for Default No-route URL which now points to my custom made controller.
I've basically copied contents from the existing CMS IndexController and added my own logic (sending email and showing search form). That's it, it works form me.
Thanks to everyone.

mXperts skuroute extension - get it and edit the controller.
http://www.magentocommerce.com/magento-connect/mxperts/extension/1749/mxperts-skuroute

Related

how to make sub folder for login page and rest of the pages in codeigniter

I am working in a codeigniter project in wamp server.
My current login page is http://localhost/flowers/login and its working correctly (no issue). The rest of the urls are like this
http://localhost/handycheck/admin/dashboard etc
My issue is i need to change the login url like this
http://localhost/flowers/admin/login
&
http://localhost/flowers/providers/login
Its because I have to maintain login form for multiple users.
How can i make this.
Please help me and thanks in advance who helps me alot..
You can do this by adding custom roue in codeigniter routing configuration as follows go to config/routes and add the following entry in this file
$route['flowers/providers/login'] = 'flowers/login';
$route['flowers/admin/login'] = 'flowers/login';
this will redirect the request to the login in flowers controller and if you need to do custom handling for admins and provider you can get the url segments and do custom handling according to user type
I hope my answer would be useful

What's the best approach to have a custom 404 page with October CMS with Laravel 5

I'm working on a project based on the October CMS, with Laravel 5.0.35.
I'm trying to override the 404 page.
The current 404 page is located here:
modules\cms\views\404.php
... and is served by:
modules\cms\classes\Controller.php
As you can see, both the controller and the view are inside modules. This folder is a dependency folder and its content should not be altered. The best approach I see here is to use an override.
You can see the October CMS structure here:
https://github.com/octobercms/october
Do you have any ideas or suggestions on how to achieve this?
Thanks.
'If the theme contains a page with the URL /404 it is displayed when the system can't find a requested page.'
http://octobercms.com/docs/cms/pages#404-page
Essentially just create a page withe the URL /404 and it will use this by default. The same can be done for an error (500) page, just use /error.

call index action of I ndex controller from default file

I am developing website in Magento. I am able to load localhost/index.php/hello.
But Now i want that when i load localhost/index.php it should automatically load localhost/index.php/hello.
I tried to search but haven't found any answers related to this.
Any Help would be appreciated.
Thanks In Advance.
you can set it from backend if you want to set home page for your custom action
just go to
System -> Configuration -> Under general tab At Web
Click on Web and go to default pages tab
change FAQ instead of your custom one.
hope this will sure help you.

How can I add custom fields in cms edit page (Admin Panel)?

I am facing an issue in Magento. I want to add some custom fields to Magento Admin Panel CMS Edit Page. I got a page while searching where it describes adding a custom field in CMS page: http://blog.flexishore.com/2011/08/add-custom-field-to-cms-page/ .
I have followed every step in this, but I am still getting an error Call to undefined function getLoad().
Can anyone here explain me how to add custom fields in CMS page?
You can try this article (http://www.atwix.com/magento/adding-custom-attribute-to-a-cms-page/) as well, it's more simple, maybe it will be helpful for you.
Also don't forget about cache, I recommend you disable it when you are testing your own modules.

Set up a cms page for Magento

I've been trying to set up a CMS page in magento to be the home page, and it's just killing me - how hard should this be? no matter what I set up, I get a 404.
Can somebody tell me basic steps to set up a CMS page as the home page for a Magento install, living at:
http://www.mymagentoinstall.com/
I can't have the url key for the CMS page be empty, but setting the default page in the System->Config->Default Pages->CMS Home Page (which seems like it should work), still gives me a 404.
thx for any help
Hours of head banging later .... I’ve changed the parameter “Use Web Server Rewrites” on System -> Configuration -> Web from Yes to No. And it worked! My provider set this by default, so had to change it. Only downside is that I now get the /index.php extension added.
Did you check to make sure that the page was enabled and visible in your store view?
Ok - figured it out. In the System->Config->Web, the Default Web URL needs to be 'cms' (no quotes) - I guess that tells Magento to use the cms page instead of a default url.
In csm - pages create some html in the page, eg start simple with My Homepage.
Give it a name and take care the url is "home" (without the quotes.
Now go to system - configuration - web and select your homepage (name) from the dropdown where in lets you choose the homepage.
That should do it.
Your CMS Page Identifier should be home
I was running into the same issue. No matter what I did, the home page came back as a 404. I had it working on a test server (with a different database) and compared the options side by side. Absolutely nothing worked, the home page, named 'home' and the 'cms' was properly set, mod_rewrite working, htaccess file just peachy...but domain.com/ wouldn't work. after a few hours I saw that domain.com/home/ did, though I swear it hadn't been.
Finally I wiped the blood off the keyboard where I'd been smashing my head against it and went into url rewrite management and set id path to '/', request path to '/' and target path to '/home/' and it works like it should have all along. Hope this helps someone else!

Resources