• Resolved marcus1w

    (@marcus1w)


    Hello,

    How do we increase the amount of upsells products shown on our product page? Currently it’s capped to 3 images, we’d like to extend the amount of product images shown to 5.

    We’ve reached out to our theme support (Flatsome) and they’ve investigated and encountered the same issue on Storefront theme as well.

    Any way to fix this with CSS or PHP code snippet?

    Thanks,
    Marcus

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    * As a recommendation you can check this documentation:
    7 Easy-to-Use Extensions to Boost eCommerce Sales.

    * Regarding custom code to change the number of upsells, please check:
    https://woocommerce.com/document/change-number-of-upsells-output/

    I hope this helps. Let me know if there are any questions.

    • This reply was modified 2 years, 10 months ago by Igor H.
    Thread Starter marcus1w

    (@marcus1w)

    Hello,

    thanks for the quick response.

    This code snippet doesn’t do anything to the amount of upsells showing.

    /**
     * Change number of upsells output
     */
    add_filter( 'woocommerce_upsell_display_args', 'wc_change_number_related_products', 20 );
    
    function wc_change_number_related_products( $args ) {
     
     $args['posts_per_page'] = 1;
     $args['columns'] = 4; //change number of upsells here
     return $args;
    }

    Despite having 4 as an $args it’s still only showing 3.

    Actually when trying to activate it through Code Snippets it says
    Cannot redeclare function wc_change_number_related_products. on line 7

    It was a plugin that interfered with it, resolved. Thanks!

    • This reply was modified 2 years, 10 months ago by marcus1w.
    • This reply was modified 2 years, 10 months ago by marcus1w.

    That’s great! We are glad you solved the issue ??

    Thanks for sharing the solution with everybody.

    I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new one.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display more product images in “upsells”’ is closed to new replies.