<?php
if ( ! empty( $settings['cart_link']['url'] ) ) {
    $widget->add_render_attribute( 'cart_link', 'href', $settings['cart_link']['url'] );

    if ( $settings['cart_link']['is_external'] ) {
        $widget->add_render_attribute( 'cart_link', 'target', '_blank' );
    }

    if ( $settings['cart_link']['nofollow'] ) {
        $widget->add_render_attribute( 'cart_link', 'rel', 'nofollow' );
    }
}
    $classes = $settings['pxl_animate'];
    $animate_delay = $settings['pxl_animate_delay'];

?>

<div class="pxl-cart">
    <a href="<?php pxl_print_html($widget->get_render_attribute_string('cart_link')); ?>" class="pxl-cart--link pxl-cart-sidebar-button" data-product = "<?php if(class_exists('Woocommerce')) { echo sprintf (_n( '%d', '%d', WC()->cart->cart_contents_count, 'solarva' ), WC()->cart->cart_contents_count );} ?>">
        <?php (!empty($item['pxl_icon']['value'])) 
        ? \Elementor\Icons_Manager::render_icon( $item['pxl_icon'], [ 'aria-hidden' => 'true', 'class' => '' ], 'i' ) 
        : pxl_print_html('<svg xmlns="http://www.w3.org/2000/svg" width="15" height="19" viewBox="0 0 15 19" fill="none">
                            <path d="M4.03077 7.15023V4.6734C4.03077 2.83653 5.59266 1.33264 7.50053 1.33264C9.40939 1.33264 10.9703 2.83553 10.9703 4.6734V7.06023M14.2511 18.5554H0.75L1.19197 7.22622H13.8091L14.2511 18.5554Z" stroke="white" stroke-width="0.99993" stroke-miterlimit="10"/>
                        </svg>'); ?>
    </a>
</div>