Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter zxctypo

    (@zxctypo)

    Fixes for random variation showing on start, or a variation selection not matching up blank:
    @~430, changed to `
    if($(‘div.woosvi_images>a>img,div.images>a>img’).data(‘woovsi’)){
    $primary = $(‘div.woosvi_images>a>img,div.images>a>img’).data(‘woovsi’).toLowerCase().replace(‘ ‘,”);
    if(typeof $primary !== “undefined”){
    $primary = ”;
    }
    }
    `

    And for functionality of when .reset_variations is clicked it setting the original main product image back to the large image. It doesn’t do this if the selected attribute is the default blank one, but I guess this is ok for now. This is a little hacky and can definitely done more generically/better:
    @~38 added this.original_product_image_src = $('.woocommerce-main-image img' ).attr('src');var that = this;

    @~55, inside of form this.on(‘click’, added $('.woocommerce-main-image img' ).attr('src', that.original_product_image_src);

    These need to be tested further, am working on it

Viewing 1 replies (of 1 total)