WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce 2.x Lightbox doesn't work (2 posts)

  1. gonzalesc
    Member
    Posted 8 months ago #

    I'm programming a payment gateway for Woocommerce and I need show a iframe using lightbox, I read this post but it doesn't work for me.

    <?php
    function gowc_pefectivo_lightbox() {
        global $woocommerce;
    
        $suffix      = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
        $lightbox_en = get_option( 'woocommerce_enable_lightbox' ) == 'yes' ? true : false;
    
        if ( $lightbox_en ) {
            wp_enqueue_script( 'prettyPhoto', $woocommerce->plugin_url() . '/assets/js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), $woocommerce->version, true );
            wp_enqueue_script( 'prettyPhoto-init', $woocommerce->plugin_url() . '/assets/js/prettyPhoto/jquery.prettyPhoto.init' . $suffix . '.js', array( 'jquery' ), $woocommerce->version, true );
            wp_enqueue_style( 'woocommerce_prettyPhoto_css', $woocommerce->plugin_url() . '/assets/css/prettyPhoto.css' );
        }
    }
    add_action( 'wp_enqueue_scripts', 'gowc_pefectivo_lightbox' );
    ?>

    The libraries (of above) are shown correctly when I see the HTML source but when I click in the image, this open in other tab, doesn't use lightbox.

    I have a test website, the only plugin installed is Woocommerce 2.x, I have used rel="prettyPhoto[iframes]" and too rel="prettyPhoto" (with a image), but neither work.

    Note1: My option lightbox in the admin panel is enabled.
    Note2: The payment gateway is PagoEfectivo.

    http://wordpress.org/plugins/woocommerce/

  2. gonzalesc
    Member
    Posted 8 months ago #

    I realized that the lightbox effect works in all other pages, but it doesn't work in checkout page that it is I need

Reply

You must log in to post.

About this Plugin

About this Topic