diff --git a/commerce_popular_products.module b/commerce_popular_products.module index 7fcd05fefb4495eb919bf45ffaa215d9b6687045..3db59e504462d9b87b0e17da964ea57e5a6d36b2 100644 --- a/commerce_popular_products.module +++ b/commerce_popular_products.module @@ -186,13 +186,14 @@ function commerce_popular_products_settings_form($form, &$form_state) { $number = variable_get('commerce_popular_products_number', $default = '1'); $products = variable_get('commerce_popular_products_products'); $title = variable_get('commerce_popular_products_title', 'Popular Products This Month'); + $product_types = commerce_popular_products_get_product_types(); $form['block_title'] = array( '#type' => 'textfield', '#title' => t('Block title.'), '#description' => t('The title of the "popular products" block as shown to users.'), '#default_value' => $title, ); - if (isset($products)) { + if (isset($product_types)) { $form['product_types'] = array( '#type' => 'checkboxes', '#title' => t('Product Types.'),