Conditional Upsell/Downsell depending on product bought?

First. note: I’m using Funnelish Plus builder (not clickfunnels).

On my checkout I offer bundles: get 1, get 2 and get 3.
How can I set up an Upsell/Downsell which is only shown to people who bought 1, but not 2 nor 3 packages?

Essentially I want to set up a subscription Upsell, but don’t want to show it to people who bought more than one.

This “conditional Upsell” would be No3 upsell. Meaning I already have 1 Upsell, and 1 Downsell set up which I want everyone to see.

But the 3rd Upsell I only want people who bought just 1 unit to see.

Hopefully that makes sense.

How could I achieve this?

1 Like

Anyone’s got any insights on this?

Thanks for reviving this thread @Vtkv , here is how to do the above:

Step 1: Checkout code

Add this code as it is into your Checkout page (Custom Codes > Body JS):

        let ids = [...document.querySelectorAll(`input[name="product-id"]:checked`)].map(x=>x.value)
        localStorage.setItem("_all_selected_products", JSON.stringify(ids))

The code above will store the currently selected product(s) into localStorage, that way we know what the customer bought in the next steps.

Step 2: Upsell(s) code

Add this code into the Upsells/Downsells you want to skip (only).


// Change the line below to include your product IDs from the checkout page, when any of the product IDs
// mentioned were bought the code will automatically redirect to the given STEP_URL_TO_JUMP_TO URL.
const CHECKOUT_PRODUCT_IDS_TO_SKIP = ["216171","another product id here...etc"];

// Here provide the next step URL you'd like to take your customers to when skipping the current one.
const STEP_URL_TO_JUMP_TO = "my next upsell or thank you page to go though when skipping the current one.";

try {
    let idsStr = localStorage.getItem("_all_selected_products")
    if (idsStr) {
        let ids = JSON.parse(idsStr)
        if (ids.find(x=>CHECKOUT_PRODUCT_IDS_TO_SKIP.find(y=>x===y))) {
            window.location = STEP_URL_TO_JUMP_TO      
} catch {}

Hope that helps, do let me know if the code does not work or facing any issues…


1 Like