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

fix(composables): add shipping costs #1580

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

fix(composables): add shipping costs #1580

wants to merge 6 commits into from

Conversation

mdanilowicz
Copy link
Collaborator

@mdanilowicz mdanilowicz commented Jan 13, 2025

Description

This pull request fixes display shipping costs in the cart and checkout components. The changes include adding a shippingCosts property to the useCart composable, updating the cart and checkout components to display this information, and adding corresponding tests and translations.

Screenshot 2025-01-14 at 10 19 01

Feature Implementation:

Component Updates:

Translations:

closes #1576

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontends-demo 🔄 Building (Inspect) Visit Preview Jan 14, 2025 5:54pm
shopware-frontends-docs ✅ Ready (Inspect) Visit Preview Jan 14, 2025 5:54pm

Copy link

pkg-pr-new bot commented Jan 13, 2025

Open in Stackblitz

@shopware/api-client

npm i https://pkg.pr.new/shopware/frontends/@shopware/api-client@1580

@shopware-pwa/cms-base

npm i https://pkg.pr.new/shopware/frontends/@shopware-pwa/cms-base@1580

@shopware-pwa/helpers-next

npm i https://pkg.pr.new/shopware/frontends/@shopware-pwa/helpers-next@1580

@shopware/api-gen

npm i https://pkg.pr.new/shopware/frontends/@shopware/api-gen@1580

@shopware-pwa/nuxt3-module

npm i https://pkg.pr.new/shopware/frontends/@shopware-pwa/nuxt3-module@1580

@shopware-pwa/composables-next

npm i https://pkg.pr.new/shopware/frontends/@shopware-pwa/composables-next@1580

commit: c099052

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

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

just one thing to clarify deprecation

@@ -66,8 +66,14 @@ export type UseCartReturn = {
totalPrice: ComputedRef<number>;
/**
* Shipping price
*
* @deprecated Use `shippingTotal` instead
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like this is in the wrong line? You say to use the thing which becomes deprecated ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ups :D fixed

"@shopware-pwa/composables-next": patch
---

Added `shippingCosts` property in `useCart` composable that returns shipping costs of the cart, with the shipping discounts
Copy link
Collaborator

Choose a reason for hiding this comment

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

no info about the deprecation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@patzick patzick enabled auto-merge (squash) January 14, 2025 18:00
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.

[BUG] No shipping promotion displayed on the cart summary
2 participants