How to get coupon code in controller_action_postdispatch_checkout_cart_couponPost eventIs there an event for apply coupon action in cartCoupon code always returns errorCreate coupon for special productcoupon code error message for guest customersCoupon Code is not working when overwrite the discount calculationHow to remove coupon programmatically in salesrule_validator_process eventMagento2: Apply coupon code to regular price not to special priceWorking of discount coupons on the checkout page in Magento 2.2.2Magento 2: Applying Coupon to non sale items onlyApply discount on specific product using coupon Magento2

What do you call a Matrix-like slowdown and camera movement effect?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

How can I make my BBEG immortal short of making them a Lich or Vampire?

What does CI-V stand for?

Why do I get two different answers for this counting problem?

Service Entrance Breakers Rain Shield

Is it legal for company to use my work email to pretend I still work there?

Has the BBC provided arguments for saying Brexit being cancelled is unlikely?

Problem of parity - Can we draw a closed path made up of 20 line segments...

How old can references or sources in a thesis be?

Is it important to consider tone, melody, and musical form while writing a song?

Did Shadowfax go to Valinor?

Why was the small council so happy for Tyrion to become the Master of Coin?

If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?

How much RAM could one put in a typical 80386 setup?

the place where lots of roads meet

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Risk of getting Chronic Wasting Disease (CWD) in the United States?

Which models of the Boeing 737 are still in production?

How does strength of boric acid solution increase in presence of salicylic acid?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Email Account under attack (really) - anything I can do?

How does one intimidate enemies without having the capacity for violence?

Why don't electron-positron collisions release infinite energy?



How to get coupon code in controller_action_postdispatch_checkout_cart_couponPost event


Is there an event for apply coupon action in cartCoupon code always returns errorCreate coupon for special productcoupon code error message for guest customersCoupon Code is not working when overwrite the discount calculationHow to remove coupon programmatically in salesrule_validator_process eventMagento2: Apply coupon code to regular price not to special priceWorking of discount coupons on the checkout page in Magento 2.2.2Magento 2: Applying Coupon to non sale items onlyApply discount on specific product using coupon Magento2






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








0















I want to do some customisation to cart on submit coupon code from cart, for this I added controller_action_postdispatch_checkout_cart_couponPost event and there I want to get coupon code and check its validation, if it is not valid then I want to apply some custom discount to cart.



But How to get coupon code here and check validity of it in event controller_action_postdispatch_checkout_cart_couponPost ?










share|improve this question














bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.





















    0















    I want to do some customisation to cart on submit coupon code from cart, for this I added controller_action_postdispatch_checkout_cart_couponPost event and there I want to get coupon code and check its validation, if it is not valid then I want to apply some custom discount to cart.



    But How to get coupon code here and check validity of it in event controller_action_postdispatch_checkout_cart_couponPost ?










    share|improve this question














    bumped to the homepage by Community yesterday


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      0












      0








      0








      I want to do some customisation to cart on submit coupon code from cart, for this I added controller_action_postdispatch_checkout_cart_couponPost event and there I want to get coupon code and check its validation, if it is not valid then I want to apply some custom discount to cart.



      But How to get coupon code here and check validity of it in event controller_action_postdispatch_checkout_cart_couponPost ?










      share|improve this question














      I want to do some customisation to cart on submit coupon code from cart, for this I added controller_action_postdispatch_checkout_cart_couponPost event and there I want to get coupon code and check its validation, if it is not valid then I want to apply some custom discount to cart.



      But How to get coupon code here and check validity of it in event controller_action_postdispatch_checkout_cart_couponPost ?







      magento-1.9 coupon






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 14 '17 at 13:19









      Vinaya MaheshwariVinaya Maheshwari

      1,18711847




      1,18711847





      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Mage::app()->getRequest()->getParam('coupon_code');


          Take a look at Mage_Checkout_CartController::couponPostAction at how Magento natively deals with the coupon codes.






          share|improve this answer























          • Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

            – Vinaya Maheshwari
            Jan 16 '17 at 4:30











          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%2f154738%2fhow-to-get-coupon-code-in-controller-action-postdispatch-checkout-cart-couponpos%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









          0














          Mage::app()->getRequest()->getParam('coupon_code');


          Take a look at Mage_Checkout_CartController::couponPostAction at how Magento natively deals with the coupon codes.






          share|improve this answer























          • Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

            – Vinaya Maheshwari
            Jan 16 '17 at 4:30















          0














          Mage::app()->getRequest()->getParam('coupon_code');


          Take a look at Mage_Checkout_CartController::couponPostAction at how Magento natively deals with the coupon codes.






          share|improve this answer























          • Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

            – Vinaya Maheshwari
            Jan 16 '17 at 4:30













          0












          0








          0







          Mage::app()->getRequest()->getParam('coupon_code');


          Take a look at Mage_Checkout_CartController::couponPostAction at how Magento natively deals with the coupon codes.






          share|improve this answer













          Mage::app()->getRequest()->getParam('coupon_code');


          Take a look at Mage_Checkout_CartController::couponPostAction at how Magento natively deals with the coupon codes.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 15 '17 at 2:55









          nikola99nikola99

          48825




          48825












          • Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

            – Vinaya Maheshwari
            Jan 16 '17 at 4:30

















          • Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

            – Vinaya Maheshwari
            Jan 16 '17 at 4:30
















          Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

          – Vinaya Maheshwari
          Jan 16 '17 at 4:30





          Hello @nikola99, Mage::app()->getRequest()->getParam('coupon_code') working for getting coupon_code but how to check its validity?

          – Vinaya Maheshwari
          Jan 16 '17 at 4:30

















          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%2f154738%2fhow-to-get-coupon-code-in-controller-action-postdispatch-checkout-cart-couponpos%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?