2

Hi i am trying to override magento wishlist IndexController. I have followed all steps but its not working here is my code and files path

app\code\local\XS4Arabia\Wishlist\etc\config.xml

    <?xml version="1.0" encoding="UTF-8"?>
<config>  
    <modules>      
        <XS4Arabia_Wishlist>          
            <version>0.1.0</version>      
        </XS4Arabia_Wishlist>  
    </modules>    
    <frontend>      
        <routers>          
            <wishlist>
                <args>
                  <modules>
                    <XS4Arabia_Wishlist before="Mage_Wishlist">XS4Arabia_Wishlist</XS4Arabia_Wishlist>
                  </modules>
                </args>
          </wishlist>      
        </routers>  
    </frontend>
</config>

app\code\local\XS4Arabia\Wishlist\controllers\IndexController.php

    require_once Mage::getModuleDir('controllers', 'Mage_Wishlist') . DS . 'IndexController.php';
    class XS4Arabia_Wishlist_IndexController extends Mage_Wishlist_IndexController
    {
      public function sendAction()
       {
        die('local');
       }
    }

app\etc\modules\XS4arabia_Wishlist.xml

    <?xml version="1.0"?>
<config>
  <modules>
    <XS4Arabia_Wishlist>
      <active>true</active>
      <codePool>local</codePool>
    </XS4Arabia_Wishlist>
  </modules>
</config>
  • I have tried your code on my local and it is working absolutely fine. Try flushing cache and check again. If it still doesn't work check if there is any other extension which already has re-written wishlist controller. – Anshu Mishra Sep 24 '16 at 9:20
  • Its not working i just installed fresh magento without any extension – OBAID Sep 24 '16 at 9:47
  • Try after adding depends tag in activation file. – Anshu Mishra Sep 24 '16 at 11:30
  • can you please share your files its still not working i want to see how you did.. – OBAID Sep 24 '16 at 13:18
  • I didn't do any thing extra, copied your code and flush the cache, and it works for me. – Anshu Mishra Sep 26 '16 at 3:44
1

Pretty small change

Just replace the file name XS4arabia_Wishlist.xml to XS4Arabia_Wishlist.xml

As per the conversation in comments, the working code is added below.

<config>
  <modules>
    <XS4Arabia_Wishlist>
      <active>true</active>
      <codePool>local</codePool>
    </XS4Arabia_Wishlist>
  </modules>
</config>
  • still not working.. – OBAID Sep 24 '16 at 8:21
  • Change module name "Wishlist" to unique string, for example "CustomWishlist". – Krishna ijjada Sep 24 '16 at 8:26
  • Some times i am facing issues with core modules naming convention. – Krishna ijjada Sep 24 '16 at 8:26
  • still not working bro i recently override checkout controller with same setting don't know why this one is not working – OBAID Sep 24 '16 at 8:36
  • You can try the updated answer, it is working for me. the missing part is unnecessary spaces in XS4Arabia_Wishlist.xml. – Krishna ijjada Sep 26 '16 at 6:11

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.