Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix add to cart function

weronkac4edc6b72583
diff --git a/saleor/static/js/demo/storefront.js b/saleor/static/js/demo/storefront.js
index 5e89d7c131..2fec20842d 100644
--- a/saleor/static/js/demo/storefront.js
+++ b/saleor/static/js/demo/storefront.js
@@ -73,7 +73,7 @@ $('.product-form button').click((e) => {
var quantity = $('#id_quantity').val()
var variant = $('#id_variant').val()
$.ajax ({
- url: $(this).attr('action'),
+ url: $('.product-form').attr('action'),
type: 'POST',
data: {
variant: variant,
@@ -87,7 +87,7 @@ $('.product-form button').click((e) => {
$cartDropdown.addClass("show")
setTimeout((e) => {
$cartDropdown.removeClass('show')
- }, 2000)
+ }, 2500)
})
}
})