Magento 2: How to get discount price for each cart rule in quoteHow to get total discount amount of Coupon...

Existence of Riemann surface, holomorphic maps

Hilchos Shabbos English Sefer

What makes papers publishable in top-tier journals?

Citing paywalled articles accessed via illegal web sharing

local storage : Uncaught TypeError: Cannot set property 'innerHTML' of null

What would you call a real market that is close to perfect competition?

Python Pandas - difference between 'loc' and 'where'?

Eww, those bytes are gross

Does diversity provide anything that meritocracy does not?

What is the difference between "...", '...', $'...', and $"..." quotes?

Why zero tolerance on nudity in space?

How to visualize the Riemann-Roch theorem from complex analysis or geometric topology considerations?

How do you catch Smeargle in Pokemon Go?

How do you funnel food off a cutting board?

Bash script to truncate subject line of incoming email

Building an exterior wall within an exterior wall for insulation

Has any human ever had the choice to leave Earth permanently?

Salsa20 Implementation: Sum of 2 Words with Carries Suppressed

Can you tell from a blurry photo if focus was too close or too far?

Play Zip, Zap, Zop

Is this ordinary workplace experiences for a job in Software Engineering?

What is the difference between rolling more dice versus fewer dice?

Why did Democrats in the Senate oppose the Born-Alive Abortion Survivors Protection Act (2019 S.130)?

Why was Lupin comfortable with saying Voldemort's name?



Magento 2: How to get discount price for each cart rule in quote


How to get total discount amount of Coupon Code for all items in the cartShopping cart price rule applied at Grand total (or subtotal after discount)Product with special price should not applied for a discount in shopping cart using promotion ruleHow to retrieve individual discount split up (shopping cart price) on Cart pageHow to give discount from Shipping price in magento?Issue in Fixed Amount Discount Shopping cart Price ruleMagento 2 : Cart Price RuleUsing Custom Attribute in Shopping Cart Price RuleQuote discounts by applied rulesHow to check programatically if a discount (cart price rule) was already applied to the cart?













2















I need to get all discounted price from each cart rule which is applied on current quote. I am getting applied rule ids from $quote->getAppliedRuleIds() and I am getting total discounted amount but I am not sure how can I get discount price of each rule if multiple rules applied to quote.



For example, in quote 3 cart rules applied and each cart rule has different discount(10+20+30) at the code level I am getting total discount amount 60 which is correct but I need (10+20+30) as separate.



Is there any way to get this?










share|improve this question





























    2















    I need to get all discounted price from each cart rule which is applied on current quote. I am getting applied rule ids from $quote->getAppliedRuleIds() and I am getting total discounted amount but I am not sure how can I get discount price of each rule if multiple rules applied to quote.



    For example, in quote 3 cart rules applied and each cart rule has different discount(10+20+30) at the code level I am getting total discount amount 60 which is correct but I need (10+20+30) as separate.



    Is there any way to get this?










    share|improve this question



























      2












      2








      2








      I need to get all discounted price from each cart rule which is applied on current quote. I am getting applied rule ids from $quote->getAppliedRuleIds() and I am getting total discounted amount but I am not sure how can I get discount price of each rule if multiple rules applied to quote.



      For example, in quote 3 cart rules applied and each cart rule has different discount(10+20+30) at the code level I am getting total discount amount 60 which is correct but I need (10+20+30) as separate.



      Is there any way to get this?










      share|improve this question
















      I need to get all discounted price from each cart rule which is applied on current quote. I am getting applied rule ids from $quote->getAppliedRuleIds() and I am getting total discounted amount but I am not sure how can I get discount price of each rule if multiple rules applied to quote.



      For example, in quote 3 cart rules applied and each cart rule has different discount(10+20+30) at the code level I am getting total discount amount 60 which is correct but I need (10+20+30) as separate.



      Is there any way to get this?







      magento2 shopping-cart-price-rules quote discount






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 21 mins ago







      Max

















      asked 22 hours ago









      MaxMax

      499




      499






















          0






          active

          oldest

          votes











          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%2f263445%2fmagento-2-how-to-get-discount-price-for-each-cart-rule-in-quote%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f263445%2fmagento-2-how-to-get-discount-price-for-each-cart-rule-in-quote%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

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...