• Resolved zxctypo

    (@zxctypo)


    Really like the plugin. I’m on version 4.4 apparently, but it wasnt an option.
    Here are the problems and solutions I’ve found:

    1. One of our colors is “Carbon Fiber”. It has a space- which is a problem because your data-woovsi attribute removes them. Changed
    $color = v.toLowerCase() on line 464 to $color = v.toLowerCase().replace(' ', ''); . May have missed some places, but is at least working now.

    2. When first visiting the page, for some reason an attribute is already ‘selected’ and hides the images, even though ‘Select an option’ is selected (i.e nothing is actually selected). This also
    – Am working on fix, maybe.

    3. Product gallery images with NO selected variation are hidden. This is not a good idea as if they have no selection, I believe it logical to have them Always be visible, i.e a nutrition label which is the same for each different color of a lolly pop.
    – Should have fix today

    https://wordpress.org/plugins/smart-variations-images/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author RosendoLabs

    (@drosendo)

    Cool… All help is welcomed since I can only can work on this on my spare time… 😉

    Leave a review and if you do have files changes send it to me I will review it and put your name in as contributor.

    Leave a review 😉

    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

    Plugin Author RosendoLabs

    (@drosendo)

    Anything new?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problems & Fixes’ is closed to new replies.