Shopify Order Printer के लिए लिक्विड वैरिएबल और फ़िल्टर का संदर्भ

आप Shopify Order Printer ऐप का उपयोग करके अपने खुद के कस्टम टेम्पलेट बनाने के लिए Liquid का उपयोग कर सकते हैं। Liquid के साथ, आप टेक्स्ट टेम्पलेट बना सकते हैं और प्रत्येक ऑर्डर के यूनिक डेटा के आधार पर उन्हें रेंडर कर सकते हैं।

इस पेज पर सूचीबद्ध लिक्विड संदर्भ, Liquid के ओपन-सोर्स वर्शन का एक्सटेंशन हैं और Shopify Order Printer ऐप पर उपयोग के लिए हैं। order और shop गुणों के आधार पर जानकारी रेंडर करने के लिए, आप अपने टेम्पलेट को कस्टमाइज़ करने के लिए इस संदर्भ से ऑब्जेक्ट, टैग और फ़िल्टर की सूची का उपयोग कर सकते हैं। आप ऑब्जेक्ट फ़ील्ड के बारे में विवरण जानने के लिए Admin GraphQL API दस्तावेज़ का भी उपयोग कर सकते हैं।

वैरिएबल और गुणों का उपयोग करना

Shopify Order Printer टेम्पलेट में, मुख्य डेटा ऑब्जेक्ट order और shop हैं। आप ऑर्डर गुणों को एक्सेस करने के लिए order.variable_name का उपयोग कर सकते हैं।

निम्नलिखित सामान्य रूप से उपयोग किए जाने वाले ऑर्डर गुण, order. प्रीफ़िक्स के बिना एक्सेस किए जा सकते हैं:

  • line_items
  • tax_lines
  • fulfillments
  • transactions
  • discounts
  • refunds
  • shipping_methods
  • customer

उदाहरण के लिए, अगर आप लाइन आइटम वैरिएबल को एक्सेस करना चाहते हैं, तो आप line_items या order.line_items का उपयोग कर सकते हैं।

Shopify Order Printer में उपलब्ध लिक्विड वैरिएबल

निम्नलिखित क्लास उपलब्ध हैं। गुणों को वर्णानुक्रम में सूचीबद्ध किया गया है।

ऑर्डर

Shopify Order Printer में निम्नलिखित ऑर्डर गुण उपलब्ध हैं:

  • attributes
  • b2b
  • billing_address
  • cancel_reason
  • cancel_reason_label
  • cancelled
  • cancelled_at
  • cart_level_discount_applications
  • checkout_id
  • checkout_payment_collection_url
  • company
  • company_location
  • confirmation_number
  • created_at. वह समय जब ऑर्डर प्रोसेस किया गया हो। यह GraphQL API से order.processed_at के बराबर है। टाइमस्टाम्प को फ़ॉर्मेट करने के लिए date फ़िल्टर का उपयोग करें, उदाहरण के लिए {{ order.created_at | date: "%B %e, %Y" }} के साथ।
  • customer
  • discounts. अब उपयोग में नहीं है, क्योंकि सभी छूट प्रकार और विवरण कैप्चर नहीं किए जाते हैं। order.discounts प्रॉपर्टी को order.discount_applications से बदल दिया गया है।
  • discounts_amount. अब उपयोग में नहीं है, क्योंकि सभी छूट प्रकार और विवरण कैप्चर नहीं किए जाते हैं। order.discounts प्रॉपर्टी को order.total_discounts से बदल दिया गया है।
  • discount_applications
  • discounts_savings. अब उपयोग में नहीं है, क्योंकि सभी छूट प्रकार और विवरण कैप्चर नहीं किए जाते हैं। order.discounts प्रॉपर्टी को - से बदल दिया गया है।
  • email
  • fees
  • financial_status
  • financial_status_label
  • fulfilled_line_items
  • fulfillment_aborted
  • fulfillment_status
  • fulfillments
  • gateway
  • id
  • item_count
  • landing_site
  • landing_site_ref
  • line_items
  • line_items_subtotal_price
  • location
  • metafields
  • name
  • net_payment
  • note
  • order_name
  • order_number
  • order_status_url
  • payment
  • payment_details
  • po_number
  • refunds
  • requires_shipping
  • shipping_address
  • shipping_method
  • shipping_methods
  • shipping_price
  • shop
  • shop_name
  • subtotal_price
  • tags
  • tax_lines
  • tax_price
  • tip_line_items
  • total_discounts
  • total_duties
  • total_landed_cost_additional_fees
  • total_net_amount
  • total_outstanding
  • total_price
  • total_refunded_amount
  • total_tip
  • transactions
  • unacceptable_risks
  • unfulfilled_line_items
  • unique_gateways
  • user
  • void_transactions

