Browse Plugins

Real-World Example: Custom T-Shirt Shop

Let me walk you through a COMPLETE, realistic example from start to finish. You’re selling custom t-shirts and need dynamic pricing based on style, size, print type, quantity, and add-ons. Here’s exactly how to set it up:

📋 STEP 1: Basic Info Tab

  • Calculator Name: Custom T-Shirt Price Calculator
  • Description: Configure your custom t-shirt and get an instant price quote
  • Assignment Strategy: Category Calculator
  • Select Categories: Check “Custom T-Shirts” and “Apparel”
🎨 STEP 2: Fields Tab – Create Your Input Fields

Click “Add Field” for each one and configure like this:

Field #1: T-Shirt Style (Dropdown)

  • Field Type: Dropdown
  • Label: “Choose Your T-Shirt Style”
  • Field Key: tshirt_style
  • Required: Yes
  • Options:
    • Basic Cotton (value: basic, price: 0) – This is our base
    • Premium Soft Blend (value: premium, price: 5)
    • Vintage Distressed (value: vintage, price: 8)
Field #2: Size (Dropdown)

  • Field Type: Dropdown
  • Label: “Select Size”
  • Field Key: size
  • Required: Yes
  • Options:
    • Small (value: s, price: 0)
    • Medium (value: m, price: 0)
    • Large (value: l, price: 0)
    • XL (value: xl, price: 2)
    • 2XL (value: 2xl, price: 4)
    • 3XL (value: 3xl, price: 6)
Field #3: Print Type (Radio Buttons)

  • Field Type: Radio Buttons
  • Label: “Choose Print Method”
  • Field Key: print_type
  • Required: Yes
  • Options:
    • Screen Print (value: screen, price: 0) – Standard option
    • Direct-to-Garment (value: dtg, price: 3) – Better quality
    • Vinyl Heat Transfer (value: vinyl, price: 5) – Premium option
Field #4: Quantity (Number Input)

  • Field Type: Number Input
  • Label: “How Many T-Shirts?”
  • Field Key: quantity
  • Required: Yes
  • Min Value: 1
  • Max Value: 500
  • Default Value: 1
  • Price Per Unit: 0 (we’ll handle quantity in the formula)
Field #5: Rush Order (Checkbox)

  • Field Type: Checkbox
  • Label: “Rush Order (2-Day Production)”
  • Field Key: rush_order
  • Required: No
  • Price if Checked: 15
Field #6: Gift Packaging (Checkbox)

  • Field Type: Checkbox
  • Label: “Add Gift Packaging”
  • Field Key: gift_packaging
  • Required: No
  • Price if Checked: 5
Field #7: Design File (File Upload)

  • Field Type: File Upload
  • Label: “Upload Your Design (PNG, JPG, PDF)”
  • Field Key: design_file
  • Required: Yes
  • Allowed File Types: .png, .jpg, .jpeg, .pdf, .ai
  • Max File Size: 10MB
Field #8: Special Instructions (Text Area)

  • Field Type: Text Area
  • Label: “Any Special Instructions? (Optional)”
  • Field Key: special_notes
  • Required: No
  • Max Length: 500 characters

💰 STEP 3: Formula Tab – Set Up Your Pricing Logic

This is where the magic happens! Here’s how to configure the formula:

Base Price:

$15 (This is the starting price for a basic t-shirt with screen print)

Base Price:

Enter: $15

Formula:

Enter this formula using basic math operators (+, -, *, /):

(15 + tshirt_style + size + print_type + rush_order + gift_packaging) * quantity

🧮 How The Formula Works:

The formula uses your field keys directly to reference their values. Just type the field key name as-is — no special characters needed. Here’s what each part means:

  • 15 = Base price for any t-shirt
  • tshirt_style = Adds $0 for Basic, $5 for Premium, or $8 for Vintage
  • size = Adds $0 for S/M/L, $2 for XL, $4 for 2XL, $6 for 3XL
  • print_type = Adds $0 for Screen, $3 for DTG, or $5 for Vinyl
  • rush_order = Adds $15 if checked, $0 if not checked
  • gift_packaging = Adds $5 if checked, $0 if not checked
  • quantity = The number customer enters (multiplies the whole total)
📊 Example Calculation:

Customer orders: Premium Soft Blend, XL, DTG Print, Quantity 3, with Rush Order

(15 + 5 + 2 + 3 + 15 + 0) * 3
= 40 * 3
= $120 TOTAL

Breakdown:

  • 15 = base price
  • 5 = premium t-shirt
  • 2 = XL size
  • 3 = DTG print
  • 15 = rush order
  • 0 = no gift packaging
  • × 3 = quantity of 3 shirts
💡 Formula Tips:

  • Use field keys directly in your formula — just type the key name as-is (e.g. quantity, not {quantity})
  • Field keys must match EXACTLY what you set in the Fields tab (case-sensitive!)
  • You can use: + (add), – (subtract), * (multiply), / (divide)
  • Use parentheses () to control order of operations
  • Checkboxes return their price value if checked, 0 if unchecked
  • Number fields return whatever number the customer enters

⚙️ STEP 4: Settings Tab

  • Status: Active
  • Priority: 1 (default is fine unless you have multiple calculators)
  • Hide Quantity Selector: Yes (because we’re handling quantity in our calculator)
💾 STEP 5: Save & Assign

  • Click “Save Calculator”
  • Since we chose “Category Calculator” in Step 1, it’s already assigned to your Custom T-Shirts category
  • Go to any product in that category and boom – your calculator is live!
✅ STEP 6: Don’t Forget!

Remember the TWO critical requirements from the Common Issues section:

  • Your calculator HAS fields (we added 8!) ✅
  • Your WooCommerce product MUST have a base price set (go to each product and set regular price to any number like $10 – the calculator will replace it) ✅

🎉 Result:

Your customers now see a beautiful, modern calculator that walks them through choosing their t-shirt style, size, print method, and quantity. The price updates in real-time as they make selections. When they hit “Add to Cart”, the custom price and ALL their selections are saved with the order!