Upsell behavior request – automatic fallback when manual upsells are out of stock

This topic has 2 replies, 2 voices, and was last updated 1 days, 14 hours ago ago by Ayan Rahman

  • Avatar: iceball
    iceball
    Participant
    December 11, 2025 at 07:04

    Hello,

    I need help with the upsell functionality in XStore Single Product Builder.

    Some products have manually assigned upsells, but when those upsell products are out of stock, the theme displays an empty or incomplete upsell section.
    I need the theme to automatically show alternative products from the same category (5–10 items) only when all manually assigned upsells are out of stock.

    In short:

    If manual upsells are valid/in stock → use them

    If all manual upsells are out of stock → automatically load other in-stock products from the same category

    Could you please advise the correct way to implement this in XStore Single Product Builder?

    1 Answer
    Avatar: Ayan Rahman
    Ayan Rahman
    Support staff
    December 11, 2025 at 08:18

    Hi,

    Thank you for reaching out to us.

    We understand that you would like the upsell functionality in the XStore Single Product Builder to automatically display alternative products from the same category when all manually assigned upsells are out of stock.

    Please note that the default theme functionality does not include this specific conditional logic. However, you can achieve the desired behavior by using a custom code snippet. We recommend creating a child theme and adding a custom function that checks the stock status of manually assigned upsells. If all are out of stock, the function can query and display other in-stock products from the same category (limited to 5–10 items).

    If you are not familiar with custom coding, we suggest contacting a professional developer or our customization team for assistance in implementing this feature safely.

    Please note that additional customization is beyond the scope of our basic support.

    Best Regards,
    8Theme’s Team

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.