Shop

Shopify Order Printer में उपलब्ध Shop गुण की निम्नलिखित सूची की समीक्षा करें:

  • accepts_gift_cards
  • account_owner
  • allows_discounts
  • checkout
  • checkout_requires_confirmation_step
  • collections_count
  • contact_information
  • currency
  • customer_accounts_enabled
  • customer_accounts_optional
  • description
  • domain
  • email
  • email_accent_color
  • email_logo_url
  • email_logo_width
  • email_marketing
  • enabled_currencies
  • enabled_locales
  • enabled_payment_types
  • features
  • id
  • latitude
  • legal_notice
  • longitude
  • metafields
  • money_format
  • money_with_currency_format
  • name
  • password_message
  • permanent_domain
  • phone
  • policies
  • privacy_policy
  • products_count
  • refund_policy
  • secure_url
  • shipping_policy
  • subscription_policy
  • terms_of_sale
  • terms_of_service
  • types
  • url

LineItem

Shopify Order Printer में उपलब्ध लाइन आइटम गुण की निम्नलिखित सूची की समीक्षा करें:

  • aggregated_update
  • applied_discounts. अब काम में नहीं है, क्योंकि सभी छूट के प्रकार और विवरण उपलब्ध नहीं हैं। line_item.discounts प्रॉपर्टी की जगह line_item.discount_allocations का इस्तेमाल किया गया है।
  • current_quantity
  • discount_allocations
  • discounts. अब इस्तेमाल में नहीं है, क्योंकि सभी तरह की छूट और विवरण उपलब्ध नहीं हैं। line_item.discounts प्रॉपर्टी को line_item.discount_allocations से बदल दिया गया है।
  • final_line_price
  • final_price
  • fulfillment
  • fulfillment_service
  • gift_card
  • grams
  • groups
  • id
  • image
  • index
  • item_updates
  • json_filter
  • key
  • line_level_discount_allocations
  • line_level_total_discount
  • line_price. अब इस्तेमाल में नहीं है, क्योंकि ऑटोमैटिक छूट और डिस्काउंट कोड से मिलने वाली छूट इसमें शामिल नहीं हैं। line_item.line_price प्रॉपर्टी को line_item.final_line_price से बदल दिया गया है।
  • message
  • options_with_values
  • original_line_price
  • original_price
  • price. अब इस्तेमाल में नहीं है, क्योंकि ऑटोमैटिक छूट और डिस्काउंट कोड से मिलने वाली छूट इसमें शामिल नहीं हैं। line_item.price प्रॉपर्टी को line_item.final_price से बदल दिया गया है।
  • product
  • product_id
  • properties
  • quantity
  • refunded_quantity
  • requires_shipping
  • selling_plan_allocation
  • sku
  • successfully_fulfilled_quantity
  • tax_lines
  • taxable
  • title
  • total_discount. अब इस्तेमाल में नहीं है, क्योंकि ऑटोमैटिक छूट और डिस्काउंट कोड से मिलने वाली छूट इसमें शामिल नहीं हैं। line_item.total_discount प्रॉपर्टी को line_item.line_level_total_discount से बदल दिया गया है।
  • unit_price
  • unit_price_measurement
  • url
  • url_to_remove
  • variant
  • variant_id
  • vendor

फ़ुलफ़िलमेंट

Shopify Order Printer में उपलब्ध फ़ुलफ़िलमेंट गुणों की निम्नलिखित सूची की समीक्षा करें:

  • created_at. टाइमस्टाम्प को फ़ॉर्मैट करने के लिए date फ़िल्टर का इस्तेमाल करें, उदाहरण के लिए {{ fulfillment.created_at | date: "%B %e, %Y" }} के साथ।
  • estimated_delivery_at
  • fulfillment_line_items
  • item_count
  • line_items
  • requires_shipping
  • tracking_company
  • tracking_number
  • tracking_numbers
  • tracking_url
  • tracking_urls
  • updated_at

पता

Shopify Order Printer में उपलब्ध पते के गुणों की निम्नलिखित सूची की समीक्षा करें:

  • address1
  • address2
  • city
  • company
  • country
  • country_code
  • country_upper
  • errors
  • first_name
  • id
  • last_name
  • name
  • phone
  • province
  • province_code
  • street
  • summary
  • translated_country_name
  • translated_province_name
  • url
  • zip

