Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #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 help

    #1023448

    Hey 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,
    Nikko

    #1023459

    Hi Nikko,
    thanks for helping. I switched to the parent enfold theme without any change of the lightbox. Any other idea?
    Best regards
    dondela

    #1023945

    Hi 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,
    Nikko

    #1024054

    Thanks 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 2 months, 2 weeks ago by Yigit.
    #1024063

    When 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 );

    #1024618

    Hi,

    Yes, please copy as followed
    add_action( ‘woocommerce_before_main_content’, ‘action_woocommerce_before_main_content’, 10, 2 );

    Best regards,
    Basilis

    #1024734

    Hi 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 5 years, 6 months ago by dondela.
    #1024905

    Hi 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,
    Nikko

    #1025291

    Hi 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

    #1025442

    Hi 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,
    Nikko

    #1025458

    Hi 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>’;

    }

    #1025495

    Hi dondela,

    If this part of your code:

    echo do_shortcode("[]");

    contains those shortcodes you posted then that’s correct. :)

    Best regards,
    Nikko

    #1025502

    Hi Nikko,
    yes that´s correct :-)
    Thank you very much for your help, great support!

    #1025848

    Hi 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

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘woocommerce image zoom on another page’ is closed to new replies.