• Hi Team

    This is the error:

    jquery.min.js?ver=3.6.0:2 Uncaught TypeError: Cannot read properties of undefined (reading ‘length’)
    at HTMLDocument.<anonymous> (frontend.js?ver=20160615:106)
    at e (jquery.min.js?ver=3.6.0:2)
    at t (jquery.min.js?ver=3.6.0:2)

    I see an uncaught type error, maybe when product is not variable in: asset/js/frontend.js line 106

    /*--------------------------------------*/
    		  var price_element 	= '',
    		  	  
    			  variation_id 		= '';
    		if( $(".variations_form").attr("data-product_variations").length ){
    			var product_attr      = jQuery.parseJSON( $(".variations_form").attr("data-product_variations") );
    		}else{
    			var product_attr      = '';
    		}
    		 $('input.variation_id').change( function(){
    			
    			
    			 if( $(smart_variable.__price_update_on).length ){
    				 price_element = smart_variable.__price_update_on;
    				 
    			 }else{
    				 price_element = '.' + smart_variable.__price_update_on;
    				 
    			 }
    			
    			 if( $(this).parents('li.product').length ){
    				
    				 price_element   = $(this).parents('li.product').find( price_element );
    				 product_attr    =   jQuery.parseJSON( $(this).parents('li.product').find(".variations_form").attr("data-product_variations") );
    				 
    				 variation_id  =  $(this).parents('li.product').find('input.variation_id').val() ;
    				 
    			 }else{
    				 variation_id   = $('input.variation_id').val(); 
    			 }

    Can you help me?

    The page I need help with: [log in to see the link]

  • The topic ‘JS error Cannot read properties of undefined (reading ‘length’)’ is closed to new replies.