Skip to content

Commit

Permalink
fix: show error page only if order number param is error
Browse files Browse the repository at this point in the history
  • Loading branch information
amihajlovski committed Nov 9, 2023
1 parent a0b99d1 commit b3ad31e
Show file tree
Hide file tree
Showing 5 changed files with 24,712 additions and 112 deletions.
6 changes: 5 additions & 1 deletion overrides/app/pages/checkout/confirmation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ const CheckoutConfirmation = () => {
})
}, [order])

if (!order || !order.orderNo) {
if (orderNo === 'error') {
return <AdyenCheckoutError />
}

if (!order || !order.orderNo) {
return null
}

const CardIcon = getCreditCardIcon(order.paymentInstruments[0].paymentCard?.cardType)

const submitForm = async (data) => {
Expand Down
42 changes: 42 additions & 0 deletions overrides/app/static/translations/compiled/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,24 @@
"value": "My Account"
}
],
"home.description.features": [
{
"type": 0,
"value": "Out-of-the-box features so that you focus only on adding enhancements."
}
],
"home.description.here_to_help": [
{
"type": 0,
"value": "Contact our support staff."
}
],
"home.description.here_to_help_line_2": [
{
"type": 0,
"value": "They will get you to the right place."
}
],
"home.description.shop_products": [
{
"type": 0,
Expand Down Expand Up @@ -1371,6 +1389,18 @@
"value": "Wishlist"
}
],
"home.heading.features": [
{
"type": 0,
"value": "Features"
}
],
"home.heading.here_to_help": [
{
"type": 0,
"value": "We're here to help"
}
],
"home.heading.shop_products": [
{
"type": 0,
Expand All @@ -1395,6 +1425,12 @@
"value": "Deploy on Managed Runtime"
}
],
"home.link.contact_us": [
{
"type": 0,
"value": "Contact Us"
}
],
"home.link.get_started": [
{
"type": 0,
Expand All @@ -1407,6 +1443,12 @@
"value": "Read docs"
}
],
"home.title.react_starter_store": [
{
"type": 0,
"value": "The React PWA Starter Store for Retail"
}
],
"item_attributes.label.promotions": [
{
"type": 0,
Expand Down
42 changes: 0 additions & 42 deletions overrides/app/static/translations/compiled/en-XA.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,34 +1069,6 @@
"value": "]"
}
],
"checkout.button.place_order": [
{
"type": 0,
"value": "["
},
{
"type": 0,
"value": "Ƥŀȧȧƈḗḗ Ǿřḓḗḗř"
},
{
"type": 0,
"value": "]"
}
],
"checkout.message.generic_error": [
{
"type": 0,
"value": "["
},
{
"type": 0,
"value": "Ȧƞ ŭŭƞḗḗẋƥḗḗƈŧḗḗḓ ḗḗřřǿǿř ǿǿƈƈŭŭřřḗḗḓ ḓŭŭřīƞɠ ƈħḗḗƈķǿǿŭŭŧ."
},
{
"type": 0,
"value": "]"
}
],
"checkout_confirmation.button.create_account": [
{
"type": 0,
Expand Down Expand Up @@ -1551,20 +1523,6 @@
"value": "]"
}
],
"checkout_payment.button.review_order": [
{
"type": 0,
"value": "["
},
{
"type": 0,
"value": "Řḗḗṽīḗḗẇ Ǿřḓḗḗř"
},
{
"type": 0,
"value": "]"
}
],
"checkout_payment.heading.billing_address": [
{
"type": 0,
Expand Down
Loading

0 comments on commit b3ad31e

Please sign in to comment.