HEX
HEX
Server: Apache/2
System: Linux 31.186.11.143 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: tek178om (4688)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/tek178om/public_html/wp-content/themes/astra/assets/js/unminified/shop-add-to-cart.js
jQuery( document ).ready(function() {

    jQuery( document.body ).on( 'added_to_cart', function() {
        const singleProductButton = jQuery( '.single_add_to_cart_button' );

        if( ! singleProductButton.hasClass('loading') && astra_shop_add_to_cart.shop_add_to_cart_action ) {

            const slideInCart = jQuery( '#astra-mobile-cart-drawer' );

            if( 'slide_in_cart' === astra_shop_add_to_cart.shop_add_to_cart_action && slideInCart ) {
                slideInCart.addClass( 'active' );
                jQuery( 'html' ).addClass( 'ast-mobile-cart-active' );
            }
            if( astra_shop_add_to_cart.is_astra_pro ) {

                if( 'redirect_cart_page' === astra_shop_add_to_cart.shop_add_to_cart_action ) {
                    window.open( astra_shop_add_to_cart.cart_url ,"_self");
                }

                if( 'redirect_checkout_page' === astra_shop_add_to_cart.shop_add_to_cart_action ) {
                    window.open( astra_shop_add_to_cart.checkout_url ,"_self");
                }
            }
        }

    });
});