• Resolved phillbex

    (@phillbex)


    Thanks for a great plugin.

    We have noticed that on a number of the pages, the incorrect number of recommended products are being displayed.

    For example on the page in the link, we have added two related products, yet only one product is shown, if you refresh the page a few times, you will eventually see the other product but it still only shows one product.

    In the back end, I have configured “Number of products to display on a page” to 5 for desktop, 2 for tablet and 1 for mobile.

    I look forward to hearing from you.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter phillbex

    (@phillbex)

    For anyone else having this problem, I figured out what was wrong (although I am not sure why it caused a problem). For clarity it wasn’t that only 1 recommended product was shown, it was always 1 less than was specified.

    I had unchecked “Override theme’s template” as I wanted to use my themes markup and styling. There was a filter in my functions.php file for woocommerce_output_related_products_args which changed the posts_per_page argument to -1 as I wanted to show all related products (in my own slider). The problem was caused by this setting as setting it to an artibary number i.e. 18 made the correct number of related products be shown. Obviously now I am only showing a maximum of 18 products but that is plenty.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @phillbex,

    Greetings from WebToffee Support!

    Thank you for reaching out to us and for your kind words about our plugin.

    After reviewing the information provided regarding the issue you’re experiencing with the display of related products, we would like to address a few key points.

    Upon investigating the provided product page link, it appears that the related products widget being displayed is not generated by our plugin. This discrepancy could be due to the ‘Override theme’s template’ setting being disabled, causing the theme’s related products widget to be used instead of our plugin’s.

    Additionally, you mentioned that there is a filter in your theme’s functions.php file (woocommerce_output_related_products_args) that modifies the ‘posts_per_page’ argument to display all related products. This custom code in your theme might be conflicting with the settings in our plugin, resulting in an incorrect number of related products being displayed.

    To address this issue, we recommend enabling the ‘Override theme’s template’ option and checking the functions.php file of your theme. Review the code related to the ‘woocommerce_output_related_products_args’ hook. If this hook is overriding the number of products to display, you may need to comment out or remove that section of code to allow our plugin’s settings to take effect.

    Additionally, please verify whether the ‘Exclude out of stock products’ and ‘Exclude Backorder products’ options are enabled in the plugin’s main settings. If they are enabled, ensure that the products added to display in related products are not in these stock statuses, as this could also affect the display of related products.

    If the issue still persists after making the necessary changes and checking these plugin settings, kindly provide us with the following information:

    1. Screenshot of the plugin’s main settings page and a screenshot of the custom related product settings you have configured in the product edit page: This will give us insight into your current configuration and help identify any potential issues.
    2. WooCommerce System Status report: You can access this report in WooCommerce by navigating to WooCommerce -> Status -> Get system status report. This will provide details about your site environment.

    We appreciate your patience and cooperation in resolving this matter. Please let us know if you need any further assistance.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi?@phillbex,

    We haven’t heard back from you for a while. As this thread has been inactive for some time, we are marking it as resolved.

    If you require any further assistance, please reach out to us using a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not showing all related products’ is closed to new replies.