ग्राहक

Shopify Order Printer में उपलब्ध ग्राहक गुणों की निम्नलिखित सूची की समीक्षा करें:

  • accepts_marketing
  • account_activation_url
  • addresses
  • addresses_count
  • b2b?
  • default_address
  • email
  • first_name
  • has_account
  • id
  • last_name
  • last_order
  • metafields
  • name
  • new_address
  • orders
  • orders_count
  • payment_methods
  • phone
  • reset_password_url
  • subscribe_url
  • tags
  • tax_exempt
  • total_spent

DiscountApplication

Shopify Order Printer में उपलब्ध DiscountApplication गुणों की निम्नलिखित सूची की समीक्षा करें:

  • target_selection
  • target_type
  • title
  • total_allocated_amount
  • type
  • value_type
  • value

छूट प्रिंट करना

छूट पूरे ऑर्डर पर या खास लाइन आइटम पर लागू की जा सकती है:

  • ऑर्डर स्तर की छूट: ये पूरे ऑर्डर पर लागू होती हैं। आप अपना ऑर्डर इनवॉइस प्रिंट करते समय इन छूट को नीचे अलग से दिखा सकते हैं।
  • लाइन आइटम स्तर की छूट: ये अलग-अलग आइटम पर लागू होती हैं। आप लाइन आइटम सेक्शन में अलग-अलग आइटम का विवरण प्रिंट करते समय इन छूट का उल्लेख कर सकते हैं।

आप निम्नलिखित वेरिएबल का इस्तेमाल करके छूट की जानकारी एक्सेस कर सकते हैं:

  • order.total_discounts मान और order.discount_applications संग्रह के साथ ऑर्डर या उसके किसी भी लाइन आइटम पर लागू सभी छूट एक्सेस करें।
  • line_item.line_level_total_discount मान या line_item.line_level_discount_allocations संग्रह के साथ लाइन आइटम छूट एक्सेस करें।
  • line_item.original_price मान के साथ कोई भी छूट लागू करने से पहले लाइन आइटम की कीमत एक्सेस करें।
  • line_item.final_price मान के साथ सभी संबंधित लाइन आइटम स्तर की छूट लागू करने के बाद लाइन आइटम की अंतिम कीमत एक्सेस करें।
  • line_item.original_line_price और line_item.final_line_price मान, line_item.original_price और line_item.final_price मानों को line_item.quantity से गुणा करने के बराबर हैं।
  • order.cart_level_discount_applications संग्रह के साथ ऑर्डर स्तर की छूट एक्सेस करें।

लाइन आइटम स्तर की छूट प्रिंट करने के लिए उदाहरण कोड ब्लॉक:

{% for line_item in order.line_items %}
  <tr>
    <td>{{ line_item.quantity }}</td>
    <td>{{ line_item.title }}
    {% if line_item.line_level_discount_allocations.size > 0 %}
      <span class="subduedText">
        {% for discount_allocation in line_item.line_level_discount_allocations %}
        <br>{{ discount_allocation.discount_application.title }} (-{{ discount_allocation.amount | money }})
        {% endfor %}
      </span>
    {% endif %}
    </td>
    <td style="text-align: right;">
      {% if line_item.original_price != line_item.final_price %}
        <span class="subduedText"><s>{{ line_item.original_price | money }}</s></span>
      {% endif %}
      {{ line_item.final_price | money }}
    </td>
  </tr>
{% endfor %}

ऑर्डर स्तर की छूट प्रिंट करने के लिए उदाहरण कोड ब्लॉक:

{% for discount_application in order.cart_level_discount_applications %}
<tr>
  <td colspan="2" style="text-align: right;">{% if discount_application.title %}<span class="subduedText">{{ discount_application.title }}</span>{% endif %}</td>
  <td style="text-align: right;">-{{ discount_application.total_allocated_amount | money }}</td>
</tr>
{% endfor %}

DiscountAllocation

Shopify Order Printer में उपलब्ध DiscountAllocation गुणों की निम्नलिखित सूची की समीक्षा करें:

  • amount
  • discount_application

छूट

Shopify Order Printer में उपलब्ध छूट गुणों की निम्नलिखित सूची की समीक्षा करें:

  • amount
  • code
  • free_shipping_discount
  • id
  • savings
  • title
  • total_amount
  • total_savings

प्रोडक्ट

