New Landing How can we help? Themeforest Theme Support Joyn How to decrease checkout page 'you might also like'

Viewing 11 posts - 16 through 26 (of 26 total)
  • Posted in: Joyn
  • #137660
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please find this code:-

    $upsells = $product->get_upsells();
    
    if ( sizeof( $upsells ) == 0 ) return;
    
    $meta_query = $woocommerce->query->get_meta_query();
    
    $args = array(
        'post_type'           => 'product',
        'ignore_sticky_posts' => 1,
        'no_found_rows'       => 1,
        'posts_per_page'      => $posts_per_page,
        'orderby'             => $orderby,
        'post__in'            => $upsells,
        'post__not_in'        => array( $product->id ),
        'meta_query'          => $meta_query
    );
    
    Change to :-
    
    $args = array(
        'post_type'           => 'product',
        'ignore_sticky_posts' => 1,
        'no_found_rows'       => 1,
        'posts_per_page'      => 5,
        'orderby'             => 'rand'
       
    );
    

    Thanks
    Mohammad

    #137661
    mhote
    Member
    Post count: 394

    Success! Thank you very much Mohammad.

    #137663
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome.
    Thanks
    Mohammad

    #162247
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #162251
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    In which file did you make these changes?
    Thanks
    Mohammad

    #162254
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #162263
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please edit up-sells.php file at /joyn/woocommerce/single-product/.
    Thanks
    Mohammad

    #162281
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #162318
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please make changes as i suggested you in previous reply and de-activate cache plugin.

    Thanks
    Mohammad

    #162433
    mhote
    Member
    Post count: 394

    Sorry Mohammad – confused. I can de-activate caching to test this but…

    Which code should I put where?

    #162444
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit up-sells.php file at /joyn/woocommerce/single-product/

    Find this code:-
    
    $upsells = $product->get_upsells();
    
    if ( sizeof( $upsells ) == 0 ) return;
    
    $meta_query = $woocommerce->query->get_meta_query();
    
    $args = array(
        'post_type'           => 'product',
        'ignore_sticky_posts' => 1,
        'no_found_rows'       => 1,
        'posts_per_page'      => $posts_per_page,
        'orderby'             => $orderby,
        'post__in'            => $upsells,
        'post__not_in'        => array( $product->id ),
        'meta_query'          => $meta_query
    );
    
    Change to :-
    
    $args = array(
        'post_type'           => 'product',
        'ignore_sticky_posts' => 1,
        'no_found_rows'       => 1,
        'posts_per_page'      => 5,
        'orderby'             => 'rand'
       
    );

    Thanks
    Mohammad

Viewing 11 posts - 16 through 26 (of 26 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register