• louislampers

    (@louislampers)


    Hello,

    I am building an affiliate site with woocommerce that does not use single product pages. I direct people to product archive or product listings in woo commerce and my ideal is that whenever they click on the button, image, or titile they are directed to the affiliate page.

    All of my products are listed as external/affiliate products but that is only making them link via the button. The image and title in the product archive (the widget form) still clicks through to a single product listing. I want the title and image to redirect to the external link like the button does.

    Any plug in for this? Or code I can add so that the product and title use the external link noted for the product?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Ideally you’d want to directly replace the single product URLs with affiliate URLs. (as opposed to some sort of redirect scheme) How to do that depends on how the URLs are output. If get_permalink() is used for example (I’m guessing it’s used, IDK), you could use the “post_type_link” filter to alter single product page URLs.

    To determine how links are actually output, examine the related template and source code for Woo product archives. If you have difficulty determining what code is used, I suggest seeking help through WooCommerce’s dedicated support forum. Or if you’ve purchased any Woo themes or extensions, try their customer support channel.

    Once you’ve determined how to replace URLs, how would this code know what link to use instead? Is it available as a product attribute or something? Once again, Woocommerce support could suggest how you could save such information and how filter code could retrieve it to change the link URLs.

Viewing 1 replies (of 1 total)
  • The topic ‘affiliate products to open direct from Product archive’ is closed to new replies.