Restrictions
The Restrictions tab allows you to create rules that automatically disable certain lens options when specific conditions are met. This prevents customers from selecting combinations that are physically incompatible, unavailable, or technically impossible.
What Are Restrictions?
Section titled “What Are Restrictions?”Restriction rules follow a simple pattern:
When [specific option is selected] → Disables [these other options]
For example:
- When Bifocal lens type is selected → Disable Transitions lenses
- When Ultra-thin High-Index package is selected → Disable Budget tints
- When Driving lens colour is selected → Disable Progressive varifocal type
Each restriction rule includes:
- Reason/Description: A message shown to customers explaining why options are unavailable
- ID: A unique identifier for the rule (auto-generated from the reason)
- Trigger Conditions (When): The options that activate this restriction
- Disabled Options (Disables): The options that become unavailable when triggered
Creating a Restriction Rule
Section titled “Creating a Restriction Rule”Step 1: Add a New Rule
Section titled “Step 1: Add a New Rule”- Navigate to SpecCart > Settings > Restrictions
- Click the Add Rule button in the top-right corner
- A modal editor will open
Step 2: Enter Reason and ID
Section titled “Step 2: Enter Reason and ID”-
Reason / Description (required): Enter a clear, customer-friendly message explaining why options are disabled
- Good: “Not available with bifocal lenses”
- Good: “This tint is incompatible with ultra-thin lenses”
- Bad: “Restriction 1” (too vague)
-
ID (required): Auto-generated from your reason as a URL-friendly slug
- Example: “Not available with bifocal lenses” becomes
not-available-with-bifocal-lenses - You can edit this when creating a new rule, but it cannot be changed later
- Must be unique across all restriction rules
- Example: “Not available with bifocal lenses” becomes
Step 3: Select Trigger Conditions (When)
Section titled “Step 3: Select Trigger Conditions (When)”Choose at least one option that will trigger this restriction. The restriction applies when any of the selected options are chosen by the customer.
Available condition categories:
- Lens Usage: Distance, Reading, Varifocal
- Varifocal Types: Standard, Premium, Elite, etc.
- Lens Colours: Clear, Tinted, Photochromic options
- Lens Packages: Budget, Standard, Premium bundles
Example:
- If you select Bifocal and Trifocal under Varifocal Types, the restriction triggers when either bifocal or trifocal is selected
Step 4: Select Disabled Options (Disables)
Section titled “Step 4: Select Disabled Options (Disables)”Choose at least one option that will be disabled when the restriction triggers.
Available disabled option categories:
- Lens Usage: Distance, Reading, Varifocal
- Varifocal Types: Standard, Premium, Elite, etc.
- Lens Colours: Clear, Tinted, Photochromic options
- Transition Colours: Specific transition lens colours
- Sunglasses Tints: Specific sunglass tint options
- Lens Packages: Budget, Standard, Premium bundles
- Add-ons: Blue light blocking, scratch resistance, anti-reflection coatings
Example:
- To prevent all transitions lenses with bifocals, select all transition colours under Transition Colours
Step 5: Save the Rule
Section titled “Step 5: Save the Rule”- Review your selections
- Click Add Rule (or Save Changes if editing)
- The rule appears in the restriction list
Example Use Cases
Section titled “Example Use Cases”Example 1: Bifocals Don’t Support Transitions
Section titled “Example 1: Bifocals Don’t Support Transitions”When: Varifocal Type = Bifocal Disables: All Transition Colours Reason: “Transition lenses are not available with bifocal lenses”
Result: When a customer selects bifocal lenses, all transition colour options become disabled and greyed out, with the reason displayed.
Example 2: Budget Package Excludes Premium Tints
Section titled “Example 2: Budget Package Excludes Premium Tints”When: Lens Package = Budget Package Disables: Specific high-end Sunglasses Tints Reason: “Premium tints are only available with Standard or Premium packages”
Result: Customers who choose the budget package cannot select premium tint options.
Example 3: Reading Lenses Can’t Be Varifocal
Section titled “Example 3: Reading Lenses Can’t Be Varifocal”When: Lens Usage = Reading Disables: All Varifocal Types Reason: “Reading lenses use a single prescription and cannot be varifocal”
Result: Selecting reading usage disables all varifocal type options.
Example 4: Certain Colours Incompatible with Packages
Section titled “Example 4: Certain Colours Incompatible with Packages”When: Lens Colour = Driving Yellow Disables: Lens Package = Budget, Lens Package = Ultra-Thin Premium Reason: “Driving yellow is only available with our Standard and Premium packages”
Result: When the driving yellow colour is selected, certain packages are removed from the available options.
Managing Existing Rules
Section titled “Managing Existing Rules”Viewing Rules
Section titled “Viewing Rules”The restriction list displays all active rules with:
- Reason: The customer-facing message
- ID: The unique rule identifier (in a grey badge)
- When: Summary of trigger conditions (e.g., “Varifocal: Bifocal | Lens Usage: Reading”)
- Disables: Count of disabled options (e.g., “3 option(s)“)
Editing a Rule
Section titled “Editing a Rule”- Click the Edit button (pencil icon) next to the rule
- The restriction editor modal opens with the current values pre-filled
- Make your changes
- Click Save Changes
Deleting a Rule
Section titled “Deleting a Rule”- Click the Delete button (trash icon) next to the rule
- A confirmation dialog appears: “Are you sure you want to delete the restriction [reason]?”
- Confirm to permanently delete the rule
Deleted rules are removed immediately. There is no undo. The restriction will no longer apply to customer configurations.
How Restrictions Work in the Configurator
Section titled “How Restrictions Work in the Configurator”When a customer uses the lens configurator:
- They select options step by step (lens type, material, coatings, etc.)
- As they make selections, SpecCart checks all restriction rules
- If a rule’s When conditions match their selection, the rule activates
- All options listed in that rule’s Disables section become:
- Greyed out and unselectable
- Marked with the restriction reason you provided
- If the customer changes their selection and the rule no longer applies, the options become available again
This happens in real-time as they configure their lenses, preventing invalid combinations before they add to cart.
Best Practices
Section titled “Best Practices”Write Customer-Friendly Reasons
Section titled “Write Customer-Friendly Reasons”Your restriction reasons appear directly in the configurator. Write them for customers, not staff.
- Good: “Bifocal lenses cannot be combined with transition technology”
- Bad: “Lab restriction BF-TR-001”
- Good: “This tint requires the Premium package or higher”
- Bad: “Invalid combination”
Test Your Rules
Section titled “Test Your Rules”After creating restrictions:
- Open a lens product on the frontend
- Go through the configurator
- Verify the restriction triggers correctly
- Confirm the disabled options display properly
- Check that the reason message is clear
Organize Rules Logically
Section titled “Organize Rules Logically”Use consistent naming patterns for rule IDs and reasons:
bifocal-no-transitionsinstead ofrule-1premium-tints-require-premium-packageinstead ofrestriction-new
This makes rules easier to manage as your catalog grows.
Avoid Over-Restricting
Section titled “Avoid Over-Restricting”Only create restrictions when combinations are truly impossible or unavailable. Over-restricting limits customer choice and may frustrate shoppers. If an option is just less common but still technically possible, consider leaving it available.
Document Internal Reasons
Section titled “Document Internal Reasons”While the “Reason” field is customer-facing, keep internal documentation about why restrictions exist:
- Lab equipment limitations
- Optical physics constraints
- Business decisions (package differentiation)
This helps when onboarding new staff or reviewing rules later.
Troubleshooting
Section titled “Troubleshooting””At least one trigger condition is required”
Section titled “”At least one trigger condition is required””You didn’t select any options in the When (Trigger Conditions) section. Select at least one option category and check at least one option within it.
”At least one disabled option is required”
Section titled “”At least one disabled option is required””You didn’t select any options in the Disables (Affected Options) section. Select at least one option category and check at least one option within it.
Rule Doesn’t Seem to Work on Frontend
Section titled “Rule Doesn’t Seem to Work on Frontend”- Verify the rule is saved (check the Restrictions list)
- Confirm the When conditions match what the customer is selecting
- Check that the options you’re trying to disable actually exist and are enabled
- Clear any caching plugins or browser cache
- Test in an incognito window
Customer Sees “Not Available” But Reason Doesn’t Display
Section titled “Customer Sees “Not Available” But Reason Doesn’t Display”Verify your restriction reason is filled in. Empty reasons may cause display issues. Edit the rule and ensure the reason field contains a customer-friendly message.
Related Settings
Section titled “Related Settings”- Lens Usage: Configure the lens type options that restrictions can affect
- Packages: Define lens packages that can trigger or be disabled by restrictions
- Colours: Configure colour and tint options that restrictions can apply to