Skip to content

Commit

Permalink
Merge branch 'develop' into PWA-3166
Browse files Browse the repository at this point in the history
  • Loading branch information
glo82145 authored Sep 27, 2023
2 parents 142abc4 + 649a853 commit 78624b0
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export const CartTriggerFragment = gql`
fragment CartTriggerFragment on Cart {
id
total_quantity
total_summary_quantity_including_config
}
`;
2 changes: 1 addition & 1 deletion packages/peregrine/lib/talons/Header/useCartTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const useCartTrigger = props => {
errorPolicy: 'all'
});

const itemCount = data?.cart?.total_quantity || 0;
const itemCount = data?.cart?.total_summary_quantity_including_config || 0;

const handleTriggerClick = useCallback(() => {
// Open the mini cart.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export const ADD_PRODUCT_TO_CART = gql`
...CartTriggerFragment
...MiniCartFragment
}
user_errors {
code
message
}
}
}
${CartTriggerFragment}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ export const useProductFullDetail = props => {

const [
addProductToCart,
{ error: errorAddingProductToCart, loading: isAddProductLoading }
{
data: addToCartResponseData,
error: errorAddingProductToCart,
loading: isAddProductLoading
}
] = useMutation(operations.addProductToCartMutation);

const breadcrumbCategoryId = useMemo(
Expand Down Expand Up @@ -556,12 +560,14 @@ export const useProductFullDetail = props => {
deriveErrorMessage([
errorAddingSimpleProduct,
errorAddingConfigurableProduct,
errorAddingProductToCart
errorAddingProductToCart,
...(addToCartResponseData?.addProductsToCart?.user_errors || [])
]),
[
errorAddingConfigurableProduct,
errorAddingProductToCart,
errorAddingSimpleProduct
errorAddingSimpleProduct,
addToCartResponseData
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const ProductForm = props => {
}}
errors={Array.from(errors.values())}
scrollOnError={false}
allowErrorMessages={true}
/>
<ProductDetail
item={cartItem}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Array [
<div>
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 100 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -34,14 +34,11 @@ Array [
/>
</svg>
</span>
<span>
99+
</span>
</button>
</div>,
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 100 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -70,9 +67,6 @@ Array [
/>
</svg>
</span>
<span>
99+
</span>
</button>,
<require('../MiniCart')
isOpen={false}
Expand All @@ -86,7 +80,7 @@ Array [
<div>
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 10 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -115,14 +109,11 @@ Array [
/>
</svg>
</span>
<span>
10
</span>
</button>
</div>,
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 10 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -151,9 +142,6 @@ Array [
/>
</svg>
</span>
<span>
10
</span>
</button>,
<require('../MiniCart')
isOpen={false}
Expand Down
2 changes: 1 addition & 1 deletion pwa-devdocs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source 'https://rubygems.org'

gem 'jekyll-redirect-from'

gem 'devdocs', :git => 'https://github.com/magento-devdocs/devdocs-theme.git'
gem 'devdocs', :git => 'https://github.com/commerce-docs/devdocs-theme.git'
6 changes: 3 additions & 3 deletions pwa-devdocs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GIT
remote: https://github.com/magento-devdocs/devdocs-theme.git
revision: b1e43366e1fa7c7cd33a2213c6a9304f57536e8f
remote: https://github.com/commerce-docs/devdocs-theme.git
revision: 13017b4c092d088e35eb854b0b0046573d809830
specs:
devdocs (16)
devdocs (20)
jekyll (>= 4.0)

GEM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ After you have met these prerequisites, you are ready to begin creating your cus

[use these instructions]: <{% link venia-pwa-concept/setup/index.md %}>

[download and install the pagebuilderquote module]: https://github.com/magento-devdocs/pagebuilder-examples/tree/master/Example/PageBuilderQuote
[download and install the pagebuilderquote module]: https://github.com/commerce-docs/pagebuilder-examples/tree/master/Quote/Custom

[github pagebuilder-examples repo]: https://github.com/magento-devdocs/pagebuilder-examples/tree/master/Example/PageBuilderQuote
[github pagebuilder-examples repo]: https://github.com/commerce-docs/pagebuilder-examples/tree/master/Quote/Custom
2 changes: 1 addition & 1 deletion pwa-devdocs/src/technologies/theme-vs-storefront/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The following table is a summary of general skills needed for PWA storefront dev
[jQuery]: https://jquery.com/
[Less]: http://lesscss.org/
[CSS]: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-overview.html
[Magento UI library]: https://magento-devdocs.github.io/magento2-ui-library/
[Magento UI library]: https://commerce-docs.github.io/magento2-ui-library/
[Magento layouts]: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html
[Magento templates]: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/templates/template-overview.html
[Magento UI components]: https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@ Now, when you start your storefront application and navigate to a product page,

## Live example

You can see this extension running live in this [CodeSandbox instance][] or you can check out the source repository in the [`taglist-extension-tutorial`][] branch in the **magento-devdocs/pwa-studio-code-sandbox** GitHub project.
You can see this extension running live in this [CodeSandbox instance][] or you can check out the source repository in the [`taglist-extension-tutorial`][] branch in the **commerce-docs/pwa-studio-code-sandbox** GitHub project.

```html
<iframe src="https://codesandbox.io/embed/github/magento-devdocs/pwa-studio-code-sandbox/tree/taglist-extension-tutorial/?fontsize=12&hidenavigation=1&module=%2Fextensions%2FtagList%2Fpackage.json&moduleview=1&theme=dark"
<iframe src="https://codesandbox.io/embed/github/commerce-docs/pwa-studio-code-sandbox/tree/taglist-extension-tutorial/?fontsize=12&hidenavigation=1&module=%2Fextensions%2FtagList%2Fpackage.json&moduleview=1&theme=dark"
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
title="dev-sandbox"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
Expand All @@ -472,5 +472,5 @@ You can see this extension running live in this [CodeSandbox instance][] or you
[targets and targetables]: <{%link pwa-buildpack/extensibility-framework/index.md %}>

[productdetailsfragment]: https://github.com/magento/pwa-studio/blob/develop/packages/peregrine/lib/talons/RootComponents/Product/productDetailFragment.gql.js
[`taglist-extension-tutorial`]: https://github.com/magento-devdocs/pwa-studio-code-sandbox/tree/taglist-extension-tutorial
[codesandbox instance]: https://codesandbox.io/s/github/magento-devdocs/pwa-studio-code-sandbox/tree/taglist-extension-tutorial/
[`taglist-extension-tutorial`]: https://github.com/commerce-docs/pwa-studio-code-sandbox/tree/taglist-extension-tutorial
[codesandbox instance]: https://codesandbox.io/s/github/commerce-docs/pwa-studio-code-sandbox/tree/taglist-extension-tutorial/

0 comments on commit 78624b0

Please sign in to comment.