Discount Percentage
Discount Percentage
Description: The percentage discount calculated from compare_at_price to current price. Returns 0 if no discount is available.Use case: Sort products by discount amount or filter for products on sale. Create “Biggest Discounts” collections or exclude heavily discounted items from premium merchandising.Attributes: Filterable, Sortable | Value Type: Number (percentage)Example: A product with compare_at_price of 75 has a discount percentage of 25.
Variant Count
Variant Count
Description: The total number of variants for this product. Useful for filtering or sorting by product complexity.Use case: Identify products with many options (high variant count) or single-variant products. Filter out products with too many variants from certain collections.Attributes: Filterable, Sortable | Value Type: Number (count)Example: A t-shirt available in 5 colors and 4 sizes (20 combinations) has a variant count of 20.
Average Margin
Average Margin
Description: Average profit margin across variants, calculated as (price - cost) / price for each variant with cost data. Excluded from the product if no variants have cost information (the formula evaluates to null).Use case: Sort products by profitability or filter for high-margin items. Create “Best Margin” collections for merchandising or exclude low-margin products from promotional campaigns.Attributes: Filterable, Sortable | Value Type: Number (decimal)Example: A product with two variants (price=5 and price=10) has an average margin of 0.5 (50%).