Shopify Order Printer में उपलब्ध प्रोडक्ट गुणों की निम्नलिखित सूची की समीक्षा करें:

  • as_json
  • available
  • collections
  • compare_at_price
  • compare_at_price_max
  • compare_at_price_min
  • compare_at_price_varies
  • content
  • created_at
  • description
  • featured_image
  • featured_media
  • first_available_variant
  • gift_card?
  • handle
  • has_only_default_variant
  • id
  • images
  • json_filter
  • media
  • metafields
  • object_type
  • options
  • options_by_name
  • options_with_values
  • price
  • price_max
  • price_min
  • price_varies
  • published_at
  • requires_selling_plan
  • selected_or_first_available_selling_plan_allocation
  • selected_or_first_available_variant
  • selected_selling_plan
  • selected_selling_plan_allocation
  • selected_variant
  • selling_plan_groups
  • tags
  • template_suffix
  • title
  • type
  • url
  • variants
  • vendor

प्रकार

Shopify Order Printer में उपलब्ध प्रकार गुणों की नीचे दी गई सूची देखें:

  • as_json
  • available
  • barcode
  • compare_at_price
  • featured_image
  • featured_media
  • id
  • image
  • incoming
  • inventory_management
  • inventory_policy
  • inventory_quantity
  • json_filter
  • metafields
  • next_incoming_date
  • option1
  • option2
  • option3
  • options
  • price
  • product
  • requires_selling_plan
  • requires_shipping
  • selected_selling_plan_allocation
  • selling_plan_allocations
  • sku
  • store_availabilities
  • taxable
  • title
  • unit_price
  • unit_price_measurement
  • url
  • weight
  • weight_in_unit
  • weight_unit

रिफ़ंड

Shopify Order Printer में उपलब्ध रिफ़ंड गुणों की नीचे दी गई सूची देखें:

  • amount
  • created_at
  • id
  • note
  • refund_line_items
  • restock
  • transactions

शिपिंग लाइन

Shopify Order Printer में उपलब्ध शिपिंग लाइन गुणों की नीचे दी गई सूची देखें:

  • handle
  • id
  • original_price
  • price. इसे अब इस्तेमाल नहीं किया जाता, क्योंकि कीमत में ऑर्डर स्तर की छूट शामिल नहीं थी। shipping_line.price प्रॉपर्टी को shipping_line.price_with_discounts से बदल दिया गया है।
  • price_with_discounts
  • tax_lines
  • title

टैक्स लाइन

Shopify Order Printer में उपलब्ध टैक्स लाइन गुणों की नीचे दी गई सूची देखें:

  • price
  • rate
  • rate_percentage
  • title

लेन-देन

Shopify Order Printer में उपलब्ध लेन-देन गुणों की नीचे दी गई सूची देखें:

  • amount
  • buyer_pending_payment_instructions
  • buyer_pending_payment_notice
  • created_at
  • gateway
  • gateway_display_name
  • id
  • kind
  • name
  • payment_details
  • receipt
  • show_buyer_pending_payment_instructions
  • status
  • status_label

मेटाफ़ील्ड

एक पैरेंट ऑब्जेक्ट से जुड़ा मेटाफ़ील्ड। किसी खास ऑब्जेक्ट पर मेटाफ़ील्ड को एक्सेस करने का तरीका जानने के लिए, मेटाफ़ील्ड को एक्सेस करना देखें।

मेटाफ़ील्ड कई डेटा प्रकारों को सपोर्ट करते हैं, जो यह तय करते हैं कि मेटाफ़ील्ड में किस तरह की जानकारी स्टोर की जाती है। मेटाफ़ील्ड को एक्सेस करने के लिए, मेटाफ़ील्ड के एक्सेस पाथ में दो लेयर होती हैं:

  • नेमस्पेस - टकराव को रोकने के लिए मेटाफ़ील्ड का एक ग्रुप,
  • की - मेटाफ़ील्ड का नाम.

इसे देखते हुए, आप नीचे दिए गए सिंटैक्स के साथ मेटाफ़ील्ड ऑब्जेक्ट को एक्सेस कर सकते हैं: {{ resource.metafields.namespace.key }}.

नामकरण: <object>.metafields.<namespace>.<key>. उदाहरण के लिए, order.metafields.shipping.express_delivery_status.

प्रकार:

  • स्ट्रिंग
  • ऐरे - इंडेक्स करने के लिए [ ] का इस्तेमाल करें. उदाहरण के लिए, order.metafield.shipping.express_delivery_status[0]
  • इंटीजर
  • बूलियन
  • तारीख

