-
Notifications
You must be signed in to change notification settings - Fork 4
Portal integration updates #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, but just a few items to look into
<h3 class="text-xl font-medium mb-4">@Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Information.ContactInformation", "Contact Information")</h3> | ||
<input name="email" type="email" placeholder="@Umbraco.GetDictionaryValueOrDefault("UmbracoCommerceCheckout.Information.Email", "Email")" class="block placeholder-gray-700 border border-gray-300 rounded py-2 px-4 mb-2 w-full" | ||
value="@(currentOrder.CustomerInfo.Email)" required /> | ||
value="@(customer.Email ?? currentOrder.CustomerInfo.Email)" required /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all properties the order should be first and fallback to the member properties. If the member properties are first then if they change these and progress in the checkout flow but then come back it will revert their changes back to the member properties. We only want to use the member properties if the order properties aren't yet populated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Used an extension method to pass the customer information as fallback.
// This extension method should not be used in a context where order is null. | ||
ArgumentNullException.ThrowIfNull(order); | ||
|
||
return new CustomerAddress( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might just need to double check if we should handle "shippingSameAsBilling" here and return the billing details if true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
||
var customer = currentOrder.GetCustomer(orderPropertyConfig); | ||
var billingAddress = currentOrder.GetBillingAddress(orderPropertyConfig); | ||
var shippingAddress = currentOrder.GetShippingAddress(orderPropertyConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if shipping address is being captured (a setting in the checkout) and if not, we don't need to get the details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Current PR adds support for an authorized checkout flow with the following additional features implemented:
Checkout
page to specify whether login is required, and specified the login content node. If login is required but no login page has been specified, the action result will beUnauthorized
.Using the
Checkout
add-on in parallel with thePortal
one, upon login the customer will be automatically assigned to the current order.FYI @umbracotrd