Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROD: Disappearing Thumbnails #6

Closed
influxweb opened this issue Jul 22, 2019 · 0 comments

Comments

@influxweb
Copy link
Contributor

commented Jul 22, 2019

Due to a buq with Attribute Machine, when clicking on a subscription option, it triggers the variant_change event however, it does not trip Image Machine like when you click on other attributes. This would cause the thumbnail element to update to opacity: 0; but not be updated after Image Machine ran to opacity: 1;.

Correcting the Issue

I have added this update and it will be included in the next maintenance release.

To make the update prior to the next release, you will need to find the Product Imagery functionality in theme.js and update with the following:

User Interface -> JavaScript Resources -> theme:

/**
 * Product Imagery
 * This set of functions control the creation and operation of the product image gallery carousels.
 */
let productThumbnails = document.querySelector('[data-hook="product-thumbnails"]');
let debouncedThumbnailSlider = $.debounced(function () {
    if ($(productThumbnails).hasClass('slick-initialized')) {
        $(productThumbnails).css('opacity', 0).removeClass('slick-slider slick-vertical slick-initialized');
    }

    $(productThumbnails).on('init', function (event, slick) {
        $(event.target).css('opacity', 0);
        setTimeout(function () {
            $(event.target).css('opacity', 1);
        }, 50);
    });

    $(productThumbnails).not('.slick-initialized').slick({
        draggable: false,
        infinite: false,
        slidesToScroll: 5,
        slidesToShow: 5,
        vertical: true,
        verticalSwiping: true,
        responsive: [
            {
                breakpoint: 768,
                settings: {
                    slidesToScroll: 4,
                    slidesToShow: 4,
                    vertical: false,
                    verticalSwiping: false
                }
            }
        ]
    });
}, 250);


/**
 * Update Display When Attribute Machine Fires
 */
MivaEvents.SubscribeToEvent('variant_changed', function () {
});

@influxweb influxweb added this to the v1.0.1 milestone Jul 22, 2019

@influxweb influxweb self-assigned this Jul 22, 2019

influxweb added a commit that referenced this issue Jul 24, 2019

v1.0.1
This maintenance release addresses all issues contained in the v1.0.1 milestone. https://github.com/mivaecommerce/readytheme-colossus/milestone/1?closed=1

This closes #1, closes #2, closes #3, closes #4, closes #5, closes #6, and closes #7
@influxweb influxweb referenced this issue Jul 24, 2019

@influxweb influxweb closed this in #8 Jul 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.