Checkout Gift Extension
The primary checkout extension for AutoCart — evaluates rules, manages gifts, and handles cart mutations at checkout.
Overview
The autocart-checkout-gift extension is the primary checkout UI extension for AutoCart. It runs inside Shopify's checkout where merchants can position it within the checkout flow.
This extension supersedes the deprecated checkout extension. All new installations should use this extension.
Key Features
- Rule re-evaluation at checkout — Re-evaluates all automation rules with checkout-specific context (customer tags, payment method, delivery groups)
- Two display modes —
bannerandsliderfor presenting gift options - Modal gift picker — Full modal UI for customers to select gift products or variants
- Auto-clean expired rules — Automatically removes products from rules that have expired or been deleted
- Schedule support — Rules can have start and end dates
- Storefront rule preservation — Optionally keeps products added by storefront-only rules without re-evaluating them
- Discount code application — Automatically applies discount codes associated with rules
- Auto-remove products — Can remove specific products from the cart when rules match
- Debug mode — Logs all evaluations and conditions to the console
How It Works
- Activation check — Verifies the merchant's plan includes checkout features
- Fetch automations — Retrieves all active automation rules
- Scope filtering — Keeps only rules scoped to
checkoutorglobal - Build input — Constructs an input object from cart lines, cost, customer, attributes, discount codes, payment options, and delivery groups
- Rule evaluation — For each automation, evaluates the rule conditions against the input
- Cart mutations — Based on rule results, adds/removes products, applies discounts, or presents the gift picker modal
Next Steps
- Settings Reference — All merchant-configurable settings
- Behavior Deep Dive — Detailed rule evaluation and cart mutation logic