HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/test.creativefellows.nl/mysteryrun/public/js/app-min.js
$(document).foundation().ready(function(){$(document.links).filter(function(){return this.hostname!=window.location.hostname}).attr("target","_blank"),$(".shopping-cart").shoppingCart()}),$.fn.shoppingCart=function(){return this.each(function(){var t=$(this),e=t.find("a.delete"),a=t.find("select.change-amount");t.init=function(){e.on("click",t.removeFromBasket),a.on("change",t.updateAmount)},t.updateAmount=function(){var e=$(this).closest(".item"),a=t.getUid($(this)),n=t.getPrice($(this)),o=$(this).val();$.ajax({dataType:"json",type:"PATCH",url:"winkelwagen",data:{uid:a,amount:o},success:function(a){t.updateTotals(a),t.updateRow(e,o,n)}})},t.updateRow=function(e,a,n){e.find(".product-total").html(t.formatPrice(a*n))},t.formatPrice=function(t,e){return(!0===e?"€ ":"")+t.toFixed(2).replace(".",",")},t.getUid=function(t){return t.closest(".item").attr("data-uid")},t.getPrice=function(t){return t.closest(".item").attr("data-price")},t.removeFromBasket=function(){var e=$(this),a=e.attr("data-id");$.ajax({dataType:"json",type:"DELETE",url:"winkelwagen",data:{uid:a},success:function(a){t.deleteRow(e),t.updateTotals(a)}})},t.updateTotals=function(t){$("#cart-subtotal").text(t.subtotal),$("#cart-delivery").text(t.delivery),$("#cart-total").html("€ "+t.total),$("#cart-tax").html("€ "+t.tax)},t.deleteRow=function(t){t.closest(".item").slideUp()},t.init()})};