Home Forums WoodMart support forum Help with popup

Help with popup

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206015

    prokreeger
    Participant

    Hello,

    I don’t know can you help me with this, but I must ask you.

    I have added a popup window on product page and want to triger this window on info icon click (on screenshot Icon button 1), but when I click on this icon popup window didn’t open. Below I have provided a peace of code where icon is implemented.

    add_filter( 'woocommerce_germanized_delivery_time_html', 'my_child_adjust_delivery_time_html', 10, 4 );
    
    function my_child_adjust_delivery_time_html( $html, $option, $term_html, $product ) {
        $replacements = array(
           '{delivery_time}' => $term_html,
        );
        return wc_gzd_replace_label_shortcodes( '<span class="delivery-time-label">' . __( 'Delivery time: ', 'my-text-domain' ) . '</span> {delivery_time} <a href="#popup" title="" class="woodmart-open-popup "><i id="dlv-time-info" class="fas fa-info-circle"></i></a>', $replacements );
    }

    Also I have tried to place this icon in another place (on screenshot Icon button 2) and it works fine.

    add_action( 'woocommerce_single_product_summary', 'my_code', 28 );
    
    function my_code( ) {
        echo '<a href="#popup" title="" class="woodmart-open-popup "><i id="dlv-time-info" class="fas fa-info-circle"></i></a>';
    }

    I don’t know what’s the difference between this two implementations, but I will be appreciated if you can help me with this.

    Attachments:
    You must be logged in to view attached files.
    #206030

    Artem Temos
    Keymaster

    Hello,

    Probably, there is some other code that blocks our popup function in the first place where it doesn’t work. Sorry, but we don’t know what else JS code may affect this and it is not related to our theme.

    Regards

    #206492

    prokreeger
    Participant

    Ok, Thanks.

    #206558

    Eric Watson
    Participant

    If you have any questions please feel free to contact us.

    Best Regards

Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)