woocommerce plugin redirect user to another website when"add to cart" is clicked (7 posts)

  1. bilal616
    Posted 2 years ago #

    Hello guys.
    I am a beginner php developer I have only studied it till loops and now I am stuck on a simple problem.
    I am using a woo-commerce plugin on my affiliate website. Since it is an affiliate site, I want to redirect the user on product's owner page when ever he clicks on the buy button.
    Now in woo-commerce they provide "Add to cart" functionality which I don't want. I have changed the name of "Add to cart" to "Buy" from theme settings now I want to work it like this
    "When ever user will click on it, it should redirect the user to another page instead of adding that item to the cart" for this I also have to add the url in "buy" button every time I add a new product from wordpress's admin pannel.
    Now how am I supposed to do that.

    Thanks in advance.


  2. Roy Ho
    Posted 2 years ago #

    Can't you use the "external" product type? That is exactly what that is for.

  3. bilal616
    Posted 2 years ago #

    What is external product type?
    I don't get you sorry.

  4. Roy Ho
    Posted 2 years ago #

    When setting up the product you can change the product type to external. It is especially designed for affiliate type products.

  5. bilal616
    Posted 2 years ago #

    Thank you soo much. I am definitely trying this one :)

  6. emobshops
    Posted 2 years ago #

    I try and me to fix like what u say to the external, but to me don't work this. When I want to setting up the product type to external, don't let me. Is blocked the function.
    What I have to do?
    I am interested to upload products and the add to cart to go in the link of other website.
    Thank you very much.

  7. lorro
    Posted 2 years ago #

    Before you look for another plugin, check whether the basic WooCommerce plugin can do what you want.

    From the docs: "Adding an external product: Choose ‘External/Affiliate product’ from the "Product data" dropdown which is on the product page under the edit description box. This will remove unnecessary tabs such as tax and inventory and insert a new product URL field. This is the destination at which users can purchase the product. Rather than add to cart buttons, they will see a read more button directing them to this URL."

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic