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

          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