payment information depends on shipping information magento The Next CEO of Stack OverflowMagento1 specific shipping display specific payment optionCheckout broken after update to Magento 1.9.0.1how to Remove payment method, shipping information and shipping methodIssue with Payment Informationhow to update customer and order details from magento to ERP using event observer?Remove Shipping Information and Shipping method?Change custom field position in checkout pageshipping and handling informationToggle shipping method based on customer's conditionMagento1: Hide zero shipping price in checkout shipping method stepMagento 1.9 combining Billing & shipping information into one and shipping method & payment information into one

Can a single photon have an energy density?

Text adventure game code

How to start emacs in "nothing" mode (`fundamental-mode`)

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

How to write papers efficiently when English isn't my first language?

Does the Brexit deal have to be agreed by both Houses?

How to count occurrences of text in a file?

If I blow insulation everywhere in my attic except the door trap, will heat escape through it?

Is it safe to use c_str() on a temporary string?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

How easy is it to start Magic from scratch?

Rotate a column

How to write the block matrix in LaTex?

Why doesn't a table tennis ball float on the surface? How do we calculate buoyancy here?

Increase performance creating Mandelbrot set in python

Natural language into sentence logic

Why do professional authors make "consistency" mistakes? And how to avoid them?

Robert Sheckley short story about vacation spots being overwhelmed

What can we do to stop prior company from asking us questions?

% symbol leads to superlong (forever?) compilations

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

How to use tikz in fbox?

Apart from "berlinern", do any other German dialects have a corresponding verb?

What does this shorthand mean?



payment information depends on shipping information magento



The Next CEO of Stack OverflowMagento1 specific shipping display specific payment optionCheckout broken after update to Magento 1.9.0.1how to Remove payment method, shipping information and shipping methodIssue with Payment Informationhow to update customer and order details from magento to ERP using event observer?Remove Shipping Information and Shipping method?Change custom field position in checkout pageshipping and handling informationToggle shipping method based on customer's conditionMagento1: Hide zero shipping price in checkout shipping method stepMagento 1.9 combining Billing & shipping information into one and shipping method & payment information into one










1















Payment information depends on shipping method



In Shipping Method when selected Standard Shipping 2-7 days then hide Cash On Delivery and vise versa



when shipping method is fixed then hide check money order if check stranded shipping then hide cash on delivery



i already add this code in appdesignfrontendbasedefaulttemplatecheckoutonepagepaymentmethod.phtm



getMethods(); $oneMethod = count($methods)
__('No Payment Methods') ?>
getCode(); if($_POST['shipping_method'] == 'flatrate_flatrate') if($_code == 'checkmo') continue; ?>



enter image description hereenter image description here










