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

                      Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

                      Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form