Home › Forums › Themes Support › Gecko › Link 'Quick-view' button to the product
- This topic has 10 replies, 2 voices, and was last updated 7 years, 9 months ago by smartz.
-
AuthorPosts
-
-
March 24, 2017 at 5:19 pm #2552
Hi!
It’s possible to link the ‘Quick View’ button in the archive products directly to the product page?
Thank you!
-
March 24, 2017 at 5:40 pm #2553
Hello,
You can add below code to gecko-child > functions.php and activate gecko-child theme.
After activate child theme you need re arrange widget in Appearance > Widgets to correct sidebar area
add_action( 'woocommerce_after_shop_loop_item', 'jas_gecko_child_remove_parent_theme_quickview', 0 ); function jas_gecko_child_remove_parent_theme_quickview() { remove_action( 'woocommerce_after_shop_loop_item', 'jas_gecko_wc_add_buton' ); } function jas_gecko_child_wc_add_buton() { global $post, $jassc; $product_url = get_permalink( $post->ID ) ; // Get product hover style $hover_style = $jassc ? $jassc['hover-style'] : cs_get_option( 'wc-hover-style' ); if ( $hover_style == 1 ) { // Quick view echo '<a class="cp pr br-36 mb__10" href="' . $product_url . '"><i class="fa fa-eye mr__10"></i>' . esc_html__( 'Quick View', 'gecko' ) . '</a>'; // Wishlist echo jas_gecko_wc_wishlist_button(); } elseif ( $hover_style == 2 ) { // Quick view echo '<a class="cp pr bs-36" href="' . $product_url . '"><i class="fa fa-eye"></i><span class="tooltip pa cw fs__12 ts__03">' . esc_html__( 'Quick View', 'gecko' ) . '</span></a>'; // Wishlist echo jas_gecko_wc_wishlist_button(); } } add_action( 'woocommerce_after_shop_loop_item', 'jas_gecko_child_wc_add_buton' );
Best regards
- This reply was modified 7 years, 9 months ago by Harry.
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
March 24, 2017 at 6:12 pm #2554
Hi,
thank you for your quickly answer.
This fix remove the eye icon.
I need preserve the icon but links directly to the product-page and not to ‘lightbox’ quick-view.
Thanks!
-
March 24, 2017 at 6:59 pm #2555
Hi, you change product listing hover style in JanStudio > theme options > woocommerce > product listing > hover style to style 1 or style 2,
i check on my local it still show eye icon and link to product detail page.
if still have issue pls send us your website url, temporary admin account as private reply
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
March 24, 2017 at 10:13 pm #2556
Hello Harry,
I have the hover style 2. When I click in the eye, I view the detail page, but in a pop-up.
I need a link to the URL of the product.
It’s possible?
Sorry for my english level.
Regards
-
March 24, 2017 at 10:29 pm #2557
You need active gecko-child, if still have issue please send us your site url and admin account as private reply.
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
March 24, 2017 at 10:51 pm #2558This reply has been marked as private.
-
March 24, 2017 at 11:00 pm #2560
I checked your site and saw comment code “/* “. And i lost a line of code sent you.
I removed comment and update code. now it work, you can check it.we really appreciate if you take a time to help us rate for our theme 5 stars at https://themeforest.net/downloads
Thanks & best regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
March 24, 2017 at 11:05 pm #2561
Yes, I have commented it. I don’t know why now works!
It’s cache or magic!?
I’ve rated your theme wit 5 stars long ago.
Thank you so much!
Have a nice weekend!
-
March 24, 2017 at 11:16 pm #2562
The code i sent you lost a line
add_action( ‘woocommerce_after_shop_loop_item’, ‘jas_gecko_child_wc_add_buton’ );
So it does not work, i updated code so it run now.
Which your name on ThemeForest rated for us? I checked “smartz” but don’t see.
Anyway, thank you so much!
Have a nice weekend, too 🙂
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
March 24, 2017 at 11:18 pm #2563
Ah, ok!
My name in Themeforest is Huzebio. 😉
Thanks!!!
-
-
AuthorPosts
You must be logged in to reply to this topic.