Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #275379

    Pavle L
    Participant

    Hi support,

    I have used shortcodes to display woocommerce recent posts on front page (static page).
    When I click on add to cart, the product is added to shopping cart, but, i dont have any notification.
    In setting for woocommerce i have enabled Enable AJAX add to cart buttons on archives

    So i suppose that notification html doesnt work.

    #275450

    Pavle L
    Participant

    When I switched to default wordpress theme twelvefifteen, everything works.

    After clicking add to cart button, The link tag is generated with class added_to_cart wc-forward.

    I suppose that it is the theme problem.

    Woocommerce status:
    Home URL: [?] http://localhost/root/prodavnicaBasta
    Site URL: [?] http://localhost/root/prodavnicaBasta
    WC Version: [?] 2.3.6
    WC Database Version: [?] 2.3.6
    Log Directory Writable: [?] ✔ C:\xampp\htdocs\root\prodavnicaBasta/wp-content/uploads/wc-logs/
    WP Version: [?] 4.2.2
    WP Multisite: [?] –
    WP Memory Limit: [?] 96 MB
    WP Debug Mode: [?] –
    Language: [?] en_US

    #275484

    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    You could try follow this thread below.

    https://theme.co/x/member/forums/topic/woocommerce-add-to-cart-button-doesnt-work-when-on-the-shop-page/

    Hope it helps. Let us know

    Thanks.

    #277004

    Pavle L
    Participant

    Hi support,

    Ok, i read the post.

    But this is css solution based. My problem isnt styling or visibility.
    The problem is content that is generated when someone click on add to cart. So, the content (by that i mean link – “view cart”) doesnt exist in html.

    #277190

    Nabeel A
    Moderator

    Hi Pavel,

    Please try this, add the following code in your Customizer via Appearance > Customize > Custom > CSS:

    .woocommerce li.product .added_to_cart, .woocommerce-page li.product .added_to_cart {
      display: block;
    }

    then add the following jQuery script via Appearance > Customize > Custom > Javascript

    jQuery(document).ready(function($){
    	$('.button.add_to_cart_button.product_type_simple').click(function(){
    		$('.woocommerce li.product .entry-wrap, .woocommerce-page li.product .entry-wrap').css("top", "-140px");
    		$('.added_to_cart').css("display", "block");
    		
    	});
    });

    Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

    #279571

    Pavle L
    Participant

    Great. It works.

    One question, before inserting this code. On click add to cart, i did not see html for appended view cart link ?

    #279844

    Rad
    Moderator

    Hi there,

    I can’t really confirm that as I can’t check your site directly. How about setting a live demo with login so we could do some investigation.

    Thanks!