ध्यान दें Metaobject प्रकार सपोर्ट नहीं करता है।

ऑब्जेक्ट जो मेटाफ़ील्ड को सपोर्ट करते हैं:

  • ऑर्डर
  • ग्राहक
  • प्रोडक्ट
  • प्रकार
  • जगह

Shopify Order Printer में उपलब्ध Liquid फ़िल्टर

इस्तेमाल

किसी आउटपुट पर फ़िल्टर लागू करने के लिए, आउटपुट के कर्ली ब्रेस डेलीमीटर {{ }} के अंदर फ़िल्टर और किसी भी फ़िल्टर पैरामीटर को जोड़ें, जिसके पहले एक पाइप वर्ण | हो। नीचे दिए गए उदाहरण में, प्रोडक्ट ऑब्जेक्ट है, टाइटल उसकी प्रॉपर्टी है और अपकेस लागू किया जा रहा फ़िल्टर है:

{{ product.title | upcase }}

अगर product.title का मान Health potion है, तो upcase फ़िल्टर से HEALTH POTION आउटपुट होगा।

Liquid फ़िल्टर का इस्तेमाल करने के तरीके के बारे में ज़्यादा जानकारी के लिए, Shopify थीम Liquid संदर्भ से फ़िल्टर सेक्शन देखें।

पता ऑब्जेक्ट पर लागू किए जाने वाले फ़िल्टर

  • format_address

इस्तेमाल के उदाहरणों के लिए, format_address के लिए Shopify थीम Liquid दस्तावेज़ देखें।

किसी भी टेक्स्ट / स्ट्रिंग पर लागू किए जाने वाले फ़िल्टर

  • camelcase
  • camelize
  • encode_url_component
  • format_code
  • handle
  • highlight
  • pad_spaces
  • paragraphize
  • pluralize
  • url_escape
  • url_param_escape

उपयोग के उदाहरणों के लिए, स्ट्रिंग फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.

पैसे के अर्थ वाली संख्याओं पर लागू किए जाने वाले फ़िल्टर

  • money
  • money_with_currency
  • money_without_currency
  • money_without_trailing_zeros

Shopify Order Printer, पैसे को फ़ॉर्मेट करने के लिए Shopify एडमिन में कॉन्फ़िगर किए गए ईमेल नोटिफ़िकेशन मुद्रा फ़ॉर्मेटिंग विकल्पों का उपयोग करता है। आप मुद्रा फ़ॉर्मेटिंग बदल सकते हैं। Shopify Order Printer में मनी फ़िल्टर फ़ॉर्मेटिंग बदलने के लिए Shopify एडमिन में Email with currency और Email without currency मान सेट करें।

उपयोग के उदाहरणों के लिए, मनी फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.

ऑब्जेक्ट को json में रूपांतरित करने के लिए लागू किए जाने वाले फ़िल्टर

  • json

उपयोग के उदाहरणों के लिए, json फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.

वज़न के अर्थ वाली संख्याओं पर लागू किए जाने वाले फ़िल्टर

  • weight
  • weight_with_unit

उपयोग के उदाहरणों के लिए, यूनिट के साथ वज़न के लिए Shopify थीम Liquid दस्तावेज़ देखें.

टैग पर लागू किए जाने वाले फ़िल्टर

  • highlight_active_tag
  • link_to_add_tag
  • link_to_remove_tag
  • link_to_tag

उपयोग के उदाहरणों के लिए, टैग फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.

यूआरएल पर लागू किए जाने वाले फ़िल्टर

  • article_img_url
  • asset_img_url
  • asset_url
  • cdn_asset_url
  • collection_img_url
  • file_img_url
  • file_url
  • global_asset_url
  • image_url
  • img_tag
  • img_url
  • link_to
  • payment_icon_png_url
  • payment_type_img_url
  • payment_type_svg_tag
  • placeholder_svg_tag
  • product_img_url
  • script_tag
  • shopify_asset_url
  • stylesheet_tag

समर्थित मिडिया फ़िल्टर के उपयोग के उदाहरणों के लिए, मिडिया फ़िल्टर का Shopify थीम Liquid दस्तावेज़ देखें।

संग्रहण पर लागू किए जाने वाले फ़िल्टर

  • link_to_type
  • link_to_vendor
  • sort_by
  • url_for_type
  • url_for_vendor
  • within

उपयोग के उदाहरणों के लिए, संग्रहण फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.