Dynamic order updates: Add, remove, and customize!

I need to update the order summary dynamically using custom JavaScript code. The functionality should include:

Removing shipping and handling charges based on specific conditions.

Adding or removing products from the order summary as needed.

Could anyone help me implement this?

Hi @Rahul_Gohil :waving_hand: — welcome to the Funnelish community!

You’re on the right track — what you’re trying to achieve is definitely doable with custom JavaScript, and it’s a powerful way to control the checkout experience.

Here’s a high-level approach to get you started:


:brain: Steps to Dynamic Order Summary Updates:

  1. Wait for the page and order data to fully load
    Use a small delay or observe when the DOM and Funnelish scripts are fully ready before manipulating anything.

  2. Identify elements or data structures
    Locate the DOM elements or variables Funnelish uses to render the order summary, shipping, and product items.

  3. Define the condition logic
    Write logic to check your specific conditions — for example, checking the cart total, a product ID, a location, or whether a promo code is applied.

  4. Remove or modify shipping charges
    Based on your condition, dynamically update or hide the shipping section from the summary UI.

  5. Add or remove products
    If you’re adding a bonus item or removing a product, update both the visual DOM and internal Funnelish cart object (if applicable).

  6. Recalculate totals
    Trigger an update to ensure the total reflects the changes — sometimes this involves dispatching events Funnelish listens to.


To guide you more precisely, could you share the checkout layout you’re working with or a reference funnel that shows how you’d like the order summary to behave?

That’ll help me tailor the guidance better and offer next-step suggestions!