Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

[Checkout coverage] Added discount information to shopping cart #717

Merged
merged 6 commits into from
Jun 19, 2019

Conversation

rogyar
Copy link
Contributor

@rogyar rogyar commented May 19, 2019

Description (*)

This PR adds additional information about discount to the shopping cart details. The information contains discount amount and a label of the applied rule(s).

Fixed Issues (if relevant)

  1. Add discount information to Cart #683 : Add discount information to cart

Manual testing scenarios (*)

  1. Create a shopping cart price rule
  2. Add product to the shopping cart and use cart response for getting he information
mutation {
  addSimpleProductsToCart(input: {
    cart_id:"X9KeOSMZuU10yww2S1A4DXfEwFpg0Q9X"
    cart_items: [
      {
        data: {
          quantity:1
          sku:"simle"
        }
      }
    ]
  })
  {
    cart {
      prices {
        discount {
          amount {
            value
            currency
          }
          label
        }
      }
    }
  }
}

or use cart query for an existing cart with a product and discount:

{
  cart (cart_id:"X9KeOSMZuU10yww2S1A4DXfEwFpg0Q9X") {
    prices {
      discount {
        label
        amount {
          value
          currency
        }
      }
    }
  }
}

lenaorobei
lenaorobei previously approved these changes May 29, 2019
@magento-engcom-team
Copy link
Contributor

Hi @lenaorobei, thank you for the review.
ENGCOM-5181 has been created to process this Pull Request

@lenaorobei lenaorobei requested review from naydav and lenaorobei May 29, 2019 14:50
@lenaorobei
Copy link
Contributor

lenaorobei commented Jun 4, 2019

@rogyar as per latest GraphQL sync upplease consider changing label representation from comma-separated values to the array of values. Thank you.

@lenaorobei lenaorobei dismissed their stale review June 4, 2019 14:49

Requirements changed

@magento-engcom-team
Copy link
Contributor

Hi @naydav, thank you for the review.
ENGCOM-5181 has been created to process this Pull Request

- extracted discount cases to separate test class;
- added case for no discount applied;
- return `null` for discount node if amount is 0.
@magento-engcom-team
Copy link
Contributor

Hi @naydav, thank you for the review.
ENGCOM-5181 has been created to process this Pull Request

@ghost
Copy link

ghost commented Jun 19, 2019

Hi @rogyar, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@lenaorobei lenaorobei deleted the 683-add-discount-information-cart branch September 10, 2019 19:29
magento-engcom-team pushed a commit that referenced this pull request Dec 5, 2019
- Reverted BIC actiongroup change
- Changed actionGroup to extend existing
- Moved test materials from incorrect modules back into correct module
- added cleanup steps
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants