Magento override controller

后端 未结 5 863
你的背包
你的背包 2021-01-05 12:13

I would like to do the above. Ive overridden many files in the past...block, model, helper....but this one eludes me.

Can anyone see what im doing wrong here: (ive e

5条回答
  •  鱼传尺愫
    2021-01-05 12:17

    Well...it WONT override the checkout cart controller.

    So i used the URL REWRITE in the PRODUCT VIEW...from this link...near the bottom of the article. They say its a proper method...

    http://www.excellencemagentoblog.com/magento-add-product-to-cart-ajax

    if(!url){
          url = jQuery('#product_addtocart_form').attr('action');
    }
    url = url.replace("checkout/cart","idgeneral/cart");
    

    That worked for me. Allows me to get cracking. Basically calls MY controller..instead of checkout controller.

    Thanks for the help ROSCIUS...appreciated.

    I also had to change my config....my routers section now looks like this:

    
            
            
                standard
                
                    Idigital_Idgeneral
                    idgeneral
                
            
    
            
            
                standard
                
                    
                        Idigital_Idgeneral_Checkout
                    
                
            
        
    

提交回复
热议问题