Home Forums WoodMart support forum Single column product page problem

Single column product page problem

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

    horny_fungus
    Participant

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

    #156324

    Eric Watson
    Participant

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

    Best Regards

    #156581

    horny_fungus
    Participant

    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:

    #156651

    Eric Watson
    Participant

    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

    horny_fungus
    Participant

    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

    Eric Watson
    Participant

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

    Kind Regards
    XTemos Studio

    #158998

    Artem Temos
    Keymaster

    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

    horny_fungus
    Participant

    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

    Artem Temos
    Keymaster

    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

    horny_fungus
    Participant

    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?

    #159104

    Artem Temos
    Keymaster

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

    #159406

    horny_fungus
    Participant

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

    #159427

    Artem Temos
    Keymaster

    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)