Shop Level Metafields
Selling Plans Metafield
Configuration
Key:
selling_plansType:
jsonNamespace:
restockrocket_productionOwner: Shop
Purpose
Stores the complete configuration of all enabled selling plans (preorder offers) for a shop.
Fields
{
"shopify_selling_plan_group_id": "string", // Unique identifier for the selling plan group in Shopify
"shopify_selling_plan_id": "string", // Unique identifier for the specific selling plan in Shopify
"enabled": boolean, // Whether the selling plan is active
"variant_ids": ["string"], // List of product variant IDs associated with this plan
"name": "string", // Display name of the selling plan
"preorder_button_text": "string", // Text shown on the preorder button
"preorder_button_description": "string", // Description shown below the preorder button
"preorder_button_description_background_color": "string", // Background color of the description box
"preorder_button_description_text_color": "string", // Text color of the description
"preorder_button_description_border_radius": "number", // Border radius of the description box
"preorder_button_description_show_quantity_limit": boolean, // Whether to show quantity limits
"preorder_button_description_quantity_limit_suffix": "string", // Text after quantity limit
"preorder_button_description_shipping_text_prefix": "string", // Text before shipping info
"delivery_exact_time": "string", // Exact time of delivery
"quantity_limit_text": "string", // Text explaining quantity limitations
"preorder_button_description_show_shipping": boolean, // Whether to show shipping info
"preorder_shipping_text": "string", // Shipping information for preorder items
"shipping_applies_to_all_products": boolean, // Whether shipping settings are global
"shipping_text": "string", // General shipping information
"payment_type": "string", // Type of payment (full/partial)
"billing_checkout_charge_type": "string", // How the charge is calculated
"billing_checkout_charge_amount": "number", // Fixed amount for checkout charge
"billing_checkout_charge_percentage": "number", // Percentage amount for checkout
"pricing_type": "string", // Type of pricing adjustment
"pricing_amount": "number", // Fixed amount for pricing
"pricing_percentage": "number", // Percentage for pricing
"discount_text": "string", // Text explaining discounts
"billing_title": "string", // Title for billing information
"billing_description": "string", // Detailed billing information
"enable_billing_widget": boolean, // Whether to show billing widget
"inventory_provider": "string", // Provider handling inventory
"preorder_badge_enabled": boolean, // Whether to show preorder badge
"preorder_badge_text": "string", // Text shown on the badge
"preorder_badge_text_color": "string", // Color of badge text
"preorder_badge_background_color": "string", // Background color of badge
"translations": { // Translations for multilingual support
"locale_code": {
"shipping_text": "string",
"billing_title": "string",
"billing_description": "string",
"discount_text": "string",
"preorder_badge_text": "string",
"preorder_button_description": "string",
"quantity_limit_text": "string",
"preorder_shipping_text": "string",
"preorder_button_text": "string"
}
}
}Accessing in Liquid
Example: Working with Delivery Times
Accessing via GraphQL
This example demonstrates:
Converting the delivery time to a readable format
Calculating days remaining until delivery
Displaying a formatted delivery date
Replacing placeholders in shipping text
Adding conditional styling based on delivery status
Basic CSS styling for the delivery information
Simple examples of using STOQ's shop-level metafields with Shopify liquid
Example 1: Basic Preorder Badge
Use Case: Show preorder badge when variant is part of a selling plan.
Example 2: Preorder Button Text
Use Case: Use custom button text from selling plan configuration.
Example 3: Show Remaining Quantity
Use Case: Display how many preorder spots are left.
Example 4: Delivery Date Display
Use Case: Show estimated delivery date from selling plan.
Last updated