Merge pull request #1029 from rahulshukla-webkul/development

buy now issue
This commit is contained in:
Prashant Singh 2019-06-15 10:44:35 +05:30 committed by GitHub
commit 7e30b0bc48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 15 deletions

View File

@ -205,19 +205,6 @@
}
document.getElementById("quantity").value = quantity;
var buyNowLink = $('.btn.buynow').attr('data-href');
var splitted = buyNowLink.split("/");
lastItem = splitted[splitted.length - 2];
splitted.pop();
splitted.pop();
var joined = splitted.join('/');
var newBuyNowUrl = joined + '/' + lastItem + '/' + quantity;
$('.btn.buynow').attr('data-href', newBuyNowUrl);
event.preventDefault();
}
</script>

View File

@ -148,14 +148,13 @@
if (this.selectedProductId != '' && buyNowLink) {
var splitted = buyNowLink.split("/");
splitted.pop();
splitted.pop();
lastItem = this.selectedProductId;
var joined = splitted.join('/');
var newBuyNowUrl = joined + '/' + lastItem + '/' + quantity;
var newBuyNowUrl = joined + '/' + lastItem;
$('.btn.buynow').attr('data-href', newBuyNowUrl);
}