diff --git a/resources/js/components/Product/AddToCart.vue b/resources/js/components/Product/AddToCart.vue index df90beb5a..f9f83831b 100644 --- a/resources/js/components/Product/AddToCart.vue +++ b/resources/js/components/Product/AddToCart.vue @@ -65,7 +65,10 @@ }, async add() { - if (Object.values(this.product.children).length && window.location.pathname !== this.product.url && !config.show_swatches) { + if ('children' in this.product + && Object.values(this.product.children).length + && window.location.pathname !== this.product.url + && !config.show_swatches) { Turbolinks.visit(this.product.url) return; } diff --git a/resources/views/product/overview.blade.php b/resources/views/product/overview.blade.php index 014245251..9e6c55a43 100644 --- a/resources/views/product/overview.blade.php +++ b/resources/views/product/overview.blade.php @@ -19,7 +19,8 @@
@lang('Sorry! This product is currently out of stock.')
+ @else +