Tagged: x
-
AuthorPosts
-
July 18, 2016 at 8:18 am #1091820
Hi
I’ve searched the forum and Google, but can’t find a solution.
It seems that the products results count doesn’t work when there is only 1 page of results. The paragraph still shows with the borders, but there is no content. When there are more results it displays correctly with “Showing x-y of z results”.
I shared the website and login details in a previous post (https://community.theme.co/forums/topic/layout-within-slider-not-working/#post-1090124).
An example is if you go to click on the CBD category or a filter.
Please let me know if you need any further information.
Thanks!
July 18, 2016 at 8:29 am #1091833Hi there,
Pleas update your theme and plugins as this may fix your issue.
Thanks.
July 18, 2016 at 10:59 am #1092040Hi,
I’ve updated everything, but the problem’s still the same unfortunately.
Any help would be appreciated.
July 18, 2016 at 2:23 pm #1092325Hi There,
Upon checking your setup, it is showing the complete shop list or product list.
Would you mind confirming if it is okay already. Please clear your site and browser cache upon checking.
Thanks.
July 18, 2016 at 5:47 pm #1092546Hi
I cleared my browser cache and it’s still not showing when there is 1 page of items, whether I use the filter or click on the CBD category.
I also checked in another browser which I hadn’t used for the site before.
July 19, 2016 at 1:23 am #1092993Hi There,
I can see that it is just a square and missing the content. The content of that box should be Showing all 7 results. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time. If not a plugin conflict, please do switch from your child theme to your main X theme. Just so we can check that this is not a result of any customization. Don’t forget to save a backup of your site before doing this. If it shows after that, you can activate the child theme again but this time, add each file or function one by one so we can see which one was causing the issue.
Do let us know how this goes.July 19, 2016 at 6:05 am #1093277Hi
I deactivated all plugins and removed the child theme, but the text still didn’t show.
Please let me know what else I can do to fix it.
Thanks!
July 19, 2016 at 8:12 am #1093425Hi There,
Do you have a caching on your hosting? This might be cache.
The code responsible for this can be found here:wp-content\plugins\woocommerce\templates\loop\result-count.php. We don’t have any customization regarding this part and it is complete woocommerce. This is the entire content:<?php /** * Result Count * * Shows text: Showing x - x of x results. * * This template can be overridden by copying it to yourtheme/woocommerce/loop/result-count.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } global $wp_query; if ( ! woocommerce_products_will_display() ) return; ?> <p class="woocommerce-result-count"> <?php $paged = max( 1, $wp_query->get( 'paged' ) ); $per_page = $wp_query->get( 'posts_per_page' ); $total = $wp_query->found_posts; $first = ( $per_page * $paged ) - $per_page + 1; $last = min( $total, $wp_query->get( 'posts_per_page' ) * $paged ); if ( $total <= $per_page || -1 === $per_page ) { printf( _n( 'Showing the single result', 'Showing all %d results', $total, 'woocommerce' ), $total ); } else { printf( _nx( 'Showing the single result', 'Showing %1$d–%2$d of %3$d results', $total, '%1$d = first, %2$d = last, %3$d = total', 'woocommerce' ), $first, $last, $total ); } ?> </p>
The code responsible for that part is this:
printf( _n( 'Showing the single result', 'Showing all %d results', $total, 'woocommerce' ), $total );
It’s on line 39. Please check if it’s the same.
Hope this helps.
July 19, 2016 at 4:30 pm #1094210Hi
I changed that line, based on the next line, to :
printf( _n( ‘Showing the single result’, ‘Showing all %d results’, $total, ‘%d = total’, ‘woocommerce’ ), $total );
and now it’s showing. The variable %d wasn’t defined.
Thanks so much for your help!
July 19, 2016 at 9:07 pm #1094638You’re most welcome! Glad you got it to work!
August 4, 2016 at 5:16 am #1117058This reply has been marked as private.August 4, 2016 at 5:18 am #1117061This reply has been marked as private.August 4, 2016 at 10:34 am #1117393Hey There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– WordPress Admin username / password
Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
-
AuthorPosts