New Landing How can we help? Themeforest Theme Support Neighborhood How to open affiliate links in new window?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #42940
    cambeetle
    Member
    Post count: 4

    Hi,

    Could you tell me if it’s possible to have the affiliate link on product pages open in a new window? If it’s not a built in function, could you let me know what file needs to be tweaked in order to do so?

    Thanks!

    #43271
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    Edit /woocommerce/single-product/add-to-cart/external.php line 15 to:

    <p class="cart"><a href="<?php echo esc_url( $product_url ); ?>" rel="nofollow" class="single_add_to_cart_button button alt" target="_blank"><?php echo apply_filters('single_add_to_cart_text', $button_text, 'external'); ?></a><?php echo sf_wishlist_button(); ?></p>
    

    Hope that helps.

    – Ed

    #76309
    robintee
    Member
    Post count: 45

    Hey Cam,

    What plugin do you use for affiliate products? I’m interested in doing this too?

    Robin.

    #76482
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    It is built in with WooCommerce, set the product type as an affiliate product

    – Kyle

    #76706
    robintee
    Member
    Post count: 45

    Hey Kyle, greatly appreciated.

    Is it possible to change the hyperlink to go to the external link rather than product info page?

    OR

    Can I change the featured image to hyperlink to the external link.

    #76725
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    You would have to install the ‘page links to’ plugin and forward the product page to the external product

    – Kyle

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register