Home Forums WoodMart support forum Increase Cross Sells from 4 to 8

Increase Cross Sells from 4 to 8

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #155257

    jeromecurtin
    Participant

    Hi,

    Scratching my head on this one.

    Have tried to use a function like this:

    add_filter(‘woodmart_cross_sells_products_per_view’,’woodmart_cross_sells_products_per_view_count’, 10, 1);

    function woodmart_cross_sells_products_per_view_count( $val ) {
    return 8;
    }

    But it’s not working.

    The current base of 4 refers to the columnns and not the output. I have increased the columns but can’t find where you have the integer to only display 4. I want to increase to 8.

    ‘slides_per_view’ => apply_filters( ‘woodmart_cross_sells_products_per_view’, 8 ),

    Any help appreciated

    Jerome

    #155326

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for purchasing our theme and contacting our support center.

    We are checking this in WooCommerce and see that there is no limit for the number of products. Our theme has number of columns filter but the general number of products is not limited by WooCommerce.

    Kind Regards
    XTemos Studio

    #155366

    jeromecurtin
    Participant

    Hi,

    The Cross-sells however in Woodmart are controlled by your OWL Carousel which can’t be overridden using a standard Woocommerce hook.

    There’s no place to increase or decrease the number of cross-sells in the cart-collaterals.

    #155367

    Artem Temos
    Keymaster

    OWL Carousel just changes the view to carousel instead of grid, but it doesn’t change the general number of products. What standard WooCommerce hook do you mean? Could you please send us a screenshot?

    #155386

    jeromecurtin
    Participant

    See attached.

    #155387

    jeromecurtin
    Participant
    #155405

    Artem Temos
    Keymaster

    Could you please send a screenshot how it looks with a standard WordPress theme?

    #155412

    jeromecurtin
    Participant
    #155415

    Artem Temos
    Keymaster

    So the same 4 products are displayed with Twenty Seventeen. What is the difference?

    #155418

    jeromecurtin
    Participant

    Yes, but I can edit that with woocommerce_cross_sells_total in a base theme.

    #155423

    Artem Temos
    Keymaster

    OK, so send us a screenshot when you edit it on default theme and it keeps 4 products with WoodMart.

    #155424

    jeromecurtin
    Participant

    Using the following I can reduce from 4 but not increase them above 4:

    // ———————————————
    // Display all Cross Sells instead of default 4

    add_filter(‘woocommerce_cross_sells_total’, ‘cross_sells_limit’);
    function cross_sells_limit() {
    return 6;
    }

    #155427

    Artem Temos
    Keymaster

    Please, send us a screenshot with default theme when this code is added.

    #155440

    jeromecurtin
    Participant

    It’s breaking all my widgets switching between themes so I’d rather not just so you can prove your point.

    So there’s no way to increase cross sells from 4 to 8 in Woodmart. That is the answer.

    Thanks.

    #155442

    Artem Temos
    Keymaster

    But this number is not related to our theme at all. If you can’t increase it with other themes as well then it is not our theme issue. In addition, that filter can decrease the number only. To increase it, you need to add more cross-sells products. Read WooCommerce documentation about this https://docs.woocommerce.com/document/related-products-up-sells-and-cross-sells/#section-2

Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)