Each Lecture cost $2.00.Â
Â
Â
Â
Â
Â
Number | Title | Category | MP3 | CD |
---|
"columnDefs": [
{ targets: 3, render: function ( data, type, row ) { return data ? '' : ""; } }, { targets: 4, render: function ( data, type, row ) { //button classes are from bigcommerce return data ? '' : ""; }, "visible": false }, { "targets": [ 0 ], "visible": false }
],
"initComplete": function() { var column = $('#theTable').DataTable(); //console.log(this); $("#cat-div").html(catDiv); $('#cat-dropdown').on( 'change', function () {
column .search($(this).val() ) .draw(); }); $('#cat-dropdown').val("Chanukah").trigger( "change" ); ///////////////// $('#theTable > tbody').on('click', function (event) { console.log(event); if(event.target.innerHTML === 'Buy MP3' || event.target.innerHTML === 'Buy CD') { console.log('buy button - ', event.target.value); $.ajax({ method: "POST", url: 'https://www.simchashachaim.com/remote/v1/cart/add', data: { action: "add", product_id: event.target.value, "qty[]": 1 }, }) .done(function( data ) { console.log(data); vex.dialog.open({ message: 'The item has been added to your cart', className: 'vex-theme-default', showCloseButton: true, buttons: [ $.extend({}, vex.dialog.buttons.YES, { text: 'Shopping Cart' }), $.extend({}, vex.dialog.buttons.NO, { text: 'Continue Shopping' }) ], callback: function(data) { if (data === true) { window.location.href = "https://www.simchashachaim.com/cart.php";; } } }); }); } //console.log(event); });
/////////////////////// }
}); } ); // ]]>
Â
Â