Paypal Controller Overriding/Extending not workingPayPal Preconditions and EncryptionAccount Controller Overriding/Extending not workingExtending an abstract block classOverride Adminhtml importexport dataflow Profile ControllerHow to override the controller AccountControllerCreate Simple Controller Not Working In My Module in Magento 1.9.2?Magento controller override not working in other systemsrewrite block not workingM1 CE, paypal exception “PayPal NVP gateway errors”Magento problem in extension

Why weren't Gemini capsules given names?

How come a desk dictionary be abridged?

How did Captain Marvel do this without dying?

Why do Martians have to wear space helmets?

Do intermediate subdomains need to exist?

Does the Milky Way orbit around anything?

How can select a specific triangle in my Delaunay mesh?

How do I check that users don't write down their passwords?

SQL Server - TRY/CATCH does not work in certain cases

Is kapton suitable for use as high voltage insulation?

Is の方 necessary here?

Is it bad to suddenly introduce another element to your fantasy world a good ways into the story?

Should I warn my boss I might take sick leave?

I'm feeling like my character doesn't fit the campaign

Can you take the Dodge action while prone?

Is there a way to change the aspect ratio of a DNG file?

Are "confidant" and "confident" homophones?

Do Goblin tokens count as Goblins?

Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?

soda water first stored in refrigerator and then outside

What is the difference between an "empty interior" and a "hole" in topology?

Is this standard Japanese employment negotiations, or am I missing something?

Should I increase my 401(k) contributions, or increase my mortgage payments

Stay in US on J-1 visa after quitting job?



Paypal Controller Overriding/Extending not working


PayPal Preconditions and EncryptionAccount Controller Overriding/Extending not workingExtending an abstract block classOverride Adminhtml importexport dataflow Profile ControllerHow to override the controller AccountControllerCreate Simple Controller Not Working In My Module in Magento 1.9.2?Magento controller override not working in other systemsrewrite block not workingM1 CE, paypal exception “PayPal NVP gateway errors”Magento problem in extension






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have Magento 1.9 CE and I'm trying to create a new module for extend the class Mage_Paypal_Controller_Express_Abstract, but it doesn't work.

Here's the code:



Name_Module.xml in /app/etc/modules



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<active>true</active>
<codePool>local</codePool>
<depends></depends>
</Name_Module>
</modules>
</config>


config.xml from /app/code/local/Name/Module/etc/



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<version>1.0.0</version>
</Name_Module>
</modules>
<frontend>
<routers>
<paypal>
<args>
<modules>
<Name_Module before="Mage_Paypal">Name_Module _Paypal</Name_Module >
</modules>
</args>
</paypal>
</routers>
</frontend>




and Abstract.php app/code/local/Name//Controller/Paypal/Express/



<?php
include_once('Mage/Paypal/Controller/Express/Abstract.php');
class Name_Module_Paypal_Express_Abstract extends Mage_Paypal_Controller_Express_Abstract

/**
* Submit the order
*/
public function placeOrderAction()

//code




Why doesn't it work?










share|improve this question
























  • "it doesn't work". What doesn't work? What should it do and doesn't do? Please describe any faults, errors (add error logs), screenshots, etc...

    – 7ochem
    Sep 15 '15 at 11:09











  • use <depends>Mage_Paypal</depends> instead of <depends></depends>

    – Amit Bera
    Sep 15 '15 at 11:32

















1















I have Magento 1.9 CE and I'm trying to create a new module for extend the class Mage_Paypal_Controller_Express_Abstract, but it doesn't work.

Here's the code:



Name_Module.xml in /app/etc/modules



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<active>true</active>
<codePool>local</codePool>
<depends></depends>
</Name_Module>
</modules>
</config>


config.xml from /app/code/local/Name/Module/etc/



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<version>1.0.0</version>
</Name_Module>
</modules>
<frontend>
<routers>
<paypal>
<args>
<modules>
<Name_Module before="Mage_Paypal">Name_Module _Paypal</Name_Module >
</modules>
</args>
</paypal>
</routers>
</frontend>




and Abstract.php app/code/local/Name//Controller/Paypal/Express/



