EN

Visibility & Display Rules — RUTHH COD Form & Upsells

Configure Settings → Visibility (/app/settings) and Form Builder → Form Designer (/app/form-builder) to control where the COD form appears, whether product-page orders include existing Shopify cart items, which products or collections are eligible for Cash on Delivery, and how native Shopify buttons behave.

  • The Theme App Embed (cod-app-embed) is enabled on your theme.
  • Your store products and collections are published to the Online Store channel.

1. Choose Popup vs Embedded Mode (formType)

Section titled “1. Choose Popup vs Embedded Mode (formType)”
  1. Navigate to Form Builder → Form Designer (/app/form-builder).
  2. In the Form Type card, select one of the two supported modes:
    • Popup (POPUP): Places a customizable COD trigger button on eligible product pages, cart pages, and cart drawers. Clicking the button opens the modal COD form. You can also toggle Show product page offers (showProductPageOffers) to render Quantity Offers inline on the product page before the buyer opens the popup.
    • Embedded (EMBEDDED): Renders the full COD order form inline inside the product page layout instead of behind a popup trigger button.

2. Set Display Surface & Order Contents Mode

Section titled “2. Set Display Surface & Order Contents Mode”
  1. Navigate to Settings → Visibility (/app/settings).
  2. Under Form Display (displaySurface), choose where the COD experience is active:
    • Product and cart pages (PRODUCT_AND_CART — canonical default)
    • Product pages only (PRODUCT_ONLY)
    • Cart page only (CART_ONLY)
    • Disabled (DISABLED — immediately stops storefront mounting and rejects COD quotes/orders on the server with DISPLAY_DISABLED)
  3. Under Order Contents (orderContents), choose how product-page COD orders are constructed:
    • Current product + Cart items (CURRENT_PRODUCT_PLUS_CART — canonical default; combines the currently selected PDP variant with any items already in the buyer’s Shopify cart)
    • Current product only (CURRENT_PRODUCT_ONLY — submits only the product and quantity selected on the current product page, ignoring existing cart items)

3. Configure Product & Collection Targeting

Section titled “3. Configure Product & Collection Targeting”
  1. In Settings → Visibility (/app/settings), locate the Product & Collection Targeting section.
  2. Use the Shopify Resource Picker buttons to select:
    • Included Products (includeProductGids — up to 100 products)
    • Excluded Products (excludeProductGids — up to 100 products)
    • Included Collections (includeCollectionGids) and Excluded Collections (excludeCollectionGids — up to 25 collections combined across both lists)
  3. Understand the strict server and storefront evaluation precedence:
    • Rule 1 — Exclude Always Wins: Any product in excludeProductGids or belonging to a collection in excludeCollectionGids is never eligible (PRODUCT_EXCLUDED), even if it also appears in an include list.
    • Rule 2 — Union of Includes: If both include lists are empty, all non-excluded products are eligible. If either include list has entries, a product must be in includeProductGids OR be a member of a collection in includeCollectionGids (PRODUCT_NOT_INCLUDED).
    • Rule 3 — Mixed Cart Rule: Every base product in an order must be eligible. A single ineligible item in a cart makes the entire order ineligible for COD.

4. Set Minimum & Maximum Order Value Bounds

Section titled “4. Set Minimum & Maximum Order Value Bounds”
  1. In Settings → Visibility, locate Order Value (orderValue).
  2. Enter an optional Minimum Subtotal (minSubtotalMinor) and/or Maximum Subtotal (maxSubtotalMinor) in your shop currency.
  3. Click Save in the SaveBar. Bounds are inclusive and evaluated against the authoritative merchandise subtotal (after Quantity Offer or bundle discounts, before shipping, fees, and taxes).

5. Configure Native Button Hiding with Fail-Safe Guard

Section titled “5. Configure Native Button Hiding with Fail-Safe Guard”
  1. In Settings → Visibility, locate Native Shopify Buttons (buttons):
    • Hide Shopify Checkout button (hideCheckoutButton — cart page and cart drawer)
    • Hide Add to Cart button (hideAddToCartButton — product page)
    • Hide Buy Now / Dynamic Checkout button (hideBuyNowButton — product page)
  2. Toggle the desired options and click Save.
  • No Overlap Allowed: A single Product GID cannot be added to both Include and Exclude product lists, and a Collection GID cannot appear in both Include and Exclude collection lists. Contradictory configurations are rejected at save/parse time.
  • Order rejected with MIXED_PRODUCTS_NOT_ALLOWED: This occurs if displaySurface is set to PRODUCT_ONLY and orderContents is set to CURRENT_PRODUCT_ONLY, but a request attempts to submit more than one distinct base product.
  • Order rejected with SUBTOTAL_BELOW_MINIMUM or SUBTOTAL_ABOVE_MAXIMUM: Remember that subtotal bounds apply to the discounted merchandise subtotal (after Quantity Offers), not the pre-discount compare-at price or shipping total.