diff --git a/themes/default/product.blade.php b/themes/default/product.blade.php index 295eb8e8..fca8afdf 100644 --- a/themes/default/product.blade.php +++ b/themes/default/product.blade.php @@ -46,7 +46,7 @@
@{{ product.origin_price_format }}
-
+

@{{ variable.name }}

@@ -87,10 +87,15 @@ - +
@@ -198,16 +203,12 @@ this.product = sku; }, - addCart(isBuyNow) { - const data = { - sku_id: this.product.id, - quantity: this.quantity - }; - console.log(data); - return; - - $http.post('/carts', data).then((res) => { + addCart(isBuyNow = false) { + $http.post('/carts', {sku_id: this.product.id, quantity: this.quantity}).then((res) => { layer.msg(res.message) + if (isBuyNow) { + location.href = '{{ shop_route("checkout.index") }}' + } }) },