I'd like to create a new module with just AjaxController. Do I need anyway to have a layout ?
I mean here is my file and code :


class NameSpace_Cart_AjaxController extends Mage_Core_Controller_Front_Action
    public function quickbuyAction()
        return json_encode(array('ok' => true));


<?xml version="1.0"?>

When i tried to call my url localhost/cart/ajax/quickbuy, its returned me a 404.
Do I miss something ?

And yes I declared my xml in the app/etc/modules folder.

Thanks for your help.


Solution :

<?xml version="1.0"?> <config> <modules> <NameSpace_Cartevent> <version>0.1.0</version> </NameSpace_Cartevent> </modules> <frontend> <routers> <NameSpace_cartevent> <use>standard</use> <args> <module>NameSpace_Cartevent</module> <frontName>cartevent</frontName> </args> </NameSpace_cartevent> </routers> </frontend> </config>

My mistake : When i tried the first time, i put the <frontend> tag in the <global> tag but it has to be outside the <global> tag.

Thx for you links @Arunendra.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.