diff --git a/apps/web/components/ui/ProductCard/ProductCard.vue b/apps/web/components/ui/ProductCard/ProductCard.vue index 1c7a981e8..5c310e720 100644 --- a/apps/web/components/ui/ProductCard/ProductCard.vue +++ b/apps/web/components/ui/ProductCard/ProductCard.vue @@ -123,8 +123,8 @@ const { const { data: categoryTree } = useCategoryTree(); const { openQuickCheckout } = useQuickCheckout(); const { addToCart } = useCart(); -const { send } = useNotification(); const { price, crossedPrice } = useProductPrice(product); +const { send } = useNotification(); const loading = ref(false); const runtimeConfig = useRuntimeConfig(); const showNetPrices = runtimeConfig.public.showNetPrices; @@ -144,7 +144,7 @@ const getHeight = () => { return ''; }; -const addWithLoader = async (productId: number) => { +const addWithLoader = async (productId: number, quickCheckout = true) => { loading.value = true; try { @@ -152,9 +152,11 @@ const addWithLoader = async (productId: number) => { productId: productId, quantity: 1, }); - - openQuickCheckout(product, 1); - send({ message: t('addedToCart'), type: 'positive' }); + if (quickCheckout) { + openQuickCheckout(product, 1); + } else { + send({ message: t('addedToCart'), type: 'positive' }); + } } finally { loading.value = false; } diff --git a/apps/web/components/ui/PurchaseCard/PurchaseCard.vue b/apps/web/components/ui/PurchaseCard/PurchaseCard.vue index c36f7f553..d01abaaf3 100644 --- a/apps/web/components/ui/PurchaseCard/PurchaseCard.vue +++ b/apps/web/components/ui/PurchaseCard/PurchaseCard.vue @@ -197,8 +197,11 @@ const handleAddToCart = async (quickCheckout = true) => { const added = await addToCart(params); if (added) { - if (quickCheckout) openQuickCheckout(product, quantitySelectorValue.value); - send({ message: t('addedToCart'), type: 'positive' }); + if (quickCheckout) { + openQuickCheckout(product, quantitySelectorValue.value); + } else { + send({ message: t('addedToCart'), type: 'positive' }); + } } return added; }; diff --git a/apps/web/lang/de.json b/apps/web/lang/de.json index 8a72b31c9..5bd2af5e5 100644 --- a/apps/web/lang/de.json +++ b/apps/web/lang/de.json @@ -897,7 +897,7 @@ "applyFailed": "Der Coupon konnte nicht eingelöst werden." }, "login": { - "failed": "Zugangsdaten ungültig", + "loginFailed": "Zugangsdaten ungültig", "userIsBlocked": "Nutzer ist gesperrt" }, "newsletter": { diff --git a/apps/web/lang/en.json b/apps/web/lang/en.json index 51c81c38e..44cf305de 100644 --- a/apps/web/lang/en.json +++ b/apps/web/lang/en.json @@ -897,7 +897,7 @@ "applyFailed": "The coupon could not be redeemed." }, "login": { - "failed": "Invalid login data", + "loginFailed": "Invalid login data", "userIsBlocked": "User is blocked" }, "newsletter": { diff --git a/docs/changelog/changelog_en.md b/docs/changelog/changelog_en.md index 291acb899..b5d3cd599 100644 --- a/docs/changelog/changelog_en.md +++ b/docs/changelog/changelog_en.md @@ -15,6 +15,7 @@ ### 🩹 Fixed +- Removed the "Add to Cart" notification from the item and category pages when the quick checkout modal is not present. - Fixed an accessibility issue where the font size was too small. - Fixed an issue where product path was not reactive when category was changed. - Automatically generate a language file for every active language, not just the default language.