Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #795873

    Hi,

    Today I updated to 4.0.7 and now there’s no number of items in the cart icon. Anyone have an solution to this?

    #796124

    Hey Konstlist16,

    Looks like it does not show, because there is an error in /enfold-child/js/woocommerce-mod.js file, please check.

    Best regards,
    Victoria

    #796426

    Ok, and what do you recommend me to do?

    #796469

    Hi Konstlist16,

    Are there any customizations in that script or why do you have it in your child theme? First of all check syntax or validate Javascript from that file. http://codebeautify.org/jsvalidate

    Best regards,
    Victoria

    #798786

    Yes, there is some customizations cause I got problem when selecting quantity. Can I have it in child theme or in the parent?

    I don’t know how to check syntax. I’m a designer, not a developer :)

    Can you help me?

    #799699

    Hi Konstlist16,

    Looks like some code is not there.
    This function is missing there:

    
    function avia_apply_quant_btn()
    	{
    		jQuery(".quantity input[type=number]").each(function() {
    		var number = $(this),
    				max = parseFloat( number.attr( 'max' ) ),
    				min = parseFloat( number.attr( 'min' ) ),
    				step = parseInt( number.attr( 'step' ), 10 ),
    				newNum = jQuery(jQuery('<div />').append(number.clone(true)).html().replace('number','text')).insertAfter(number);
    				number.remove();
    	
    			setTimeout(function(){
    				if(newNum.next('.plus').length === 0) {
    					var minus = jQuery('<input type="button" value="-" class="minus">').insertBefore(newNum),
    							plus    = jQuery('<input type="button" value="+" class="plus">').insertAfter(newNum);
    		
    					minus.on('click', function(){
    						var the_val = parseInt( newNum.val(), 10 ) - step;
    						the_val = the_val < 0 ? 0 : the_val;
    						the_val = the_val < min ? min : the_val;
    						newNum.val(the_val).trigger("change");
    					});
    					plus.on('click', function(){
    						var the_val = parseInt( newNum.val(), 10 ) + step;
    						the_val = the_val > max ? max : the_val;
    						newNum.val(the_val).trigger("change");
    		
    					});
    				}
    			},10);
    		
    		});
    	}
    

    You can find it’s beginning there and add the code.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #801896

    The problem is solved with help from this thread. Thanks!

    #802231

    Hi,

    Glad that you found the solution. Thanks for using Enfold :)

    Best regards,
    Nikko

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Problem with number of item in cart icon’ is closed to new replies.