<?php
include_once('Mage/Paypal/Controller/Express/Abstract.php');
class Name_Module_Paypal_Express_Abstract extends Mage_Paypal_Controller_Express_Abstract

/**
* Submit the order
*/
public function placeOrderAction()

//code




Why doesn't it work?










share|improve this question
























  • "it doesn't work". What doesn't work? What should it do and doesn't do? Please describe any faults, errors (add error logs), screenshots, etc...

    – 7ochem
    Sep 15 '15 at 11:09











  • use <depends>Mage_Paypal</depends> instead of <depends></depends>

    – Amit Bera
    Sep 15 '15 at 11:32













1












1








1








I have Magento 1.9 CE and I'm trying to create a new module for extend the class Mage_Paypal_Controller_Express_Abstract, but it doesn't work.

Here's the code:



Name_Module.xml in /app/etc/modules



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<active>true</active>
<codePool>local</codePool>
<depends></depends>
</Name_Module>
</modules>
</config>


config.xml from /app/code/local/Name/Module/etc/



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<version>1.0.0</version>
</Name_Module>
</modules>
<frontend>
<routers>
<paypal>
<args>
<modules>
<Name_Module before="Mage_Paypal">Name_Module _Paypal</Name_Module >
</modules>
</args>
</paypal>
</routers>
</frontend>




and Abstract.php app/code/local/Name//Controller/Paypal/Express/



<?php
include_once('Mage/Paypal/Controller/Express/Abstract.php');
class Name_Module_Paypal_Express_Abstract extends Mage_Paypal_Controller_Express_Abstract

/**
* Submit the order
*/
public function placeOrderAction()

//code




Why doesn't it work?










share|improve this question
















I have Magento 1.9 CE and I'm trying to create a new module for extend the class Mage_Paypal_Controller_Express_Abstract, but it doesn't work.

Here's the code:



Name_Module.xml in /app/etc/modules



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<active>true</active>
<codePool>local</codePool>
<depends></depends>
</Name_Module>
</modules>
</config>


config.xml from /app/code/local/Name/Module/etc/



<?xml version="1.0"?>
<config>
<modules>
<Name_Module>
<version>1.0.0</version>
</Name_Module>
</modules>
<frontend>
<routers>
<paypal>
<args>
<modules>
<Name_Module before="Mage_Paypal">Name_Module _Paypal</Name_Module >
</modules>
</args>
</paypal>
</routers>
</frontend>




and Abstract.php app/code/local/Name//Controller/Paypal/Express/



<?php
include_once('Mage/Paypal/Controller/Express/Abstract.php');
class Name_Module_Paypal_Express_Abstract extends Mage_Paypal_Controller_Express_Abstract

/**
* Submit the order
*/
public function placeOrderAction()

//code




Why doesn't it work?







magento-1.9 paypal-express core






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 15 '15 at 11:08









7ochem

5,9499 gold badges37 silver badges70 bronze badges




5,9499 gold badges37 silver badges70 bronze badges










asked Sep 15 '15 at 11:04









OblomovaOblomova

61 bronze badge




61 bronze badge












  • "it doesn't work". What doesn't work? What should it do and doesn't do? Please describe any faults, errors (add error logs), screenshots, etc...

    – 7ochem
    Sep 15 '15 at 11:09











  • use <depends>Mage_Paypal</depends> instead of <depends></depends>

    – Amit Bera
    Sep 15 '15 at 11:32

















  • "it doesn't work". What doesn't work? What should it do and doesn't do? Please describe any faults, errors (add error logs), screenshots, etc...

    – 7ochem
    Sep 15 '15 at 11:09











  • use <depends>Mage_Paypal</depends> instead of <depends></depends>

    – Amit Bera
    Sep 15 '15 at 11:32
















"it doesn't work". What doesn't work? What should it do and doesn't do? Please describe any faults, errors (add error logs), screenshots, etc...

– 7ochem
Sep 15 '15 at 11:09





"it doesn't work". What doesn't work? What should it do and doesn't do? Please describe any faults, errors (add error logs), screenshots, etc...

– 7ochem
Sep 15 '15 at 11:09













use <depends>Mage_Paypal</depends> instead of <depends></depends>

– Amit Bera
Sep 15 '15 at 11:32





