• Resolved luxtools

    (@luxtools)


    I purchased the pro version thinking it would be out of the box, but I didn’t think it through.

    I want the cart on my header to trigger the side cart when pressed. Instead, it takes me to cart page.

    How can I fix this? What code do I put, and where?

    I’ve attempted playing around in the theme/woocommerce cart and mini cart php, but no luck.

    (Ps the plug in works beautifully when I simply add to cart, but I want the theme cart to trigger the side cart as well).

    Any help would be super appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter luxtools

    (@luxtools)

    The site is lux-Edit.co

    <span class=”xoo-wsc-cart-trigger”>Open Cart</span>

    I read I need to apply this class to my cart element, but I am unsure how to do this. Is it in additional CSS in my theme settings? What would the code be? I did inspect my cart element so I think I know what to assign it to, but I am brand new to this. I would really appreciate if anyone (or the developer) could provide me with help. Sorry for being an idiot.

    Many thanks

    • This reply was modified 2 years, 8 months ago by luxtools.
    Thread Starter luxtools

    (@luxtools)

    The developer helped me get it sorted.

    If anyone is interested, this is the code that worked for me:

    add_action( 'wp_footer', function(){
    
                                    ?>
    
                                    <script type="text/javascript">
    
                                    jQuery(document).ready(function($){
    
                                                                   
    
                                                    $(document.body).on( 'wc_fragments_refreshed', function(){
    
                                                                    setTimeout(function(){
    
                                                                                    $('.wc-shopping-cart').addClass('xoo-wsc-cart-trigger')
    
                                                                    }, 500)

    Lux Tools thanks for sharing… and how would you enter that as a snippet or stand-alone PHP?

    where should I put that code? on what wordpress file?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Have theme cart trigger side cart’ is closed to new replies.