-
AuthorPosts
-
March 23, 2017 at 6:22 pm #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
March 24, 2017 at 6:24 am #765908Hey Elena,
This link should help you: https://docs.woocommerce.com/document/jquery-cookie-fails-to-load/
Best regards,
John TorvikMarch 24, 2017 at 9:54 am #766006Thanks, 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.
March 27, 2017 at 2:13 pm #767430Hi Jhon have you some other suggestions on what can I do with my problem?
Thanks!March 27, 2017 at 2:23 pm #767433Hey!
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,
YigitMarch 27, 2017 at 2:30 pm #767439I 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
March 27, 2017 at 2:40 pm #767446Hey!
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 FTPRegards,
YigitMarch 27, 2017 at 2:47 pm #767453I 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.
March 27, 2017 at 3:52 pm #767512Just 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
March 29, 2017 at 11:42 pm #769166Hey!
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!
IsmaelApril 4, 2017 at 9:30 am #771593Hi 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.
April 5, 2017 at 4:26 am #772157 -
AuthorPosts
- The topic ‘Lightobx disappeared on woocommerce single page product’ is closed to new replies.