Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15825

    Hi, please can you assist, I have just installed the latest version of the theme and not made any mods but I am getting this firebug error, ReferenceError: product_variations is not defined, here is the page, http://tinyurl.com/cplbqfb

    #89166

    Open up propulsion/woocommerce-config/woocommerce-mod.js and search for following function:

    function variation_adjustment(select_el)

    Delete the entire function and replace it with following code:

    function variation_adjustment(select_el)
    {
    var selects = jQuery(select_el);

    //unify select dropdowns
    selects.each(function()
    {
    var el = jQuery(this);

    el.bind('change', function()
    {
    setTimeout(function(){
    var currentVariationId = jQuery('input[name="variation_id"]').val();
    var productid = jQuery('input[name="product_id"]').val();
    if ( !productid || !currentVariationId ) return;

    var currentvariation = window["product_variations_" + productid].filter(function (currentvariation) { return currentvariation.variation_id == currentVariationId });

    if(typeof currentvariation[0] == "undefined" || !currentvariation[0]) return;

    var imglink = currentvariation[0].image_link;

    if(imglink){
    jQuery('.slideshow li a img').each(function()
    {
    var imgscr = jQuery(this).attr("src");

    if(imglink == imgscr || imglink.replace(/-d+xd+./, ".") == imgscr.replace(/-d+xd+./, ".")){
    var index = jQuery(this).parents('li').index();
    var container = jQuery(this).parents('.slideshow_container');

    if (index != 0){
    container.find('.slideshow li a:eq(0)').css( "display", "none" );
    }

    var controls = container.next('.thumbnails_container'),
    thumbs = controls.find('.slideThumb');

    thumbs.removeClass('activeslideThumb');
    var current = jQuery('.numeric_controls a:eq('+index+')').addClass('activeslideThumb');
    container.find('.numeric_controls a:eq('+index+')').trigger('click');

    if (index != 0){
    setTimeout(function(){
    container.find('.slideshow li a:eq(0)').css( "display", "block" );
    }, 1500);
    }

    }

    });
    }

    }, 100);
    });

    });
    }

    #89167

    That did the trick, thanks so much!

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

The topic ‘Firebug Error product variations’ is closed to new replies.