-
AuthorPosts
-
October 17, 2018 at 2:19 pm #1022772
Dear support,
on some pages the product image zoom opens on another page instead in a gallery view. Do you know what i am doing wrong?
Thanks for any helpOctober 18, 2018 at 4:45 pm #1023448Hey dondela,
I have checked it and noticed that the lightbox-added isn’t added on the product pages that has issues.
Unfortunately there’s no js error shown in the web console.
Can you try to switch it to the parent theme: Enfold and check if this fixes the issue.Best regards,
NikkoOctober 18, 2018 at 4:56 pm #1023459Hi Nikko,
thanks for helping. I switched to the parent enfold theme without any change of the lightbox. Any other idea?
Best regards
dondelaOctober 19, 2018 at 3:17 pm #1023945Hi dondela,
Can you create a staging site? it basically just a duplicate of your site, where we can try to troubleshoot your site without putting your live site down.
You can check in this post how you can set it up: https://themeisle.com/blog/wordpress-staging-site/
It’s difficult to figure out what’s wrong on your site since there are no js errors and it’s hard to pinpoint what’s causing the issue, I guess it might be some of the plugin which prevents other pages from working.
If we can disable plugins and try to debug your site, maybe we can find what’s causing this issue and try to fix it.Best regards,
NikkoOctober 19, 2018 at 5:15 pm #1024054Thanks for that tip. I did that and after a view testing i figured out that after switching to the enfold parent theme thelight-box does work again. So i am pretty sure, that the problem is in the functions.php where i added this script:
- This reply was modified 10 months, 1 week ago by Yigit.
October 19, 2018 at 5:21 pm #1024063When i comment out the following line, it works again. Do you see a fault there?
// add the action
add_action( ‘woocommerce_before_main_content’, ‘action_woocommerce_before_main_content’, 10, 2 );October 21, 2018 at 11:00 pm #1024618Hi,
Yes, please copy as followed
add_action( ‘woocommerce_before_main_content’, ‘action_woocommerce_before_main_content’, 10, 2 );Best regards,
BasilisOctober 22, 2018 at 8:36 am #1024734Hi Basilis,
it seems the implementation of the enfold-shortcode is responsible for the lightbox not to load. Can you confirm that?
Regards dondela- This reply was modified 6 years, 2 months ago by dondela.
October 22, 2018 at 3:22 pm #1024905Hi dondela,
I think a part of the shortcode might be causing the issue but most of the time it doesn’t really cause that issue.
Can you try adding the shortcode bit by bit? what I mean is to add probably just a single section of the shortcode, maybe this way we know which part of the shortcode is causing the issue and maybe we can do some workaround it.Best regards,
NikkoOctober 23, 2018 at 9:58 am #1025291Hi Nikko,
i found the error, this is the short-code, which causes the lightbox not to load. Is there something wrong with this code?[av_layout_row border='' min_height_percent='' min_height='5' color='main_color' mobile='av-flex-cells' id='' av_element_hidden_in_editor='0' mobile_breaking='' av_uid='av-7ug8q6']
[av_cell_one_fifth vertical_align='top' padding='0px' padding_sync='true' background_color='#99cc99' src='' attachment='' attachment_size='' background_attachment='scroll' background_position='top left' background_repeat='no-repeat' mobile_display='' av_uid='av-6l1xum'][/av_cell_one_fifth][av_cell_three_fifth vertical_align='top' padding='0px' padding_sync='true' background_color='#009933' src='' attachment='' attachment_size='' background_attachment='scroll' background_position='top left' background_repeat='no-repeat' mobile_display='' av_uid='av-4vziby']
[/av_cell_three_fifth][av_cell_one_fifth vertical_align='top' padding='0px' padding_sync='true' background_color='#99cc99' src='' attachment='' attachment_size='' background_attachment='scroll' background_position='top left' background_repeat='no-repeat' mobile_display='' av_uid='av-2d8u0u']
[/av_cell_one_fifth]
[/av_layout_row]Thanks dondela
October 23, 2018 at 2:53 pm #1025442Hi dondela,
I don’t see anything wrong with the code and even tried to add it on the footer and it doesn’t cause any issues at all.
Instead of using the shortcode to show that, can you try use this html equivalent:<div id="av-layout-grid-1" class="av-layout-grid-container entry-content-wrapper main_color av-flex-cells container_wrap sidebar_right"> <div class="flex_cell no_margin av_one_fifth av-zero-padding" style="height:5px; min-height:5px;vertical-align:top; padding:0px; background-color:#99cc99;"><div class="flex_cell_inner"></div></div> <div class="flex_cell no_margin av_three_fifth av-zero-padding" style="height:5px; min-height:5px;vertical-align:top; padding:0px; background-color:#009933;"><div class="flex_cell_inner"></div></div> <div class="flex_cell no_margin av_one_fifth av-zero-padding" style="height:5px; min-height:5px;vertical-align:top; padding:0px; background-color:#99cc99;"><div class="flex_cell_inner"></div></div> </div>
Let us know if it helps.
Best regards,
NikkoOctober 23, 2018 at 3:25 pm #1025458Hi Nikko,
thanks for that tip. I implemented the html like this, is this right?
// define the woocommerce_before_main_content callback
function action_woocommerce_before_main_content( $array, $int ) {
// make action magic happen here…if ( has_term( ‘diamanttrennscheibe-winkelschleifer’, ‘product_cat’ ) ) {
echo do_shortcode(“[]”);
echo ‘<div id=”av-layout-grid-1″ class=”av-layout-grid-container entry-content-wrapper main_color av-flex-cells container_wrap sidebar_right”>
<div class=”flex_cell no_margin av_one_fifth av-zero-padding” style=”height:5px; min-height:5px;vertical-align:top; padding:0px; background-color:#99cc99;”><div class=”flex_cell_inner”></div></div>
<div class=”flex_cell no_margin av_three_fifth av-zero-padding” style=”height:5px; min-height:5px;vertical-align:top; padding:0px; background-color:#009933;”><div class=”flex_cell_inner”></div></div>
<div class=”flex_cell no_margin av_one_fifth av-zero-padding” style=”height:5px; min-height:5px;vertical-align:top; padding:0px; background-color:#99cc99;”><div class=”flex_cell_inner”></div></div>
</div>’;}
October 23, 2018 at 4:06 pm #1025495Hi dondela,
If this part of your code:
echo do_shortcode("[]");
contains those shortcodes you posted then that’s correct. :)
Best regards,
NikkoOctober 23, 2018 at 4:15 pm #1025502Hi Nikko,
yes that´s correct :-)
Thank you very much for your help, great support!October 24, 2018 at 11:00 am #1025848Hi dondela,
Glad that we could help and thanks for your kind words :)
Feel free to comeback if you need further assistance.
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘woocommerce image zoom on another page’ is closed to new replies.