Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
<script>
$("#atcbtn_click").click(function(event){
event.preventDefault();
//alert("click");
var atc_url = '/cart/'
$(".list_freq-product .meta_check:checked").each(function(){
atc_url = atc_url + $(this).attr('value') + ":1,"
});
//console.log("iddds",atc_url);
window.location.href = atc_url
})
</script>
<script>
document.getElementById('atcbtn_click').addEventListener('click', function(event) {
event.preventDefault();
// alert("click jkk");
var dataType = [];
$(".list_freq-product .meta_check:checked").each(function() {
var data = {}; // Create a new object for each iteration
data['id'] = parseInt($(this).attr('value'));
data['quantity'] = 1;
//console.log(data);
dataType.push(data);
});
const newData = {
items : [...dataType]
}
// console.log("data",newData)
jQuery.ajax({
type: 'POST',
url: '/cart/add.js',
data: newData,
dataType: 'json',
success: function(data) {
console.log(data);
window.location.href= '/cart'
}
});
});
</script>
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024