External Products Open in New Window
Allow an option where external/affiliate products open up in a new tab/window when clicking the buy button.
We’re not going to build this because there’s a perfectly good one for free on WordPress.org: https://wordpress.org/plugins/woocommerce-improved-external-products/
José Luis Muro Porras commented
1. Install Simple Custom CSS and JS plugin.
2. Add custom JS: jQuery( '.product-type-external .button, .product-type-external .form' ).attr( 'target', '_blank' );
3. That's all, stop editing! Happy blogging.
I support the implementation of this idea as a standard feature of Woocommerce. The use of a plugin to achieve this simple but important setting, in my opinion, has proven to be highly unsatisfactory. Most concerning was that the plugin I used slowed my site and caused the CPU load at the server end to max out. Is it difficult for Woocommerce to install this idea as core in a future update? I really hope that it will happen soon.
please add this functionality to the plugin.
This should be added to the core - the plugins partially support the various themes - Woocommerce should own this such that the capability is theme agnostic.
Reid Tech commented
This really should be in core. Requiring a plugin to add target="_blank" to external product links, really?
Please reconsider this. It seems quite absurd to me.
Based on comments below I found and just installed https://wordpress.org/plugins/wc-external-product-new-tab/ and it works perfectly!!! Followed instal instructions here: https://wordpress.org/plugins/wc-external-product-new-tab/#installation and took a few seconds to make happen. Wonderful!!! Thank you!!
I think you should build it and make it a default. Make woocommerce perfect without counting on wp.
Subhabrata Chowdhury commented
Firstly I tried https://wordpress.org/plugins/woocommerce-improved-external-products/ this plugin, but it was working only in the product page , not in the shop page..i found another plugin https://wordpress.org/plugins/wc-external-product-new-tab/ which is awesome . Exactly what i wanted. It is working in both product & shop page.
Anyone want to test a plugin I wrote for this?
Stuart Duff commented
Here is another free alternative that opens all WooCommerce external product links in a new tab.
hi Patrick, this plugin https://wordpress.org/plugins/woocommerce-improved-external-products/ IS NOT WORKING!!! we have used and tested. it only opens tabs from the product page NOT home page. install is and test it, you will see what i am men. i contacted to the programmer and even he could not do it. this plugin is falsely advertised. everyone keep showing this plugin without ever testing it!!!
Please have add a functionality to the WooCommerce to have an ability to open Affiliate / External links in a new browser tab window.
Leon Wagner commented
That plugin doesn't work any more. It used to, but latest version won't even activate on WP 4.6.1.
Hey admin, this https://wordpress.org/plugins/woocommerce-improved-external-products/ is NOT WORKING the way it's expected. before you made a comment did you ever install it and test it???
how do you even knwo that its perfect for what been asked! even the maker of this plugin told us that NO it will NOT work for external/affiliate pages open in blank page, and upon our recommendations for 90 hours he then realize his plugin is not working!!!!
Based on what assumption and prove do you even say YES to that question about this plugin?!!?!
@sander - the plugin has not become paid. It has free features (open a product in a new tab and customize your button html) and then paid features that cost money because they are difficult to support. Additional features will be coming to both the free and paid version later this summer.
Maybe now it is time to build the function? The free plugin has become a paid plugin.
That plugging doesn't work with my theme, and I don't know how to edit HTML codes. I would appreciate if the woo commerce plugging already has that option... Thanks!
@Admin: Don't you think using additional plugin for such a simple thing increases server requests and loading time just because of their js and css?
Lyubo Kostadinov commented
Para que abra los enlaces en ventanas diferentes has de hacer 2 cosas:
1º Edita: woocommerce/templates/single-product/add-to-cart/external.php
--> Modifica la línea 16:
<a href="<?php echo esc_url( $product_url ); ?>" target="_blank" rel="nofollow"
2º Edita: woocommerce/templates/loop/add-to-cart.php
--> Modifica la línea 15:
sprintf( '<a href="%s" target="_blank"