• Resolved unknownmale

    (@unknownmale)


    When I click add to cart on a product page I used to see the notification / message bar pop up, this was fine, but for some reason this no longer happens, I just see “View Cart” text appear under the button.

    Could anyone point me in the right direction please?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter unknownmale

    (@unknownmale)

    bump

    Plugin Contributor Julia Amosova

    (@jamosova)

    Hi @unknownmale, would you please send us the link to your site so we could take a look? What theme are you using on the site? It is possible that after an update, something changed in the theme that disabled that popup.

    Thread Starter unknownmale

    (@unknownmale)

    Hi, It’s on my local server right now. Using my own theme, not a child theme and i’m not aware of any changes that would have affected this.

    I was hoping someone would be able to point me in the direction of this function in woocommerce. The notification bar still activates in the cart when changes are made, just for some reason it’s not active when a product is added to cart.

    Just the copy “View cart” appears under the add to cart button.

    Thread Starter unknownmale

    (@unknownmale)

    Deleted message

    • This reply was modified 6 years, 8 months ago by unknownmale. Reason: Error
    Thread Starter unknownmale

    (@unknownmale)

    Ah, I’ve found the issue. It seems to be because I have moved the add to cart button in functions.php using the following;

    
    
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
    
    add_action( 'woocommerce_after_single_product_buttons', 'woocommerce_template_loop_add_to_cart', 50 );

    Is there anyway to move the add to cart button while retaining the notification function?

    Thread Starter unknownmale

    (@unknownmale)

    Again, just figured this out.

    I was using woocommerce_template_loop_add_to_cart where I should have been using woocommerce_template_single_add_to_cart

    Plugin Contributor Julia Amosova

    (@jamosova)

    Hi @unknownmale, great troubleshooting! Looks like you are all set. Can we mark this thread as Resolved?

    Thread Starter unknownmale

    (@unknownmale)

    Yes, all resolved!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add to cart ajax’ is closed to new replies.