Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCST-2092: add create configuration command #14

Merged
merged 32 commits into from
Nov 25, 2024
Merged

VCST-2092: add create configuration command #14

merged 32 commits into from
Nov 25, 2024

Conversation

ksavosteev
Copy link
Collaborator

@ksavosteev ksavosteev commented Oct 29, 2024

Description

Load configuration

query {
  productConfiguration (
    configurableProductId: "d733871c-f763-44b2-99c9-5f55edf28c16"
    storeId:"Electronics"
    cultureName: "en-US"
    currencyCode: "USD"
  ) {
    configurationSections {
      id
      type
      name
      description
      isRequired
	options {
        quantity
        extendedPrice {
          amount
        }
        product {
          id
          name
          properties {
            name
            value
          }
        }
      }
    }
  }
}

Create configuration

mutation createConfiguredLineItem($command: InputCreateConfiguredLineItemCommand!) {
  createConfiguredLineItem(command: $command)
  {
       currency {
        code
      }
      listPrice{
        amount
      }
      salePrice {
        amount
      }
      discountAmount {
        amount
      }
      extendedPrice {
        amount
      }
  }
}
{
  "command": {
    "storeId": "Electronics",
    "currencyCode": "USD",
    "cultureName": "en-US",
    "configurableProductId": "d733871c-f763-44b2-99c9-5f55edf28c16",
    "configurationSections": [
      {
        "sectionId": "Beverages",
        "value": {
          "productId": "e7eee66223da43109502891b54bc33d3",
          "quantity": 2
        }
      },
      {
        "sectionId": "Baloons",
        "value": {
          "productId": "0f7a77cc1b9a46a29f6a159e5cd49ad1",
          "quantity": 2
        }
      },
      {
        "sectionId": "Chips and Snacks",
        "value": {
          "productId": "77bffc3b23ba4b48a56baa56bd5d769c",
          "quantity": 2
        }
      }
    ]
  }
}

Add item mutation and Cart Type modifications

mutation addItem($command: InputAddItemType!) {
  addItem(command: $command)
  {
      items {
        configurationItems {
          id
          name        
        }
        listPrice {
          amount
        }
        salePrice {
          amount
        }
	discounts {
          amount
        }
      }
  }
}
{
  "command": {
    "userId": "c9abcb13-775c-41d1-ade6-655c99ef6f53",
    "productId": "d733871c-f763-44b2-99c9-5f55edf28c16",
    "quantity": 1,
    "storeId": "Electronics",
    "currencyCode": "USD",
    "cultureName": "en-US",
    "configurationSections": [
      {
        "sectionId": "Beverages",
        "value": {
          "productId": "e7eee66223da43109502891b54bc33d3",
          "quantity": 1
        }
      },
      {
        "sectionId": "Baloons",
        "value": {
          "productId": "0f7a77cc1b9a46a29f6a159e5cd49ad1",
          "quantity": 1
        }
      },
      {
        "sectionId": "Chips and Snacks",
        "value": {
          "productId": "77bffc3b23ba4b48a56baa56bd5d769c",
          "quantity": 1
        }
      }
    ]
  }
}

References

QA-test:

Jira-link:

https://virtocommerce.atlassian.net/browse/VCST-2092

Artifact URL:

https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.XCart_3.816.0-pr-14-c3f7.zip

@CLAassistant
Copy link

CLAassistant commented Nov 1, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.889
Timestamp: 25-11-2024T12:00:46

@ksavosteev ksavosteev merged commit a43f67b into dev Nov 25, 2024
5 checks passed
@ksavosteev ksavosteev deleted the feat/VCST-2092 branch November 25, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants