Manually Insert the Quickview Button

There are a number of methods that you can use to insert a quickview button into your theme. The different methods give you full control over placement and styling of the quickview buton.

Using PHP

To insert the quickview button into your product loop using PHP, simply add the following to the top of the file where you are inserting the button:

<?php global $jckqv; ?>

Then, to display the button in your loop (or anywhere if you pass the correct Product ID), use the following code:

<?php echo $jckqv->display_button( $product_id ); ?>

Using HTML

To Insert a button anywhere on your WooCommerce website using HTML, simply use the following code:

<a href="" data-jckqvpid="42">Your Link Text</a>
  • The href will be used in the unlikely event that a user has javascript disabled.
  • 42 is the ID of your product to open in the popup.
  • You can use any text, icon or image as the link.

WooCommerce Quickview will work on any element with the data-jckqvpid attribute. For example, you could use a span tag rather than an anchor.

Using the Shortcode

You can use the shortcode to insert a quickview button based on your settings.

[quickview-button product-id="42"]
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.