Okay
  Public Ticket #3065380
header cart count not updated
Closed

Comments

  • Fabien started the conversation

    Hi, i have a problem with the cart count in the header. When i had a product to my cart the number in the header won't update. the base theme is medici.

  •  310
    Andrea replied

    Please provide us FTP credentials and Back Office access of your site.

    We will handle the problem to help you.

    Best Regards,

    Andrea - FieldThemes Support Team

  • Fabien replied

    hi, sorry i canno't give ftp credentials for now. i' know a little about prestashop developpement, maybe you can give me the steps to do it. thank you!



  •  310
    Andrea replied

    Hi
    Can you tell us what theme you are using, in what version and what version of prestashop you are using?
    Thank you

    Best Regards,

    Andrea - FieldThemes Support Team

  • Fabien replied

    it's ok i finaly find a solution modifying the ps_shoppingcart.js changing this:

                            if (resp.products_count)
                            {
                                $('.cart-products-count').text(resp.products_count);
                                if(resp.products_count>1){
                                    $('.cart-products-txt').addClass('d-none');
                                    $('.cart-products-txt-s').removeClass('d-none');
                                }
                                else{
                                    $('.cart-products-txt-s').addClass('d-none');
                                    $('.cart-products-txt').removeClass('d-none');
                                }
                            } else {
                                $('.cart-products-count').text(0);
                            }


    TO


              if (resp.preview) {
                $("#_desktop_cart").replaceWith(resp.preview);
              } else {
                //$('.cart-products-count').text(0);
              }


    thks!



  •  310
    Andrea replied

    Hi Fabien,
    Looks like you solved the problem.
    If there is another problem, you can send us feedback, we will check it for you.
    Thank you for using our theme

    Best Regards,

    Andrea - FieldThemes Support Team