Skip to content

Commit

Permalink
Merge pull request #235 from Erislandio/fix/fix-address-trim-error
Browse files Browse the repository at this point in the history
fix: fix orderForm address street trim error
  • Loading branch information
Mecrano authored Jan 17, 2024
2 parents 6029fb5 + 4b574a5 commit 628f238
Show file tree
Hide file tree
Showing 5 changed files with 4,129 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## Fixed
- Fix trim errors

## [0.15.4] - 2024-01-10

## [0.15.3] - 2024-01-09
Expand Down
3,934 changes: 3,933 additions & 1 deletion checkout-ui-custom/checkout6-custom.css

Large diffs are not rendered by default.

189 changes: 188 additions & 1 deletion checkout-ui-custom/checkout6-custom.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions checkout-ui-custom/src/_js/_v.custom.checkout.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class checkoutCustom {

if(typeDays === "d") {
d.setDate(
d.getDate() + n
d.getDate() + n
)
} else {
d.setDate(
Expand Down Expand Up @@ -1089,7 +1089,7 @@ class checkoutCustom {

appendMessageEmptyStreet(orderForm) {
const _this = this
if(!(orderForm && orderForm.shippingData && orderForm.shippingData.address && orderForm.shippingData.address.street != null||undefined && orderForm.shippingData.address.street.trim()) ) {
if(!(orderForm && orderForm.shippingData && orderForm.shippingData.address && orderForm.shippingData.address.street != null || undefined && orderForm.shippingData.address.street.trim())) {
if( !$('.alert-noStreet').length && $('.accordion-inner.shipping-container').length) $('.orderform-template-holder #shipping-data .accordion-inner').append(`<div class="alert-noStreet"><span class="alert">${_this.locale ? _this.locale.noStreetAddress || 'Your shipping information is missing a required field, please include a street' : 'Your shipping information is missing a required field, please include a street'}</span></div>`)
} else {
$('.alert-noStreet').remove()
Expand All @@ -1099,12 +1099,13 @@ class checkoutCustom {

URLHasIncludePayment(orderForm) {
const _this = this

if (
window.location.hash === '#/payment' &&
orderForm.shippingData &&
orderForm.shippingData.address &&
orderForm.shippingData.address.addressType !== 'search' &&
orderForm.shippingData.address.street &&
!orderForm.shippingData.address.street.trim() &&
_this.customAddressForm
) {
Expand Down
2 changes: 1 addition & 1 deletion node/templates/checkout6-custom.js

Large diffs are not rendered by default.

0 comments on commit 628f238

Please sign in to comment.