Skip to content

Commit

Permalink
3369 (#264)
Browse files Browse the repository at this point in the history
* 3369

* Commerce docs

* Commerce docs
  • Loading branch information
glo82145 authored Sep 30, 2024
1 parent bc587e9 commit f162984
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/data/auto-generated/magento-compatibility.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

| PWA Studio version | Magento core version|
| :---: | :---: |
| 14.1.0 | 2.4.7-p2 |
| 14.0.1 | 2.4.7-beta3 |
| 14.0.0 | 2.4.7-beta3 |
| 13.3.0 | 2.4.7-beta2 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ This talon performs the following effects:
- Manage the updating state of the cart while a coupon is being applied or removed

**Returns:**

**Parameters**

| Name | Type | Description |
Expand All @@ -164,6 +165,7 @@ This talon performs the following effects:
- Manage the updating state of the cart while the mutation for setting the shipping address is in flight

**Returns:**

**Parameters**

| Name | Type | Description |
Expand All @@ -188,16 +190,18 @@ This talon performs the following effects:
- Set the shipping form visibility value based on the shipping methods associated with the cart

**Returns:**

**Parameters**

| Name | Type | Description |
| --- | --- | --- |
| props | `Object` | |
| props.queries | [`ShippingMethodsQueries`](#ShippingMethodsQueries) | GraphQL queries for shipping methods |

**Example** *(Importing into your project)*
**Example** *(Importing into your project)*

```js

import { useShippingMethods } from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/ShippingMethods/useShippingMethods';
```

Expand All @@ -210,6 +214,7 @@ This talon performs the following effects:
- Manage the updating state of the cart while a shipping method is being applied

**Returns:**

**Parameters**

| Name | Type | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ This talon performs the following effects:
- Log a GraphQL error if it occurs when getting the price summary

**Returns:**

**Parameters**

| Name | Type | Description |
Expand All @@ -56,6 +57,7 @@ This talon performs the following effects:
**Example** *(Importing into your project)*

```js

import { usePriceSummary } from '@magento/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary';
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,18 @@ This talon performs the following effects:
- Log any GraphQL errors to the console

**Returns:**

**Parameters**

| Name | Type | Description |
| --- | --- | --- |
| props | `Object` | |
| props.queries | [`ProductListingQueries`](#ProductListingQueries) | GraphQL queries for getting product listing data. |

**Example** *(Importing into your project)*
**Example** *(Importing into your project)*

```js

import { useProductListing } from '@magento/peregrine/lib/talons/CartPage/ProductListing/useProductListing';
```

Expand All @@ -137,6 +139,7 @@ This talon performs the following effects:
- Manage the updating state of the cart while a product is being updated or removed

**Returns:**

**Parameters**

| Name | Type | Description |
Expand All @@ -147,19 +150,22 @@ This talon performs the following effects:
| props.setActiveEditItem | `function` | Function for setting the actively editing item |
| props.setIsCartUpdating | `function` | Function for setting the updating state of the cart |

**Example** *(Importing into your project)*
**Example** *(Importing into your project)*

```js

import { useProduct } from '@magento/peregrine/lib/talons/CartPage/ProductListing/useProduct';
```

This talon contains logic for a product edit modal used on a cart page.
It returns prop data for rendering an interactive modal component.

**Returns:**
**Example** *(Importing into your project)*

**Example** *(Importing into your project)*

```js

import { useEditModal } from '@magento/peregrine/lib/talons/CartPage/ProductListing/EditModal/useEditModal';
```

Expand All @@ -172,6 +178,7 @@ This talon performs the following effects:
- Set the variant price on a product depending on the product's options

**Returns:**

**Parameters**

| Name | Type | Description |
Expand All @@ -185,9 +192,10 @@ This talon performs the following effects:
| props.updateQuantityMutation | `GraphQLDocument` | GraphQL mutation for updating the quantity of a product in a cart. |
| props.setActiveEditItem | `function` | Function for setting the actively editing item. |

**Example** *(Importing into your project)*
**Example** *(Importing into your project)*

```js

import { useProductForm } from '@magento/peregrine/lib/talons/CartPage/ProductListing/EditModal/useProductForm';
```

Expand Down

0 comments on commit f162984

Please sign in to comment.