Variation Add to Cart button reloads entire page. (3 posts)

  1. achsanos
    Posted 3 years ago #

    I'm using a css customized product_page shortcode inserted into a post, because I need to show it in the index.php page (not setted as store and with a cart widget). Works normally except it's not loading dynamically; all the index page reloads and a suffix like "?add-to-cart=variation&product_id=..." is appended in the index page url.

    I want to do something like this: http://www.youtube.com/watch?v=NFmpDhinuCI.

    I know that's using the WooCommerce AJAX add to cart functionality, but I do not know how to make it works.

    Does anybody could help me?

    (This product is a variation type.)


  2. citynode
    Posted 3 years ago #

    Your example link needs to be edited a bit, it isn't going straight to youtube.

    What is the link to your badly-behaving post/product, and the permalink to the product?

  3. achsanos
    Posted 3 years ago #

    Now fixed (sorry). I'm using an offline PHP host, so there's no way to send links. But the central idea is show an Add-To-Cart button (variations product) in the index page, that works dynamically, not reloading the entire page, as the link example. Initially worked properly, but now isn't. Sad.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic