I am looking to remove the quick view button/link (I can probaly work this out using CSS) but I would like the user to activate the quick view by clicking on the product image and "Select Options" button.
I have transferred your ticket to one of our developers so that he can check if this is possible and give you further info. He’ll be responding to you as soon as he's available for support.
Ps: Can you please provide your site link for our developer to have a look at your site first?
Please add below code to current theme (or child-theme) / functions.php
// remove quick view button
add_filter( 'woosq_button_position', function () {
return '0';
} );
// remove default link open and close
remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
// add quick view link open
add_action( 'woocommerce_before_shop_loop_item', 'woosq_before_shop_loop_item', 9 );
function woosq_before_shop_loop_item() {
global $product;
echo '<div class="woosq-btn" data-id="' . $product->get_id() . '" style="cursor: pointer">';
}
// add quick view link close
add_action( 'woocommerce_after_shop_loop_item', 'woosq_after_shop_loop_item', 99 );
function woosq_after_shop_loop_item() {
echo '</div>';
}
// change the add to cart button
add_filter( 'woocommerce_loop_add_to_cart_link', 'woosq_loop_add_to_cart_link', 99, 2 );
function woosq_loop_add_to_cart_link( $link, $product ) {
return '<span class="button">' . esc_html( $product->add_to_cart_text() ) . '</span>';
}
If have any difficulties, please send me your website info (wp-admin link, username, password) then I can do that for you. You also can create a dev/staging site with the same issue then I'll work on it.
This has kind of solved my problem and improved the situation, but it has also created a couple of issues. I removed:
// change the add to cart button
add_filter( 'woocommerce_loop_add_to_cart_link', 'woosq_loop_add_to_cart_link', 99, 2 );
function woosq_loop_add_to_cart_link( $link, $product ) {
return '<span class="button">' . esc_html( $product->add_to_cart_text() ) . '</span>';
}
So the add to cart button still adds to the basket.
However, this button is not functioning as it did before, as the WC Quick view flashes on and off and the items are not added to the cart instantaneously like they did beforehand.
Also the quantity incremental buttons and number field also call up WC Quick View but I again would like these to function as normal.
On the plus side, the "Select options" button is working as required.
May be the issue here is that the product image, text, price and variable button need to be assigned the WC Quick View functions individually, rather than the whole loop?
That means you still want to use the quantity input and add to cart button for simple products? https://prnt.sc/sk6eaz
I can help you change the code to make it work correctly.
Please send me your website info (wp-admin link, username, password) then I can do that for you. You also can create a dev/staging site with the same issue then I'll work on it.
Hi Frankie, if we could only use this snippet for the coding to resolve the problem (seen in the attachments) then I would be happy to create a staging site.
This is fantastic - works exactly how I wished to. I thoroughly appreciate the time you have spent to do this and will happily leave a review.
I am being a perfectionist now, but I do notice the page scrolls down a little after you close the quick view, is it possible to stop this?
Also when the "add to cart" button is used in quick view the page reloads after adding to the basket - would it be possible for the item to be added to basket within quick view without reloading the page and just closing the box instead without the page reloading?
Many thanks Frankie. The Ajax plugin works really well to prevent the page from reloading.
Regarding the scrolling issue, it only does this for the top row of items. If you scroll down to second row or rows after the scroll bar stays in the same position.
It is odd that it only does this for the first row. Could it be linked to my additional CSS I used to make my body appear under my floating header:
Thank you Frankie. Everything seems to be working as wished for now, I really appreciate your help.
Are you able to complete customisable work with other plugins, as separate service? Perhaps you may be able to help me customise a receipt produced by BizSwoop using the plugin 'Order Receipt Print for WooCommerce Google Cloud Print', happy to pay for this service if possible?
Hello,
I am looking to remove the quick view button/link (I can probaly work this out using CSS) but I would like the user to activate the quick view by clicking on the product image and "Select Options" button.
Is this feature available in your premium plugin?
Kind Regards
Paul
Hi Paul,
Thank you for contacting WPClever Support Forum.
I have transferred your ticket to one of our developers so that he can check if this is possible and give you further info. He’ll be responding to you as soon as he's available for support.
Ps: Can you please provide your site link for our developer to have a look at your site first?
Best regards.
Janilyn T. - WPClever Support Agent
Hi Paul Cox,
Yes, I can help you this feature, but please upgrade the plugin to premium and give us the paypal ID number.
Hi Paul,
Thanks for your purchase!
Please add below code to current theme (or child-theme) / functions.php
If have any difficulties, please send me your website info (wp-admin link, username, password) then I can do that for you. You also can create a dev/staging site with the same issue then I'll work on it.
Best regards,
Dustin
Thank you for your reply Frankie,
This has kind of solved my problem and improved the situation, but it has also created a couple of issues. I removed:
So the add to cart button still adds to the basket.
However, this button is not functioning as it did before, as the WC Quick view flashes on and off and the items are not added to the cart instantaneously like they did beforehand.
Also the quantity incremental buttons and number field also call up WC Quick View but I again would like these to function as normal.
Please visit my website below so you can see:
https://pmcweb.co.uk/gandhi-cosham/product-category/tandoori/
On the plus side, the "Select options" button is working as required.
May be the issue here is that the product image, text, price and variable button need to be assigned the WC Quick View functions individually, rather than the whole loop?
That means you still want to use the quantity input and add to cart button for simple products? https://prnt.sc/sk6eaz
I can help you change the code to make it work correctly.
Please send me your website info (wp-admin link, username, password) then I can do that for you. You also can create a dev/staging site with the same issue then I'll work on it.
Best regards,
Dustin
Hi Frankie, if we could only use this snippet for the coding to resolve the problem (seen in the attachments) then I would be happy to create a staging site.
Kind Regards
Paul
Yes, we can do that!
Best regards,
Dustin
I've changed the code for you. Please check again https://pmcweb.co.uk/gandhiclone/product-category/bread-sundries/
Best regards,
Dustin
This is fantastic - works exactly how I wished to. I thoroughly appreciate the time you have spent to do this and will happily leave a review.
I am being a perfectionist now, but I do notice the page scrolls down a little after you close the quick view, is it possible to stop this?
Also when the "add to cart" button is used in quick view the page reloads after adding to the basket - would it be possible for the item to be added to basket within quick view without reloading the page and just closing the box instead without the page reloading?
#1. About add to cart, I've installed another plugin from us WPC Ajax Add to Cart for WooCommerce and it works fine now. Please check https://pmcweb.co.uk/gandhiclone/product-category/bread-sundries/
#2. About the page scroll down, seem it only happen on your website and I need more time to check it.
Best regards,
Dustin
Many thanks Frankie. The Ajax plugin works really well to prevent the page from reloading.
Regarding the scrolling issue, it only does this for the top row of items. If you scroll down to second row or rows after the scroll bar stays in the same position.
It is odd that it only does this for the first row. Could it be linked to my additional CSS I used to make my body appear under my floating header:
I added this snippet for you https://prnt.sc/sn892n
Please test again https://pmcweb.co.uk/gandhiclone/product-category/bread-sundries/
Best regards,
Dustin
Thank you Frankie. Everything seems to be working as wished for now, I really appreciate your help.
Are you able to complete customisable work with other plugins, as separate service? Perhaps you may be able to help me customise a receipt produced by BizSwoop using the plugin 'Order Receipt Print for WooCommerce Google Cloud Print', happy to pay for this service if possible?
Kind Regards, Paul
You're welcome!
If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating.
----https://wordpress.org/support/plugin/woo-smart-quick-view/reviews/?filter=5
Thank you in advance! <3
About your question about customization work: Sorry, we don't provide this service now. Thanks for asking!
Best regards,
Dustin