use <depends>Mage_Paypal</depends> instead of <depends></depends>

– Amit Bera
Sep 15 '15 at 11:32










3 Answers
3






active

oldest

votes


















1














You can't overwrite an Abstract class in Magento. The class that you are trying to overwrite Mage_Paypal_Controller_Express_Abstract is an abstract class and hence can't rewrite by controller-rewrite way.



If you want to edit placeOrderAction(), the only possible way is put that core file in local codepool. For this :



  1. Create a file appcodelocalMagePaypalControllerExpressAbstract.php

  2. Copy paste original content of the file Abstarct.php to this file.

  3. Now edit placeOrderAction() according to your need.





share|improve this answer






























    0














    In Magenton abstract class does not override ....SO you can not rewrite class



    Mage_Paypal_Controller_Express_Abstract.... 


    Also there lot issue in code;



    use <depends>Mage_Paypal</depends> instead of <depends></depends>






    share|improve this answer

























    • unfortunately nothing changes

      – Oblomova
      Sep 15 '15 at 13:12


















    0














    Mage_Paypal_Controller_Express_Abstract is a basic class which implements common methods, you dont need to rewrite it.



    Instead you need to define which payment method you want to modify excalty. In your case I suppose it is a Mage_Paypal_ExpressController.



    So, all you need to rewrite Mage_Paypal_ExpressController class and implement own logic for method placeOrderAction().



    It will work because Mage_Paypal_ExpressController extends Mage_Paypal_Controller_Express_Abstract and all methods you define in Mage_Paypal_ExpressController will replace methods from parent class.






    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f83171%2fpaypal-controller-overriding-extending-not-working%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      You can't overwrite an Abstract class in Magento. The class that you are trying to overwrite Mage_Paypal_Controller_Express_Abstract is an abstract class and hence can't rewrite by controller-rewrite way.



      If you want to edit placeOrderAction(), the only possible way is put that core file in local codepool. For this :



      1. Create a file appcodelocalMagePaypalControllerExpressAbstract.php

      2. Copy paste original content of the file Abstarct.php to this file.

      3. Now edit placeOrderAction() according to your need.





      share|improve this answer



























        1














        You can't overwrite an Abstract class in Magento. The class that you are trying to overwrite Mage_Paypal_Controller_Express_Abstract is an abstract class and hence can't rewrite by controller-rewrite way.



        If you want to edit placeOrderAction(), the only possible way is put that core file in local codepool. For this :



        1. Create a file appcodelocalMagePaypalControllerExpressAbstract.php

        2. Copy paste original content of the file Abstarct.php to this file.

        3. Now edit placeOrderAction() according to your need.





        share|improve this answer

























          1












          1








          1







          You can't overwrite an Abstract class in Magento. The class that you are trying to overwrite Mage_Paypal_Controller_Express_Abstract is an abstract class and hence can't rewrite by controller-rewrite way.



          If you want to edit placeOrderAction(), the only possible way is put that core file in local codepool. For this :



          1. Create a file appcodelocalMagePaypalControllerExpressAbstract.php

          2. Copy paste original content of the file Abstarct.php to this file.

          3. Now edit placeOrderAction() according to your need.





          share|improve this answer













          You can't overwrite an Abstract class in Magento. The class that you are trying to overwrite Mage_Paypal_Controller_Express_Abstract is an abstract class and hence can't rewrite by controller-rewrite way.



          If you want to edit placeOrderAction(), the only possible way is put that core file in local codepool. For this :



          1. Create a file appcodelocalMagePaypalControllerExpressAbstract.php

          2. Copy paste original content of the file Abstarct.php to this file.

          3. Now edit placeOrderAction() according to your need.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 17 '15 at 8:08









          Rajeev K TomyRajeev K Tomy

          14.7k5 gold badges45 silver badges91 bronze badges




          14.7k5 gold badges45 silver badges91 bronze badges























              0














              In Magenton abstract class does not override ....SO you can not rewrite class



              Mage_Paypal_Controller_Express_Abstract.... 


              Also there lot issue in code;



              use <depends>Mage_Paypal</depends> instead of <depends></depends>






              share|improve this answer

























              • unfortunately nothing changes

                – Oblomova
                Sep 15 '15 at 13:12















              0














              In Magenton abstract class does not override ....SO you can not rewrite class



              Mage_Paypal_Controller_Express_Abstract.... 


              Also there lot issue in code;



              use <depends>Mage_Paypal</depends> instead of <depends></depends>






              share|improve this answer

























              • unfortunately nothing changes

                – Oblomova
                Sep 15 '15 at 13:12













              0












              0








              0







              In Magenton abstract class does not override ....SO you can not rewrite class



              Mage_Paypal_Controller_Express_Abstract.... 


              Also there lot issue in code;



              use <depends>Mage_Paypal</depends> instead of <depends></depends>






              share|improve this answer















              In Magenton abstract class does not override ....SO you can not rewrite class



              Mage_Paypal_Controller_Express_Abstract.... 


              Also there lot issue in code;



              use <depends>Mage_Paypal</depends> instead of <depends></depends>







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Sep 15 '15 at 12:50









              Renon Stewart

              12.2k1 gold badge20 silver badges44 bronze badges




              12.2k1 gold badge20 silver badges44 bronze badges










              answered Sep 15 '15 at 11:36









              Amit BeraAmit Bera

              61.7k16 gold badges84 silver badges183 bronze badges




              61.7k16 gold badges84 silver badges183 bronze badges












              • unfortunately nothing changes

                – Oblomova
                Sep 15 '15 at 13:12

















              • unfortunately nothing changes

                – Oblomova
                Sep 15 '15 at 13:12
















              unfortunately nothing changes

              – Oblomova
              Sep 15 '15 at 13:12





              unfortunately nothing changes

              – Oblomova
              Sep 15 '15 at 13:12











              0














              Mage_Paypal_Controller_Express_Abstract is a basic class which implements common methods, you dont need to rewrite it.



              Instead you need to define which payment method you want to modify excalty. In your case I suppose it is a Mage_Paypal_ExpressController.



              So, all you need to rewrite Mage_Paypal_ExpressController class and implement own logic for method placeOrderAction().



              It will work because Mage_Paypal_ExpressController extends Mage_Paypal_Controller_Express_Abstract and all methods you define in Mage_Paypal_ExpressController will replace methods from parent class.






              share|improve this answer



























                0














                Mage_Paypal_Controller_Express_Abstract is a basic class which implements common methods, you dont need to rewrite it.



                Instead you need to define which payment method you want to modify excalty. In your case I suppose it is a Mage_Paypal_ExpressController.



                So, all you need to rewrite Mage_Paypal_ExpressController class and implement own logic for method placeOrderAction().



                It will work because Mage_Paypal_ExpressController extends Mage_Paypal_Controller_Express_Abstract and all methods you define in Mage_Paypal_ExpressController will replace methods from parent class.






                share|improve this answer

























                  0












                  0








                  0







                  Mage_Paypal_Controller_Express_Abstract is a basic class which implements common methods, you dont need to rewrite it.



                  Instead you need to define which payment method you want to modify excalty. In your case I suppose it is a Mage_Paypal_ExpressController.



                  So, all you need to rewrite Mage_Paypal_ExpressController class and implement own logic for method placeOrderAction().



                  It will work because Mage_Paypal_ExpressController extends Mage_Paypal_Controller_Express_Abstract and all methods you define in Mage_Paypal_ExpressController will replace methods from parent class.






                  share|improve this answer













                  Mage_Paypal_Controller_Express_Abstract is a basic class which implements common methods, you dont need to rewrite it.



                  Instead you need to define which payment method you want to modify excalty. In your case I suppose it is a Mage_Paypal_ExpressController.



                  So, all you need to rewrite Mage_Paypal_ExpressController class and implement own logic for method placeOrderAction().



                  It will work because Mage_Paypal_ExpressController extends Mage_Paypal_Controller_Express_Abstract and all methods you define in Mage_Paypal_ExpressController will replace methods from parent class.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 16 '18 at 10:33









                  Sergey RepinSergey Repin

                  2111 silver badge2 bronze badges




                  2111 silver badge2 bronze badges



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f83171%2fpaypal-controller-overriding-extending-not-working%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                      Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                      Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?