Home › Forums › WoodMart support forum › Increase Cross Sells from 4 to 8
Increase Cross Sells from 4 to 8
- This topic has 14 replies, 2 voices, and was last updated 5 years, 1 month ago by Artem Temos.
-
AuthorPosts
-
November 6, 2019 at 5:54 pm #155257
jeromecurtinParticipantHi,
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
November 7, 2019 at 7:35 am #155326
Artem TemosKeymasterHello,
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 StudioNovember 7, 2019 at 9:25 am #155366
jeromecurtinParticipantHi,
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.
November 7, 2019 at 10:26 am #155367
Artem TemosKeymasterOWL 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?
November 7, 2019 at 10:57 am #155386
jeromecurtinParticipantSee attached.
November 7, 2019 at 10:58 am #155387
jeromecurtinParticipantNovember 7, 2019 at 12:09 pm #155405
Artem TemosKeymasterCould you please send a screenshot how it looks with a standard WordPress theme?
November 7, 2019 at 12:23 pm #155412
jeromecurtinParticipantHere it is in Twenty Seventeen…
https://www.dropbox.com/s/mhz5kg4pewm8nn1/Screenshot%202019-11-07%2012.22.12.png?dl=0
November 7, 2019 at 12:25 pm #155415
Artem TemosKeymasterSo the same 4 products are displayed with Twenty Seventeen. What is the difference?
November 7, 2019 at 12:31 pm #155418
jeromecurtinParticipantYes, but I can edit that with woocommerce_cross_sells_total in a base theme.
November 7, 2019 at 12:46 pm #155423
Artem TemosKeymasterOK, so send us a screenshot when you edit it on default theme and it keeps 4 products with WoodMart.
November 7, 2019 at 12:48 pm #155424
jeromecurtinParticipantUsing the following I can reduce from 4 but not increase them above 4:
// ———————————————
// Display all Cross Sells instead of default 4add_filter(‘woocommerce_cross_sells_total’, ‘cross_sells_limit’);
function cross_sells_limit() {
return 6;
}November 7, 2019 at 12:58 pm #155427
Artem TemosKeymasterPlease, send us a screenshot with default theme when this code is added.
November 7, 2019 at 1:27 pm #155440
jeromecurtinParticipantIt’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.
November 7, 2019 at 1:32 pm #155442
Artem TemosKeymasterBut 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
-
AuthorPosts
Tagged: cross-sells
- You must be logged in to create new topics. Login / Register