Skip to content

Commit

Permalink
fix: move ftd settings query to checkoutSettings file, add basic sent…
Browse files Browse the repository at this point in the history
…ry log for missing data
  • Loading branch information
mcstover committed Nov 6, 2023
1 parent 92c3877 commit 646915b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
12 changes: 12 additions & 0 deletions src/graphql/query/checkout/checkoutSettings.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ query checkoutSettings($basketId: String) {
value
key
}
ftd_message_enable: uiConfigSetting(key: "ftd_message_enable") {
key
value
}
ftd_message_amount: uiConfigSetting(key: "ftd_message_amount") {
key
value
}
ftd_message_valid_date: uiConfigSetting(key: "ftd_message_valid_date") {
key
value
}
}
shop (basketId: $basketId) {
id
Expand Down
12 changes: 0 additions & 12 deletions src/graphql/query/checkout/initializeCheckout.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ query initializeCheckout($basketId: String) {
value
description
}
ftd_message_enable: uiConfigSetting(key: "ftd_message_enable") {
key
value
}
ftd_message_amount: uiConfigSetting(key: "ftd_message_amount") {
key
value
}
ftd_message_valid_date: uiConfigSetting(key: "ftd_message_valid_date") {
key
value
}
}
shop (basketId: $basketId) {
id
Expand Down
8 changes: 8 additions & 0 deletions src/pages/Checkout/CheckoutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,14 @@ export default {
const validationErrors = _get(shopMutationData, 'validatePreCheckout', []);
this.showCheckoutError(validationErrors, true);
// Fire error for empty shop state
if (!this.isServer && !this.totals) {
Sentry.withScope(scope => {
scope.setTag('init_checkout', 'Missing baseline basket information');
Sentry.captureMessage(`Missing baseline basket information; totals value is ${this.totals}.`);
});
}
// TODO: Implement check against contentful setting
// to signify if holiday mode is enabled
Expand Down

0 comments on commit 646915b

Please sign in to comment.