Visibility & Display Rules — RUTHH COD Form & Upsells
Goal and Expected Result
Section titled “Goal and Expected Result”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.
Preconditions
Section titled “Preconditions”- The Theme App Embed (
cod-app-embed) is enabled on your theme. - Your store products and collections are published to the Online Store channel.
Numbered Instructions
Section titled “Numbered Instructions”1. Choose Popup vs Embedded Mode (formType)
Section titled “1. Choose Popup vs Embedded Mode (formType)”- Navigate to Form Builder → Form Designer (
/app/form-builder). - 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.
- Popup (
2. Set Display Surface & Order Contents Mode
Section titled “2. Set Display Surface & Order Contents Mode”- Navigate to Settings → Visibility (
/app/settings). - 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 withDISPLAY_DISABLED)
- 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”- In Settings → Visibility (
/app/settings), locate the Product & Collection Targeting section. - Use the Shopify Resource Picker buttons to select:
- Included Products (
includeProductGids— up to100products) - Excluded Products (
excludeProductGids— up to100products) - Included Collections (
includeCollectionGids) and Excluded Collections (excludeCollectionGids— up to25collections combined across both lists)
- Included Products (
- Understand the strict server and storefront evaluation precedence:
- Rule 1 — Exclude Always Wins: Any product in
excludeProductGidsor belonging to a collection inexcludeCollectionGidsis 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
includeProductGidsOR be a member of a collection inincludeCollectionGids(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.
- Rule 1 — Exclude Always Wins: Any product in
4. Set Minimum & Maximum Order Value Bounds
Section titled “4. Set Minimum & Maximum Order Value Bounds”- In Settings → Visibility, locate Order Value (
orderValue). - Enter an optional Minimum Subtotal (
minSubtotalMinor) and/or Maximum Subtotal (maxSubtotalMinor) in your shop currency. - 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”- 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)
- Toggle the desired options and click Save.
Warnings and Edge Cases
Section titled “Warnings and Edge Cases”- 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.
Troubleshooting Steps
Section titled “Troubleshooting Steps”- Order rejected with
MIXED_PRODUCTS_NOT_ALLOWED: This occurs ifdisplaySurfaceis set toPRODUCT_ONLYandorderContentsis set toCURRENT_PRODUCT_ONLY, but a request attempts to submit more than one distinct base product. - Order rejected with
SUBTOTAL_BELOW_MINIMUMorSUBTOTAL_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.