Home Forums WoodMart – Premium Template Single column product page problem

This topic contains 42 replies, has 4 voices, and was last updated by Artem Temos Artem Temos 7 months, 1 week ago.

Viewing 13 posts - 31 through 43 (of 43 total)
  • Author
    Posts
  • #156321

    pacman1917
    Customer

    Thank you very much for your efforts. Will be waiting.

    #156324

    If you have any questions please feel free to contact us.

    Best Regards

    #156581

    pacman1917
    Customer

    One more question.
    I select variation A which has some gallery images, then I select variation B which has only main variation image and I see additional gallery images from variation A, not from parent product.
    I think expected behaviour is to show gallery from parent product not previous variations?
    To better understand:

    Private Content Hidden
    #156651

    Hello,

    We created a product like yours and tested on you without a fix and everything works as well. The gallery is not replaced due to the fact that one of your variations has a gallery and the other does not, and if there is no gallery, only the main picture is replaced. Unfortunately, this is how our option of additional images works and we don’t have a quick solution to change the behavior.

    Kind Regards
    XTemos Studio

    #156704

    pacman1917
    Customer

    OK, got it. I hope you will consider implementing some solution to show only main image when there’s no gallery. Current implementation is rather misleading for costumer who has has every reason to think that the gallery pictures relate to current variation.

    #156758

    Yes, we will consult with our developers on the possibility of changing behavior.

    Kind Regards
    XTemos Studio

    #158998

    Hello,

    After the latest update, you need to add also the following code to the functions.php in the child theme

    add_filter( 'woodmart_sticky_product_details_offset', function () {
    	return 100;
    } );

    and put this to the Custom JS on document ready section

    jQuery(window).on('main_gallery_replaced', function(){
    	fix_single_product();
    });
    fix_single_product();
    function fix_single_product(){
    	if (!jQuery('.single-product-page').hasClass('product-sticky-on')) {
    		return;
    	}
    	jQuery('.product-images-inner').imagesLoaded(function () {
    		jQuery('.product-images-inner').css('min-height', jQuery('.woocommerce-product-gallery__wrapper').height());
    	});
    }

    Regards

    #159050

    pacman1917
    Customer

    Thank you. Can you please clarify what this code is doing and why it’s not introduced to everybody via recent update?
    Everything related to single product page seems to be woring fine as is now (without adding thi code)

    #159089

    We have customized the code in your core files. So if you update the theme, our fix will be lost and you will need to add it to the child theme as we sent you.

    #159102

    pacman1917
    Customer

    I’ve just double checked and found that my claim was wrong. Everything is not working fine but if I add only this code

    add_filter( ‘woodmart_sticky_product_details_offset’, function () {
    return 100;
    } );

    everything seems to work fine without adding JS. Because of that I have a question what’s the purpose of this JS?
    Also can you please clarify why this code is not added to core for everybody?

    • This reply was modified 7 months, 1 week ago by  pacman1917.
    #159104

    Because this code is only to change the offset. It doesn’t fix anything but just set the offset size.

    #159406

    pacman1917
    Customer

    I don’t know why but scrolling works fine without this JS code.
    Offset fix does the trick alone.

    • This reply was modified 7 months, 1 week ago by  pacman1917.
    #159427

    OK, great. Keep testing this and if you will face the problem again, just use our code.

Viewing 13 posts - 31 through 43 (of 43 total)

You must be logged in to reply to this topic.