share|improve this question




























    1















    Payment information depends on shipping method



    In Shipping Method when selected Standard Shipping 2-7 days then hide Cash On Delivery and vise versa



    when shipping method is fixed then hide check money order if check stranded shipping then hide cash on delivery



    i already add this code in appdesignfrontendbasedefaulttemplatecheckoutonepagepaymentmethod.phtm



    getMethods(); $oneMethod = count($methods)
    __('No Payment Methods') ?>
    getCode(); if($_POST['shipping_method'] == 'flatrate_flatrate') if($_code == 'checkmo') continue; ?>



    enter image description hereenter image description here










    share|improve this question


























      1












      1








      1








      Payment information depends on shipping method



      In Shipping Method when selected Standard Shipping 2-7 days then hide Cash On Delivery and vise versa



      when shipping method is fixed then hide check money order if check stranded shipping then hide cash on delivery



      i already add this code in appdesignfrontendbasedefaulttemplatecheckoutonepagepaymentmethod.phtm



      getMethods(); $oneMethod = count($methods)
      __('No Payment Methods') ?>
      getCode(); if($_POST['shipping_method'] == 'flatrate_flatrate') if($_code == 'checkmo') continue; ?>



      enter image description hereenter image description here










      share|improve this question
















      Payment information depends on shipping method



      In Shipping Method when selected Standard Shipping 2-7 days then hide Cash On Delivery and vise versa



      when shipping method is fixed then hide check money order if check stranded shipping then hide cash on delivery



      i already add this code in appdesignfrontendbasedefaulttemplatecheckoutonepagepaymentmethod.phtm



      getMethods(); $oneMethod = count($methods)
      __('No Payment Methods') ?>
      getCode(); if($_POST['shipping_method'] == 'flatrate_flatrate') if($_code == 'checkmo') continue; ?>



      enter image description hereenter image description here







      magento-1.9






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 hour ago









      Shoaib Munir

      2,2991829




      2,2991829










      asked Aug 17 '17 at 7:18









      Danish AliDanish Ali

      112




      112




















          1 Answer
          1






          active

          oldest

          votes


















          1














          credits : Elavarasan for link



          In the link, they used different shipping and payment methods. you need to change the codes according to your requirements.



          shipping_method => flatrate_flatrate
          paymet_method => checkmo


          As for I got, you trying to hide some payment methods based on shipping method. For this you don't need to observe things at all. Simply you can do this, just follow me,



          Every methods(in one page check out) post the methods which are chosen to the next level. so you can get the shipping method which are chosen, in payment method level. Just print the post things in



          app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml


          in this add below one,



          <?php print_r($_POST); ?>


          So now you can get the shipping methods which are chosen previous step. And note it, so now, you can add just simple logic (if else) condition in same file for hiding payment,



          For example here I want hide check / money order payment method, if shipping method is flat. Here the payment method code is checkmo. you can get payment method code by simply printing that variable like echo $_code = $_method->getCode(); in same file. so here just add simple if else ,



           <?php
          $methods = $this->getMethods();


          $oneMethod = count($methods) <= 1;
          ?>
          <?php if (empty($methods)): ?>
          <dt>
          <?php echo $this->__('No Payment Methods') ?>
          </dt>
          <?php else:
          foreach ($methods as $_method):
          echo $_code = $_method->getCode();


          if($_POST['shipping_method'] == 'flatrate_flatrate')
          if($_code == 'checkmo')
          continue;


          ?>


          Here,



           if($_POST['shipping_method'] == 'flatrate_flatrate') 
          if($_code == 'checkmo')
          continue;




          checks the shipping method and skip the payment method which we don't want to display. That's it. Please comment here if you have any doubt.



          Note:



           shipping_method => flatrate_flatrate
          paymet_method => checkmo





          share|improve this answer























          • Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

            – Danish Ali
            Sep 26 '17 at 8:01











          • Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

            – Danish Ali
            Sep 26 '17 at 8:08











          • @DanishAli yes, you need to use the respective shipping & payment method codes and try......

            – Baby in Magento
            Sep 26 '17 at 9:06











          • Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

            – Danish Ali
            Oct 13 '17 at 10:49












          • @DanishAli please update the question with updated code & images......

            – Baby in Magento
            Oct 13 '17 at 10:58











          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%2f189433%2fpayment-information-depends-on-shipping-information-magento%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          credits : Elavarasan for link



          In the link, they used different shipping and payment methods. you need to change the codes according to your requirements.



          shipping_method => flatrate_flatrate
          paymet_method => checkmo


          As for I got, you trying to hide some payment methods based on shipping method. For this you don't need to observe things at all. Simply you can do this, just follow me,



          Every methods(in one page check out) post the methods which are chosen to the next level. so you can get the shipping method which are chosen, in payment method level. Just print the post things in



          app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml


          in this add below one,



          <?php print_r($_POST); ?>


          So now you can get the shipping methods which are chosen previous step. And note it, so now, you can add just simple logic (if else) condition in same file for hiding payment,



          For example here I want hide check / money order payment method, if shipping method is flat. Here the payment method code is checkmo. you can get payment method code by simply printing that variable like echo $_code = $_method->getCode(); in same file. so here just add simple if else ,



           <?php
          $methods = $this->getMethods();


          $oneMethod = count($methods) <= 1;
          ?>
          <?php if (empty($methods)): ?>
          <dt>
          <?php echo $this->__('No Payment Methods') ?>
          </dt>
          <?php else:
          foreach ($methods as $_method):
          echo $_code = $_method->getCode();


          if($_POST['shipping_method'] == 'flatrate_flatrate')
          if($_code == 'checkmo')
          continue;


          ?>


          Here,



           if($_POST['shipping_method'] == 'flatrate_flatrate') 
          if($_code == 'checkmo')
          continue;




          checks the shipping method and skip the payment method which we don't want to display. That's it. Please comment here if you have any doubt.



          Note:



           shipping_method => flatrate_flatrate
          paymet_method => checkmo





          share|improve this answer























          • Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

            – Danish Ali
            Sep 26 '17 at 8:01











          • Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

            – Danish Ali
            Sep 26 '17 at 8:08











          • @DanishAli yes, you need to use the respective shipping & payment method codes and try......

            – Baby in Magento
            Sep 26 '17 at 9:06











          • Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

            – Danish Ali
            Oct 13 '17 at 10:49












          • @DanishAli please update the question with updated code & images......

            – Baby in Magento
            Oct 13 '17 at 10:58















          1














          credits : Elavarasan for link



          In the link, they used different shipping and payment methods. you need to change the codes according to your requirements.



          shipping_method => flatrate_flatrate
          paymet_method => checkmo


          As for I got, you trying to hide some payment methods based on shipping method. For this you don't need to observe things at all. Simply you can do this, just follow me,



          Every methods(in one page check out) post the methods which are chosen to the next level. so you can get the shipping method which are chosen, in payment method level. Just print the post things in



          app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml


          in this add below one,



          <?php print_r($_POST); ?>


          So now you can get the shipping methods which are chosen previous step. And note it, so now, you can add just simple logic (if else) condition in same file for hiding payment,



          For example here I want hide check / money order payment method, if shipping method is flat. Here the payment method code is checkmo. you can get payment method code by simply printing that variable like echo $_code = $_method->getCode(); in same file. so here just add simple if else ,



           <?php
          $methods = $this->getMethods();


          $oneMethod = count($methods) <= 1;
          ?>
          <?php if (empty($methods)): ?>
          <dt>
          <?php echo $this->__('No Payment Methods') ?>
          </dt>
          <?php else:
          foreach ($methods as $_method):
          echo $_code = $_method->getCode();


          if($_POST['shipping_method'] == 'flatrate_flatrate')
          if($_code == 'checkmo')
          continue;


          ?>


          Here,



           if($_POST['shipping_method'] == 'flatrate_flatrate') 
          if($_code == 'checkmo')
          continue;




          checks the shipping method and skip the payment method which we don't want to display. That's it. Please comment here if you have any doubt.



          Note:



           shipping_method => flatrate_flatrate
          paymet_method => checkmo





          share|improve this answer























          • Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

            – Danish Ali
            Sep 26 '17 at 8:01











          • Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

            – Danish Ali
            Sep 26 '17 at 8:08











          • @DanishAli yes, you need to use the respective shipping & payment method codes and try......

            – Baby in Magento
            Sep 26 '17 at 9:06











          • Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

            – Danish Ali
            Oct 13 '17 at 10:49












          • @DanishAli please update the question with updated code & images......

            – Baby in Magento
            Oct 13 '17 at 10:58













          1












          1








          1







          credits : Elavarasan for link



          In the link, they used different shipping and payment methods. you need to change the codes according to your requirements.



          shipping_method => flatrate_flatrate
          paymet_method => checkmo


          As for I got, you trying to hide some payment methods based on shipping method. For this you don't need to observe things at all. Simply you can do this, just follow me,



          Every methods(in one page check out) post the methods which are chosen to the next level. so you can get the shipping method which are chosen, in payment method level. Just print the post things in



          app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml


          in this add below one,



          <?php print_r($_POST); ?>


          So now you can get the shipping methods which are chosen previous step. And note it, so now, you can add just simple logic (if else) condition in same file for hiding payment,



          For example here I want hide check / money order payment method, if shipping method is flat. Here the payment method code is checkmo. you can get payment method code by simply printing that variable like echo $_code = $_method->getCode(); in same file. so here just add simple if else ,



           <?php
          $methods = $this->getMethods();


          $oneMethod = count($methods) <= 1;
          ?>
          <?php if (empty($methods)): ?>
          <dt>
          <?php echo $this->__('No Payment Methods') ?>
          </dt>
          <?php else:
          foreach ($methods as $_method):
          echo $_code = $_method->getCode();


          if($_POST['shipping_method'] == 'flatrate_flatrate')
          if($_code == 'checkmo')
          continue;


          ?>


          Here,



           if($_POST['shipping_method'] == 'flatrate_flatrate') 
          if($_code == 'checkmo')
          continue;




          checks the shipping method and skip the payment method which we don't want to display. That's it. Please comment here if you have any doubt.



          Note:



           shipping_method => flatrate_flatrate
          paymet_method => checkmo





          share|improve this answer













          credits : Elavarasan for link



          In the link, they used different shipping and payment methods. you need to change the codes according to your requirements.



          shipping_method => flatrate_flatrate
          paymet_method => checkmo


          As for I got, you trying to hide some payment methods based on shipping method. For this you don't need to observe things at all. Simply you can do this, just follow me,



          Every methods(in one page check out) post the methods which are chosen to the next level. so you can get the shipping method which are chosen, in payment method level. Just print the post things in



          app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml


          in this add below one,



          <?php print_r($_POST); ?>


          So now you can get the shipping methods which are chosen previous step. And note it, so now, you can add just simple logic (if else) condition in same file for hiding payment,



          For example here I want hide check / money order payment method, if shipping method is flat. Here the payment method code is checkmo. you can get payment method code by simply printing that variable like echo $_code = $_method->getCode(); in same file. so here just add simple if else ,



           <?php
          $methods = $this->getMethods();


          $oneMethod = count($methods) <= 1;
          ?>
          <?php if (empty($methods)): ?>
          <dt>
          <?php echo $this->__('No Payment Methods') ?>
          </dt>
          <?php else:
          foreach ($methods as $_method):
          echo $_code = $_method->getCode();


          if($_POST['shipping_method'] == 'flatrate_flatrate')
          if($_code == 'checkmo')
          continue;


          ?>


          Here,



           if($_POST['shipping_method'] == 'flatrate_flatrate') 
          if($_code == 'checkmo')
          continue;




          checks the shipping method and skip the payment method which we don't want to display. That's it. Please comment here if you have any doubt.



          Note:



           shipping_method => flatrate_flatrate
          paymet_method => checkmo






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 17 '17 at 7:25









          Baby in MagentoBaby in Magento

          8791354169




          8791354169












          • Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

            – Danish Ali
            Sep 26 '17 at 8:01











          • Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

            – Danish Ali
            Sep 26 '17 at 8:08











          • @DanishAli yes, you need to use the respective shipping & payment method codes and try......

            – Baby in Magento
            Sep 26 '17 at 9:06











          • Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

            – Danish Ali
            Oct 13 '17 at 10:49












          • @DanishAli please update the question with updated code & images......

            – Baby in Magento
            Oct 13 '17 at 10:58

















          • Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

            – Danish Ali
            Sep 26 '17 at 8:01











          • Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

            – Danish Ali
            Sep 26 '17 at 8:08











          • @DanishAli yes, you need to use the respective shipping & payment method codes and try......

            – Baby in Magento
            Sep 26 '17 at 9:06











          • Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

            – Danish Ali
            Oct 13 '17 at 10:49












          • @DanishAli please update the question with updated code & images......

            – Baby in Magento
            Oct 13 '17 at 10:58
















          Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

          – Danish Ali
          Sep 26 '17 at 8:01





          Bro i apply as it but its not working when i check flat in payment method Check / Money order is still display

          – Danish Ali
          Sep 26 '17 at 8:01













          Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

          – Danish Ali
          Sep 26 '17 at 8:08





          Bro is it possible when i select stranded shipping 2-3 days in shipping method then only Bank transfer display in payment method other payment method off

          – Danish Ali
          Sep 26 '17 at 8:08













          @DanishAli yes, you need to use the respective shipping & payment method codes and try......

          – Baby in Magento
          Sep 26 '17 at 9:06





          @DanishAli yes, you need to use the respective shipping & payment method codes and try......

          – Baby in Magento
          Sep 26 '17 at 9:06













          Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

          – Danish Ali
          Oct 13 '17 at 10:49






          Hello Sir (@Baby in Magento) i have applied as suggested by you but its not working sir kindly check 3 images still 1 month+ i am unable to solve it [1]: i.stack.imgur.com/HlI3F.png [2]: i.stack.imgur.com/EE4In.png [3]: i.stack.imgur.com/0r7mZ.png

          – Danish Ali
          Oct 13 '17 at 10:49














          @DanishAli please update the question with updated code & images......

          – Baby in Magento
          Oct 13 '17 at 10:58





          @DanishAli please update the question with updated code & images......

          – Baby in Magento
          Oct 13 '17 at 10:58

















          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%2f189433%2fpayment-information-depends-on-shipping-information-magento%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

          Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

          How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2

          Nissan Patrol Зміст Перше покоління — 4W60 (1951-1960) | Друге покоління — 60 series (1960-1980) | Третє покоління (1980–2002) | Четверте покоління — Y60 (1987–1998) | П'яте покоління — Y61 (1997–2013) | Шосте покоління — Y62 (2010- ) | Посилання | Зноски | Навігаційне менюОфіційний український сайтТест-драйв Nissan Patrol 2010 7-го поколінняNissan PatrolКак мы тестировали Nissan Patrol 2016рвиправивши або дописавши її