Hi Emerson,
Thanks for the above, it does fix the majority of the issues.
Our "For Him -> Bondage and SM" and "For Her -> Bondage and SM" categories both have 12 subcategories while only 10 subcategories display by default (which is weird because when displaying products 12 items appear per page).
hidden link (NSFW warning: some nudity)
hidden link (NSFW warning: some nudity)
A drop down page selector appears on these pages but clicking to page 2 just throws an error.
I'm assuming the easier solution would be to find a way to get 12 subcategories displaying so that we don't need pagination however in the future the number of subcategories may grow.
One other thing I've noticed (not sure if you can answer it or whether I should open a separate thread) is that the Store home page isn't correctly applying the views template. It should look the same as the other pages displaying subcategories. See:
hidden link
Dear Grant,
Thanks for the feedback. The reason why it displays only 10 is that a pagination has been enabled for 'Customize Product SubCategory' View (limiting it to 10 items per page). I turned it off so it will display all product sub-categories (e.g. 12 of them and not requiring pagination). Currently as Adriano have pointed out here: https://toolset.com/forums/topic/pagination-issue-with-woocommerce-views-handling-subcategories-2/#post-342095
There is a currently a pending issue with Views pagination (which supposed to work if subcategories are paginated but it's not). For now, we can disable pagination on subcategories. I'll add a bug ticket to Views team regarding this.
For your other issue on shop page template, please open a separate thread. Thanks again 馃檪
Cheers,
Emerson
Dear Grant,
As an update, we found a workaround for the pagination issue. So on these pages you have mentioned, there is now a working pagination at the bottom:
hidden link
hidden link
In cases when are lots of subcategories, you should be able to paginate it now. The current limitation is that a page will need to be refreshed, so you cannot use AJAX type pagination for these subcategories. Also you cannot use a dropdown type of pagination (only hyperlinks).
If you want to change the current pagination right now, simply go to 'Customize Product SubCategory' View then scroll down to 'Loop output'. You should insert your pagination controls in between the 'subcategory_custom_pagination' div class so the custom JS (for pagination you can see it inside JS editor) will work. This is the JS code applied:
jQuery( document ).ready( function( $ ) {
/** Part1: Remove unnecessary pagination texts from WooCommerce */
$('.woocommerce-result-count').remove();
$('.woocommerce-pagination').remove();
$('.woocommerce-ordering').remove();
/** Part 2: Fix pagination on subcategories so it will work */
$('.subcategory_custom_pagination a').removeAttr('class');
$('.subcategory_custom_pagination a').removeAttr('data-page');
$('.subcategory_custom_pagination a').removeAttr('data-viewnumber');
});
For example:
<div class="subcategory_custom_pagination">
[wpv-pager-nav-links ul_class="wpv_pagination_dots" li_class="wpv_pagination_dots_item" current_type="link"]
</div>
This should work for now. Please confirm if this issue is now resolved. Thank you. 馃檪
Cheers,
Emerson
Hi Emerson,
Thanks for this. Very happy with the resolution and everything appears to working correctly.