Let’s face it, your customer’s want to know all about your products as quickly as possible. Offering them a quickview option is the ideal way to solve this issue.
Using our WooCommerce Quickview plugin, you can easily insert a customisable Quickview button on all products in your WooCommerce store. Not only that, but if you’re handy with a bit of code, you can also trigger Quickview from any element in your HTML.
Output a Quickview Button Using PHP
In your PHP template, make sure the global quickview variable is at the top of the file. This gives you access to the Quickview methods.
Then, simply add the following code to output a Quickview button (styled based on the Quickview settings):
<?php $jckqv->display_button( $product_id ); ?>
$product_id is the ID of the product you want to show a Quickview button for.
Add a Quickview Trigger to any HTML Element
You can also add a Quickview trigger to any element by using a data-attribute on your HTML element. For example, to add it to an image:
<img src="/your-image.jpg" data-jckqvpid="<?php echo $product_id; ?>">
$product_id is the ID of the product you want to show a Quickview button for. You could also just enter the ID manually, but chances are you want things a little dynamic.
Wrap it up
So there’s a few methods for adding Quickview to anything. It truly is a great tool for any eCommerce store, and you’ve likely seen it in use in many popular themes. For example, our plugin is actually used in the Atelier theme. If you’ve seen it in use elsewhere, or have used it yourself in a premium theme, do let us know – we love to see it in the wild!