“Are you sure you want to do this?”

If you tried to install PDF Catalog for WooCommerce and instead of a successful installation message you saw something like the image above don’t panic. It just means you uploaded the wrong zip file. The file you downloaded from CodeCanyon contains more than just the plugin. To install the plugin, unpack the zip file and inside you’ll find a folder called plugin, inside you’ll find 2 zip files, pdfcatalog.zip and pdfcatalog2.zip. pdfcatalog2.zip is what you need to install in 99% of the cases. pdfcatalog.zip is the older pure PHP version of the plugin and is offered in case you have a restricted environment which won’t let calls to web services.

How to add product IDs next to product titles

Some stores use product ID as an SKU in which case its necessary to display the product ID on the catalog itself. Here’s how do to that:

This is the quick way – ideally this shouldn’t be done on included templates directly but on your own templates in your child theme directory.

Assuming you are using the Vertical Thumbnail List template. Open wp-content/plugins/pdfcatalog2/templates/pdf/thumbnaillist/product.php

Search for <?php echo $post->post_title ?>  (should be around line 10 but varies depending on which plugin version is installed). Right before </h2> on the same line add the following:

(<?php echo $post->ID; ?>)

It should look like this:

<h2 class="product_title">
<a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $post->post_title ?></a> (<?php echo $post->ID; ?>)</h2>

Save the file, clear the PDF cache and you should now see the product IDs next to each product title.


How to show free products only in PDF Catalog for WooCommerce

This requires customisation to the core plugin and your changes will be replaced next time the plugin is updated so beware that you will need to re-apply.

  1. Find and edit the file pdfcatalog2/classes/PDFCatalogGenerator.php
  2. Search for $loop = new \WP_Query($args);
  3. Paste the following code right before that line:
    $args['meta_query'][] = array(
           'key' => '_price',
           'value' => '',
           'compare' => '='
  4. Save the file and delete any cached catalogs from the Cache tab in the plugin’s settings.
  5. Refresh the catalog and only products without any price will show up.