-
AuthorPosts
-
May 18, 2017 at 1:53 pm #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?
May 18, 2017 at 8:05 pm #796124Hey Konstlist16,
Looks like it does not show, because there is an error in /enfold-child/js/woocommerce-mod.js file, please check.
Best regards,
VictoriaMay 19, 2017 at 9:35 am #796426Ok, and what do you recommend me to do?
May 19, 2017 at 10:49 am #796469Hi 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,
VictoriaMay 24, 2017 at 9:15 am #798786Yes, 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?
May 25, 2017 at 6:27 pm #799699Hi 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,
VictoriaMay 31, 2017 at 9:42 am #801896The problem is solved with help from this thread. Thanks!
May 31, 2017 at 10:25 pm #802231Hi,
Glad that you found the solution. Thanks for using Enfold :)
Best regards,
Nikko -
AuthorPosts
- The topic ‘Problem with number of item in cart icon’ is closed to new replies.