buy now issue
This commit is contained in:
parent
ad5890f88b
commit
076f197de7
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue