Skip to content

Commit

Permalink
Merge branch 'main' into feat/customisation/adding-alt-text-to-images-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ksted authored Oct 24, 2024
2 parents 4d1b1c1 + 2f3b1cb commit f4b3d56
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
12 changes: 7 additions & 5 deletions apps/web/components/ui/ProductCard/ProductCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -144,17 +144,19 @@ const getHeight = () => {
return '';
};
const addWithLoader = async (productId: number) => {
const addWithLoader = async (productId: number, quickCheckout = true) => {
loading.value = true;
try {
await addToCart({
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;
}
Expand Down
7 changes: 5 additions & 2 deletions apps/web/components/ui/PurchaseCard/PurchaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f4b3d56

Please sign in to comment.