The Weevio Shopify Widget offers extensive configuration options to match your business needs. This section covers all available settings, from basic feature toggles to advanced customizations.
Configuration Overview
Widget configuration is controlled through the window.weevioWidgetConfig JavaScript object in your Shopify theme. This object is created when you install the widget and can be customized to enable features, adjust behavior, and integrate with your store.
Configuration Location
The widget configuration is located in your Shopify theme's product template where you pasted the widget code:
<script>
window.weevioWidgetConfig = {
// Configuration options here
};
</script>
Configuration Sections
Required Configuration
These settings are automatically generated and required for the widget to function:
{
shopifyDomain: '{{ shop.permanent_domain }}', // Your Shopify domain
teamID: 'your_team_id', // From Weevio Cloud
baseURL: 'https://cloud.weevio.co', // Weevio API endpoint
productId: '{{ product.id | json }}', // Current product
variantId: '{{ product.selected_or_first_available_variant.id | json }}',
productType: '{{ product.type | json }}', // Product type
widgetType: 'product-page', // Widget context
}
Important: Don't modify these values unless instructed by Weevio support.
Feature Flags
Enable or disable specific widget features:
{
// Cross-sell recommendations
enableCrossSell: false, // true to enable
// Improved variant selector
enableImprovedVariantSelection: false, // true to enable
}
Feature Configuration
Configure how features behave:
{
// Customer ID for B2B pricing
customerId: '{{ customer.id | json }}',
// Storefront API token for variant selection
storefrontAccessToken: '',
// Shipping estimates configuration
shippingEstimates: {
enableDeliveryEtas: true,
enableLocalPickupEtas: true,
useStaticZipCode: false // or "12345"
},
}
Optional Customization
Fine-tune widget behavior:
{
// Custom add-to-cart button class
addToCartButtonClass: 'product-form__submit',
// Custom error message for invalid variants
invalidVariantMessage: 'This combination is not available.',
}
Configuration Methods
1. Basic Setup
Essential configuration to get started quickly. See Basic Setup Guide.
2. Advanced Configuration
Detailed customization for specific use cases. See Advanced Configuration Guide.
3. Configuration Examples
Pre-built configurations for common business models. See Configuration Examples.
Configuration by Feature
Improved Variant Selection
{
enableImprovedVariantSelection: true,
storefrontAccessToken: 'shpat_xxxxx',
invalidVariantMessage: 'This combination is not available.',
}
Requirements:
- Storefront API access token
- Storefront API scopes enabled
Learn more about Variant Selection →
Shipping Estimates
{
shippingEstimates: {
enableDeliveryEtas: true, // Show delivery estimates
enableLocalPickupEtas: true, // Show local pickup (Premium)
useStaticZipCode: false // Dynamic zip or "12345" for static
},
}
Requirements:
- Feature purchased in Weevio Cloud
- USPS credentials (Premium plan)
Learn more about Shipping Estimates →
Cross-Sell Recommendations
{
enableCrossSell: true,
}
Requirements:
- Feature purchased
- PIMS product associations
- Products tagged with
crossSell: true
B2B Wholesale Pricing
{
customerId: '{{ customer.id | json }}', // For logged-in customers
}
Requirements:
- B2B API key configured
- Customer price lists in Shopify
- Customer tags for PunchOut
Learn more about B2B Pricing →
Configuration Best Practices
Testing Changes
When modifying configuration:
- Test in dev environment first (if available)
- Make one change at a time
- Clear browser cache after changes
- Test on multiple devices (desktop, mobile)
- Verify with different customer types (public, B2B, PunchOut)
Version Control
Keep track of configuration changes:
- Document changes in your changelog
- Use theme version control
- Backup before major changes
- Test rollback procedures
Performance
Configuration affects performance:
- Enable only needed features - Reduces API calls
- Use static zip for B2B - Faster than dynamic
- Cache configuration - Browser caches config object
- Monitor load times - Check impact of changes
Security
Protect sensitive information:
- Never expose API keys in frontend
- Use Liquid variables for customer data
- Validate input in configuration
- Test for XSS vulnerabilities
Configuration Scenarios
Choose the scenario that matches your business:
B2C E-Commerce Store
Focus on conversion optimization and customer experience.
Recommended features:
- Improved Variant Selection
- Premium Shipping Estimates
- In-Stock Recommendations
- Cross-Sell
See B2C configuration example →
B2B Wholesale Store
Focus on customer-specific pricing and streamlined ordering.
Recommended features:
- B2B Pricing
- Basic Shipping Estimates (static zip)
- Multi-Source Inventory
- Cross-Sell
See B2B configuration example →
Hybrid B2B/B2C Store
Support both retail and wholesale customers on one platform.
Recommended features:
- All features enabled
- Dynamic pricing based on customer type
- Conditional feature display
See Hybrid configuration example →
Enterprise with PunchOut
Integrate with procurement systems for large organizations.
Recommended features:
- PunchOut Commerce
- B2B Pricing
- Multi-Source Inventory
- All customer experience features
See Enterprise configuration example →
Troubleshooting Configuration
Configuration Not Applied
Check:
- Syntax errors in JavaScript object
- Missing commas between properties
- Liquid syntax errors
- Browser console for errors
Features Not Working
Check:
- Feature purchased in Weevio Cloud
- Feature flag set correctly (true vs. false)
- Required credentials configured
- API connections active
Performance Issues
Check:
- Too many features enabled
- API response times slow
- Large product catalog
- Network connectivity
See the Troubleshooting Guide for detailed solutions.
Configuration Tools
Browser Console
Use browser console to inspect configuration:
// View current configuration
console.log(window.weevioWidgetConfig);
// Check specific setting
console.log(window.weevioWidgetConfig.enableCrossSell);
// Verify fromIdentity
console.log(sessionStorage.getItem('weevio_fromIdentity'));
Weevio Cloud Dashboard
Monitor configuration status:
- Feature purchase status
- API connection health
- Usage analytics
- Error logs
Configuration Documentation
Detailed Guides
Quick start guide for basic widget configuration.
Advanced customization options and performance optimization techniques.
Pre-built configurations for common business scenarios.
Quick Reference
- Installation Guide - Initial setup
- Features Documentation - Feature details
- Troubleshooting Guide - Common issues
Next Steps
Choose your path based on experience level:
Getting Started:
Advanced Users:
Need Help?
Questions about configuration?
- Review Configuration Examples
- Check Troubleshooting Guide
- Contact Weevio support with your configuration and questions
Need Help?
For assistance, please send a message to our Support page.