Single Product Page Magnific PopUp Javascript Error

This topic has 4 replies, 2 voices, and was last updated 5 years, 6 months ago ago by Rose Tyler

  • Avatar: eggeno
    eggeno
    Participant
    August 28, 2018 at 11:27

    Hello,
    I have a problem in single product page: If product has only Featured image, Magnific Popup doesn’t work. Please take a look at the screenshot!

    Javascript Error!!!

    The problem is not occur if in addition to the featured image, there are other images in the gallery

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 29, 2018 at 08:52

    Hello,

    I’ve passed your problem to our developers to fix it in next theme update.
    As a temporary solution, you can make these changes to activate Magnific Popup by double click:
    woocommerce/single-product/product-image.php https://prnt.sc/ko43bt
    <img style="display: none" src="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>">
    js/scripts.js – change this http://prntscr.com/ko43pd to http://prntscr.com/ko43zo

    if (typeof specificPhoto !== typeof undefined && specificPhoto !== false &&  $('#product-page .views-gallery').length > 0) {
              $('#product-page .views-gallery .slider').magnificPopup('open',specificPhoto);
    }
          else if ( $('#product-page .views-gallery').length == 0 ) {
              $(this).magnificPopup({
              	type: 'image',
    			closeOnContentClick: true,
    			mainClass: 'mfp-img-mobile',
    			image: {
    				verticalFit: true
    			}
    		});
          }
          else{
              $('#product-page .views-gallery .slider').magnificPopup('open');
          }

    Regards

    Avatar: eggeno
    eggeno
    Participant
    September 4, 2018 at 10:35

    OK! Thanks for workaround!
    Is IDStore compatible with latest 3.4.5 woocommerce version?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 5, 2018 at 07:38

    You’re welcome!
    We did not test the compatibility yet.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.