Tagged: ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #765623

    Hi I have a problem. I have a child theme in which I set some functions to display woocommerce single product in a certain way (e.g. the display order of the single elements). However, apart for changing some hooksm I didn’t do anything with the images. Hence when I add a new product I deal with it as a default woocommerce product.

    However when I click on the product image or the product thumbnails in the gallery, no lightbox appears but each image opens in a new page. The only thing I did was to change single product main image size in the style css

    .single-product-main-image {
      width: 50%;
    }

    How can I get the lightbox. If i switch off to enfold theme everything works fine, but if I use my child theme there is this problem. Could you please help me? Thanks a lot. I give you the account details in a private section

    #765908

    Hey Elena,

    This link should help you: https://docs.woocommerce.com/document/jquery-cookie-fails-to-load/

    Best regards,
    John Torvik

    #766006

    Thanks, I tried but it didn’t work. I still have the same problem. Any other possibility? Did I mess up with some function on my child theme functions.php? I checked it and I don’t see any particular issue that may cause that problem but surely it must be somewhere as going back to the default Enfold theme the lightbox works again.

    #767430

    Hi Jhon have you some other suggestions on what can I do with my problem?
    Thanks!

    #767433

    Hey!

    Can you please firstly try updating Enfold to the latest version 4.0.4 – kriesi.at/documentation/enfold/updating-your-theme-files/? Let us know if that does not help either

    Regards,
    Yigit

    #767439

    I just did it on my local copy of the site, but the problem remains. Could you by the way check my functions.php file? I don’t know if there are some codes that may prevent the prettyPhoto (actually I suppose not, but I wonder if it is the case). I gave already the account details

    #767446

    Hey!

    Can you please try de-activating all active plugins and check if that helps?
    Also, file in private content field cannot be found. Please check its permissions via FTP

    Regards,
    Yigit

    #767453

    I already deactivated the plugins. Non of them was the problem. I saw that the prblem disappeared when I switched back to the default version of Enfold. So I guess the main problem lays in my functions.php saved in the child theme. Just added back the file animate.css, which however was not causing the problem. It adjust the image in the screen but it worked for an element that however is no more in use.

    #767512

    Just found what is causing the problem. In my functions.php I added a code which enables a full size submenu in each single product page.

    //adds a submenu on top the single product page
    add_action( 'woocommerce_before_main_content', 'wc_submenu');
    function wc_submenu () {
    	if(is_product()) {
    echo do_shortcode ("[av_hr class='invisible' height='50' shadow='no-shadow' position='center' custom_border='av-border-thin' custom_width='50px' custom_border_color='' custom_margin_top='30px' custom_margin_bottom='30px' icon_select='yes' custom_icon_color='' icon='ue808' font='entypo-fontello' custom_class='']");
    		
    echo do_shortcode ("[av_submenu which_menu='' menu='41' position='center' color='main_color' mobile='disabled' custom_class=''][/av_submenu]");
    echo do_shortcode ("[av_hr class='invisible' height='50' shadow='no-shadow' position='center' custom_border='av-border-thin' custom_width='50px' custom_border_color='' custom_margin_top='30px' custom_margin_bottom='30px' icon_select='yes' custom_icon_color='' icon='ue808' font='entypo-fontello' custom_class='']");
    	}
    }

    Do you have any suggestion to keep it without interfering with the woocommerce lightbox? Thanks a lot

    #769166

    Hey!

    The sub menu shortcode pushes the product content outside the wrap_all or main container. Please extract the actual html of the sub menu then use it instead of the shortcode.

    Cheers!
    Ismael

    #771593

    Hi Ismael, sorry for the late reply but I had another work to finish! Thanks very much for your answer. It worked perfectly. It is true that sometimes using shortcodes in functions may create problems.

    You are always a great team.

    #772157

    Hey!

    Great! Thank you for the kind words. Glad we could help. :)

    Cheers!
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Lightobx disappeared on woocommerce single page product’ is closed to new replies.