Archived topic
Add to cart banner on single product page and on page using WC shortcodes
3 replies · Started by Manuel on December 5, 2021
Hey GP-Team,
I would like to display the "added to cart banner" everywhere when a product is added to the shopping cart. I've already read that to do this, WC AJAX has to be run everywhere (https://generatepress.com/forums/topic/woocommerce-ajax-add-to-cart-on-product-detail-page/).
This works with the plugin https://de.wordpress.org/plugins/woo-ajax-add-to-cart/.
So the product is placed in the shopping cart everywhere without reloading the page. The "added to cart banner" still does not appear.
On the page "Startseite" (in the navigation) I use WC shortcodes.
[product_category columns="1" category="verbands-zeitschrift"]
The "added to cart banner" should appear here in particular.
Is there a simple solution to this? I am thankful for every hint :-)
Best regards and thanks in advance,
Manuel
Hi Manuel,
Can you try adding this PHP snippet and see if it makes any difference on the other pages?
add_filter( 'generate_woocommerce_show_add_to_cart_panel', '__return_true', 10 );
Works!
Thanks a lot, Elvin.
No problem. :)