Skip to content

Commit e9b680f

Browse files
Use GetDictionaryValueOrDefault
1 parent 721c0f9 commit e9b680f

8 files changed

+50
-50
lines changed

src/Umbraco.Commerce.Checkout/Views/UmbracoCommerceCheckout/Partials/UmbracoCommerceCheckoutOrderInfo.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
: null;
2424
}
2525
<div class="border border-gray-300 p-6 rounded mb-8">
26-
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.OrderInfo.ContactInformation", "Contact Information")</h3>
26+
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.OrderInfo.ContactInformation", "Contact Information")</h3>
2727
<p class="mb-4">@order.CustomerInfo.Email</p>
2828

2929
<div class="flex w-full -mx-2">
3030
<div class="flex-1 mx-2">
31-
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.OrderInfo.BillingInformation", "Billing Information")</h3>
31+
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.OrderInfo.BillingInformation", "Billing Information")</h3>
3232
<p class="">
3333
<strong>@order.CustomerInfo.FirstName @order.CustomerInfo.LastName</strong>
3434
<br />
@@ -45,7 +45,7 @@
4545
@if (checkoutPage.Value<bool>("uccCollectShippingInfo"))
4646
{
4747
<div class="flex-1 mx-2">
48-
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.OrderInfo.ShippingInformation", "Shipping Information")</h3>
48+
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.OrderInfo.ShippingInformation", "Shipping Information")</h3>
4949
<p class="">
5050
<strong>@order.Properties["shippingFirstName"] @order.Properties["shippingLastName"]</strong>
5151
<br />

src/Umbraco.Commerce.Checkout/Views/UmbracoCommerceCheckout/Partials/UmbracoCommerceCheckoutPrevNext.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<div class="flex flex-col-reverse items-center justify-between mt-8 md:flex-row">
1010
@if (prevStep != null)
1111
{
12-
<div><a href="@(prevStep.Url())" class="inline-flex text-@(themeColor) hover:text-gray-900 hover:underline"><svg viewBox="0 0 20 20" class="inline-block w-5 h-5 fill-current"><use href="#ico-chevron-left" /></svg> @string.Format(Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.Navigation.ReturnTo", "Return to {0}"), prevStep.Name)</a></div>
12+
<div><a href="@(prevStep.Url())" class="inline-flex text-@(themeColor) hover:text-gray-900 hover:underline"><svg viewBox="0 0 20 20" class="inline-block w-5 h-5 fill-current"><use href="#ico-chevron-left" /></svg> @string.Format(Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Navigation.ReturnTo", "Return to {0}"), prevStep.Name)</a></div>
1313
}
1414
else if (backPage != null)
1515
{
16-
<div><a href="@(backPage.Url())" class="inline-flex text-@(themeColor) hover:text-gray-900 hover:underline"><svg viewBox="0 0 20 20" class="inline-block w-5 h-5 fill-current"><use href="#ico-chevron-left" /></svg> @string.Format(Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.Navigation.ReturnTo", "Return to {0}"), backPage.Name)</a></div>
16+
<div><a href="@(backPage.Url())" class="inline-flex text-@(themeColor) hover:text-gray-900 hover:underline"><svg viewBox="0 0 20 20" class="inline-block w-5 h-5 fill-current"><use href="#ico-chevron-left" /></svg> @string.Format(Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Navigation.ReturnTo", "Return to {0}"), backPage.Name)</a></div>
1717
}
1818
else
1919
{
@@ -22,7 +22,7 @@
2222
@if (nextStep != null)
2323
{
2424
<div class="mb-4 w-full md:mb-0 md:w-auto">
25-
<button id="continue" class="bg-@(themeColor) text-white px-4 py-4 w-full rounded hover:bg-gray-900 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-300 disabled:hover:bg-gray-100 disabled:hover:text-gray-300" type="submit">@string.Format(Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.Navigation.ContinueTo", "Continue to {0}"), nextStep.Name)</button>
25+
<button id="continue" class="bg-@(themeColor) text-white px-4 py-4 w-full rounded hover:bg-gray-900 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-300 disabled:hover:bg-gray-100 disabled:hover:text-gray-300" type="submit">@string.Format(Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Navigation.ContinueTo", "Continue to {0}"), nextStep.Name)</button>
2626
</div>
2727
}
2828
</div>

src/Umbraco.Commerce.Checkout/Views/UmbracoCommerceCheckout/UmbracoCommerceCheckoutConfirmationPage.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
<div class="border border-gray-300 p-6 rounded mb-8 text-center">
1616
<span class="inline-flex items-center justify-center text-6xl border-4 border-green-500 rounded-full mb-4 w-24 h-24"><svg viewBox="0 0 20 20" class="inline-block w-16 h-16 fill-current text-green-500"><use href="#ico-check" /></svg></span>
17-
<h3 class="text-xl font-medium mb-4">@string.Format(Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.Confirmation.ThankYou", "Thank you for your order #{0}"), currentOrder.OrderNumber ?? currentOrder.CartNumber)</h3>
18-
<p class="mb-4">@Html.Raw(string.Format(Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.Confirmation.ConfirmationEmailSent", "A confirmation email has been sent to {0}"), "<strong>" + currentOrder.CustomerInfo.Email + "</strong>"))</p>
19-
<p><a href="/" class="inline-block bg-@(themeColor) text-white px-4 py-4 rounded hover:bg-gray-900">@Umbraco.GetDictionaryValue("UmbracoCommerceCheckout.Confirmation.ReturnToStore", "Return to store")</a></p>
17+
<h3 class="text-xl font-medium mb-4">@string.Format(Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Confirmation.ThankYou", "Thank you for your order #{0}"), currentOrder.OrderNumber ?? currentOrder.CartNumber)</h3>
18+
<p class="mb-4">@Html.Raw(string.Format(Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Confirmation.ConfirmationEmailSent", "A confirmation email has been sent to {0}"), "<strong>" + currentOrder.CustomerInfo.Email + "</strong>"))</p>
19+
<p><a href="/" class="inline-block bg-@(themeColor) text-white px-4 py-4 rounded hover:bg-gray-900">@Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Confirmation.ReturnToStore", "Return to store")</a></p>
2020
</div>
2121

2222
@Html.Partial("~/Views/UmbracoCommerceCheckout/Partials/UmbracoCommerceCheckoutOrderInfo.cshtml", currentOrder)

0 commit comments

Comments
 (0)