Skip to content

Commit cd86234

Browse files
Merge branch 'release/13.1.0'
2 parents ea952cc + 47349e1 commit cd86234

16 files changed

+151
-78
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
1111
</ItemGroup>
1212
<ItemGroup>
13-
<PackageVersion Include="Umbraco.Commerce.Cms.Startup" Version="[13.0.0, 14)" />
13+
<PackageVersion Include="Umbraco.Commerce.Cms.Startup" Version="[13.1.0--rc1, 14)" />
1414
<PackageVersion Include="Umbraco.Cms.Web.Website" Version="[13.0.0, 14)" />
1515
</ItemGroup>
1616
</Project>

src/Umbraco.Commerce.Checkout/Client/src/js/uccheckout.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function () {
1+
(function () {
22

33
// Initialization
44
function init() {
@@ -34,6 +34,13 @@
3434
h();
3535
});
3636

37+
// Update shippingOptionId based on selected shipping method
38+
document.querySelectorAll("input[name=shippingMethod]").forEach(el => {
39+
var h = () => { document.querySelector("input[name=shippingOptionId]").value = document.querySelector("input[name=shippingMethod]:checked").dataset.optionId; }
40+
el.addEventListener("change", h);
41+
if (el.checked) h();
42+
});
43+
3744
// Enable / disable continue button when accepting terms
3845
var acceptTermsEl = document.getElementById("accept-terms");
3946
if (acceptTermsEl) {

src/Umbraco.Commerce.Checkout/Extensions/CompositionExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Umbraco.Commerce.Checkout.Web.Events.Notification.Handlers;
55
using Umbraco.Commerce.Core.Events.Notification;
66
using Umbraco.Commerce.Extensions;
7-
using Umbraco.Commerce.Cms.Web.Events.Notification;
87

98
using IBuilder = Umbraco.Cms.Core.DependencyInjection.IUmbracoBuilder;
109

src/Umbraco.Commerce.Checkout/Pipeline/Tasks/CreateUmbracoCommerceCheckoutNodesTask.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
using Umbraco.Commerce.Common.Pipelines;
2-
using Umbraco.Commerce.Common.Pipelines.Tasks;
3-
using System.Reflection;
4-
using System.Linq;
51
using Umbraco.Cms.Core.Models;
6-
using Umbraco.Cms.Core.Scoping;
72
using Umbraco.Cms.Core.Services;
3+
using Umbraco.Cms.Infrastructure.Scoping;
4+
using Umbraco.Commerce.Common.Pipelines;
5+
using Umbraco.Commerce.Common.Pipelines.Tasks;
86

97
namespace Umbraco.Commerce.Checkout.Pipeline.Tasks
108
{
@@ -33,7 +31,7 @@ public override PipelineResult<InstallPipelineContext> Execute(PipelineArgs<Inst
3331
// Check to see if the checkout node already exists
3432
var filter = scope.SqlContext.Query<IContent>().Where(x => x.ContentTypeId == uccCheckoutPageContenType.Id);
3533
var childNodes = _contentService.GetPagedChildren(args.Model.SiteRootNodeId, 1, 1, out long totalRecords, filter);
36-
34+
3735
if (totalRecords == 0)
3836
{
3937
// Create the checkout page

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)