This topic contains 4 replies, has 2 voices, and was last updated by  alessandrovarela 5 months, 4 weeks ago.

Featured Products doesn't appear

  • I have products marked as featured. When I try to use the “Lee Products” component and filter the featured products, the products doesn’t appear. I’m trying on my homepage.

    Screenshot 01Screenshot 2

    My homepage: http://www.basicabranca.com.br

    Tom
    This reply has been marked as private.
    Tom

    Hi,

    did you update woo up to 3.0.x ?

    So you need update lee_framework in file:
    /wp-content/plugins/lee_framework/includes/functions.php

    Find:
    function lt_woocommerce_query_args(…){
    // code
    }

    Edit:

    case 'featured_product':
    $args['ignore_sticky_posts'] = 1;
    $args['meta_query'] = array();
    $args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
    $args['meta_query'][] = array(
    'key' => '_featured',
    'value' => 'yes'
    );
    $args['meta_query'][] = $woocommerce->query->visibility_meta_query();
    break;

    To
    case 'featured_product':
    $args['ignore_sticky_posts'] = 1;
    if (!version_compare($woocommerce->version, '3.0.0', ">=")) {
    $args['meta_query'] = array();
    $args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
    $args['meta_query'][] = array(
    'key' => '_featured',
    'value' => 'yes'
    );
    $args['meta_query'][] = $woocommerce->query->visibility_meta_query();
    } else {
    $args['tax_query'] = $woocommerce->query->get_tax_query();
    $args['tax_query'][] = array(
    'taxonomy' => 'product_visibility',
    'field' => 'name',
    'terms' => 'featured',
    'operator' => 'IN',
    );
    }
    break;

    Hope it can help you

    Tom

    Hi,

    If you are using woo 3.0.x,

    You need update file:
    https://www.dropbox.com/s/04ak3qoraf58db7/woo-functions.php?dl=0
    path: /wp-content/themes/jolie/includes/woo-functions.php

    best regards,
    Tom

    Hi Tom!

    When I updated the file woo-functions.php was solved.

    It would be interesting to release a version of the theme with the updates.

    Thanks!

Tagged: 

You must be logged in to reply to this topic.