/**
 * Shows default product sort bar content
 *
 */
function show_default_product_sort_bar($archive_template, $multiple_settings = null)
{
    if (get_option('old_sort_bar') == 1) {
        show_product_order_dropdown($archive_template, $multiple_settings = null);
    } else {
        if (current_user_can('edit_theme_options')) {
            $show = get_option('hide_empty_bar_message', 0);
            if ($show == 0) {
                global $is_filter_bar;
                $is_filter_bar = true;
                echo '<div class="product-sort-bar ' . design_schemes('box', 0) . '">';
                echo '<div class="empty-filters-info">';
                echo '<h3>' . __('Product Filters Bar has no widgets', 'ecommerce-product-catalog') . '</h3>';
                $current_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
                $customize_url = add_query_arg(array('url' => urlencode($current_url), urlencode('autofocus[panel]') => 'widgets'), wp_customize_url());
                echo sprintf(__('Add widgets to the filters bar %snow%s or %sdismiss this notice%s.', 'ecommerce-product-catalog'), '<a href="' . $customize_url . '">', '</a>', '<a class="dismiss-empty-bar" href="#">', '</a>');
                echo '</div>';
                echo '</div>';
                unset($is_filter_bar);
            }
        }
    }
}
Example #2
0
 function widget($args, $instance)
 {
     if (get_integration_type() != 'simple') {
         $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
         echo $args['before_widget'];
         if ($title) {
             echo $args['before_title'] . $title . $args['after_title'];
         }
         // Use current theme search form if it exists
         show_product_order_dropdown();
         echo $args['after_widget'];
     }
 }
 function widget($args, $instance)
 {
     if (get_integration_type() != 'simple') {
         if (!empty($instance['shortcode_support']) && has_show_products_shortcode() || (is_ic_taxonomy_page() || is_ic_product_listing())) {
             $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
             echo $args['before_widget'];
             if ($title) {
                 echo $args['before_title'] . $title . $args['after_title'];
             }
             // Use current theme search form if it exists
             show_product_order_dropdown(null, null, $instance);
             echo $args['after_widget'];
         }
     }
 }