Homepage LearnDash Community Forums General (free) Add to cart on .btn-join adds 2 products

  • Add to cart on .btn-join adds 2 products

    Posted by Guillaume on Jul 17, 2022 at 4:43 am

    Hi everyone,

    I’m trying to implement WooCommerce in my LearnDash website.

    I don’t want to use product pages, only course pages. So, I want that, when people click on “Join this course” (when clicking on .btn-join) on course page, it directly adds it to cart.

    So I followed this tut : https://www.learndash.com/support/docs/add-ons/woocommerce/#set-up-your-course, but when I click, it adds 1 product to cart and redirects to home page. So I decided to set the URL to :

    https://website.com/courses/{course-name}?add-to-cart={id}

    in order to stay on the same page, which is very close from working, but the one and only problem is that it adds twice the course to my cart, which is problematic. Any idea ?

    Thanks again for your precious help.

    Guillaume replied 1 year, 8 months ago 1 Member · 1 Reply
  • 1 Reply
  • Guillaume

    Member
    Jul 18, 2022 at 2:09 am

    Hello,

    Just a quick feedback. It’s suddenly working for whatever reason.

    Problem solved.

Forum Rules

The discussion ‘Add to cart on .btn-join adds 2 products’ is closed to new replies.

Forum Rules

Be Kind & Patient

We’re here to learn and/or help each other. Please don’t be mean, rude, or condescending. Treat all members the way you should be treating dogs and your elders—with the utmost love & respect.

External Links

✅ Other websites that add value, help solve problems & contribute to the discussion. ❌ Affiliate links are prohibited. (Site owners may use affiliate links to help support the site.)

Promotion

✅ You may promote your own products/services if they are relevant to an existing discussion. You must disclose your relationship with the product(s).
❌ You may not create new posts simply to promote your products.

Non-LearnDash Topics

❌ General (free) Forum: Only LearnDash-specific topics are allowed.
✅ Premium Forums: You are allowed to post other questions tangentially related to LearnDash. Please use the appropriately named forum. If it doesn’t exist, use the “LearnDash Integrations” forum.

Our Right to Remove

We reserve the right to remove any content, at any time, for any reason. We can also merge one post with another. We will exercise caution when removing content and always try to provide an explanation.