Shopify Cart Transform
Enable dynamic percentage-based warranty pricing with the Cart Transform function.
Shopify Cart Transform
The Cart Transform function enables percentage-based warranty pricing. When a warranty plan is priced as a percentage of the product price (e.g., 10%), this function calculates and applies the correct warranty price at checkout based on the actual product variant price.
How It Works
Warranty variants in Shopify carry a placeholder price. The actual price depends on which product the customer is buying:
- Product A costs $500 with a 10% warranty = $50 warranty price
- Product B costs $1,000 with a 10% warranty = $100 warranty price
The Cart Transform function runs during cart evaluation, calculates the correct percentage-based price for each warranty line item, and adjusts the price before the cart total is displayed.
Enable or Disable
- Go to Dashboard → Settings → Integrations → Cart Transform
- Toggle the Cart Transform function on or off
Enable when:
- You use percentage-based warranty pricing
- Warranty price should scale with product price
Not needed when:
- All warranty plans use fixed pricing
Troubleshooting
| Problem | Solution |
|---|---|
| Warranty prices show placeholder values | Activate the Cart Transform function |
| Cart Transform fails to activate | Verify your Shopify plan supports Shopify Functions |
| Prices not updating after activation | Clear the widget cache or wait for automatic invalidation |
| Function errors in checkout | Check Shopify admin → Settings → Functions for error logs |
Related
- Shopify Integration — Overall Shopify connection setup
- Shopify Checkout Extensions — Checkout warranty display
- Widget Configuration — Widget display and pricing options
- Creating Warranty Plans — Configure percentage-based pricing