Current Path : /storage/v11800/andslite-new/public_html/wp-content/cache/autoptimize/js/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/andslite-new/public_html/wp-content/cache/autoptimize/js/autoptimize_snippet_3deb652a1f441db788fe561136dbe591.js |
function klikenGetCartItems(){jQuery.post(fetchCartItems.ajax_url,{action:fetchCartItems.action,_ajax_nonce:fetchCartItems.nonce},function(data){if(!data)return;let itemsForFBQ=[];let itemsForGTAG=[];let swCart=[];sw.config.currency=fetchCartItems.currency;for(let item in data){itemsForFBQ.push({"id":`${data[item].product_id}`,"quantity":`${data[item].quantity}`});itemsForGTAG.push({"id":`${data[item].product_id}`,"name":`${data[item].product_name}`,"price":`${data[item].price}`,"quantity":`${data[item].quantity}`,"google_business_vertical":"retail"});swCart.push({"id":`${data[item].product_id}`,"name":`${data[item].product_name}`,"price":`${data[item].price}`,"quantity":`${data[item].quantity}`,"currency":sw.config.currency});}
sw.track("AddToCart",{"content_type":"product","contents":itemsForFBQ});sw.gEvent("add_to_cart",{"items":itemsForGTAG});sw.register_shopcart({"items":swCart});});}
jQuery(document).ready(function(){jQuery('body').on('added_to_cart updated_cart_totals',function(){klikenGetCartItems();});});