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_itemstax_linesfulfillmentstransactionsdiscountsrefundsshipping_methodscustomer
उदाहरण के लिए, अगर आप लाइन आइटम वैरिएबल को एक्सेस करना चाहते हैं, तो आप line_items या order.line_items का उपयोग कर सकते हैं।
Shopify Order Printer में उपलब्ध लिक्विड वैरिएबल
निम्नलिखित क्लास उपलब्ध हैं। गुणों को वर्णानुक्रम में सूचीबद्ध किया गया है।
ऑर्डर
Shopify Order Printer में निम्नलिखित ऑर्डर गुण उपलब्ध हैं:
attributesb2bbilling_addresscancel_reasoncancel_reason_labelcancelledcancelled_atcart_level_discount_applicationscheckout_idcheckout_payment_collection_urlcompanycompany_locationconfirmation_numbercreated_at. वह समय जब ऑर्डर प्रोसेस किया गया हो। यह GraphQL API सेorder.processed_atके बराबर है। टाइमस्टाम्प को फ़ॉर्मेट करने के लिएdateफ़िल्टर का उपयोग करें, उदाहरण के लिए{{ order.created_at | date: "%B %e, %Y" }}के साथ।customerdiscounts. अब उपयोग में नहीं है, क्योंकि सभी छूट प्रकार और विवरण कैप्चर नहीं किए जाते हैं।order.discountsप्रॉपर्टी कोorder.discount_applicationsसे बदल दिया गया है।discounts_amount. अब उपयोग में नहीं है, क्योंकि सभी छूट प्रकार और विवरण कैप्चर नहीं किए जाते हैं।order.discountsप्रॉपर्टी कोorder.total_discountsसे बदल दिया गया है।discount_applicationsdiscounts_savings. अब उपयोग में नहीं है, क्योंकि सभी छूट प्रकार और विवरण कैप्चर नहीं किए जाते हैं।order.discountsप्रॉपर्टी को-से बदल दिया गया है।emailfeesfinancial_statusfinancial_status_labelfulfilled_line_itemsfulfillment_abortedfulfillment_statusfulfillmentsgatewayiditem_countlanding_sitelanding_site_refline_itemsline_items_subtotal_pricelocationmetafieldsnamenet_paymentnoteorder_nameorder_numberorder_status_urlpaymentpayment_detailspo_numberrefundsrequires_shippingshipping_addressshipping_methodshipping_methodsshipping_priceshopshop_namesubtotal_pricetagstax_linestax_pricetip_line_itemstotal_discountstotal_dutiestotal_landed_cost_additional_feestotal_net_amounttotal_outstandingtotal_pricetotal_refunded_amounttotal_tiptransactionsunacceptable_risksunfulfilled_line_itemsunique_gatewaysuservoid_transactions
Shop
Shopify Order Printer में उपलब्ध Shop गुण की निम्नलिखित सूची की समीक्षा करें:
accepts_gift_cardsaccount_ownerallows_discountscheckoutcheckout_requires_confirmation_stepcollections_countcontact_informationcurrencycustomer_accounts_enabledcustomer_accounts_optionaldescriptiondomainemailemail_accent_coloremail_logo_urlemail_logo_widthemail_marketingenabled_currenciesenabled_localesenabled_payment_typesfeaturesidlatitudelegal_noticelongitudemetafieldsmoney_formatmoney_with_currency_formatnamepassword_messagepermanent_domainphonepoliciesprivacy_policyproducts_countrefund_policysecure_urlshipping_policysubscription_policyterms_of_saleterms_of_servicetypesurl
LineItem
Shopify Order Printer में उपलब्ध लाइन आइटम गुण की निम्नलिखित सूची की समीक्षा करें:
aggregated_updateapplied_discounts. अब काम में नहीं है, क्योंकि सभी छूट के प्रकार और विवरण उपलब्ध नहीं हैं।line_item.discountsप्रॉपर्टी की जगहline_item.discount_allocationsका इस्तेमाल किया गया है।current_quantitydiscount_allocationsdiscounts. अब इस्तेमाल में नहीं है, क्योंकि सभी तरह की छूट और विवरण उपलब्ध नहीं हैं।line_item.discountsप्रॉपर्टी कोline_item.discount_allocationsसे बदल दिया गया है।final_line_pricefinal_pricefulfillmentfulfillment_servicegift_cardgramsgroupsidimageindexitem_updatesjson_filterkeyline_level_discount_allocationsline_level_total_discountline_price. अब इस्तेमाल में नहीं है, क्योंकि ऑटोमैटिक छूट और डिस्काउंट कोड से मिलने वाली छूट इसमें शामिल नहीं हैं।line_item.line_priceप्रॉपर्टी कोline_item.final_line_priceसे बदल दिया गया है।messageoptions_with_valuesoriginal_line_priceoriginal_priceprice. अब इस्तेमाल में नहीं है, क्योंकि ऑटोमैटिक छूट और डिस्काउंट कोड से मिलने वाली छूट इसमें शामिल नहीं हैं।line_item.priceप्रॉपर्टी कोline_item.final_priceसे बदल दिया गया है।productproduct_idpropertiesquantityrefunded_quantityrequires_shippingselling_plan_allocationskusuccessfully_fulfilled_quantitytax_linestaxabletitletotal_discount. अब इस्तेमाल में नहीं है, क्योंकि ऑटोमैटिक छूट और डिस्काउंट कोड से मिलने वाली छूट इसमें शामिल नहीं हैं।line_item.total_discountप्रॉपर्टी कोline_item.line_level_total_discountसे बदल दिया गया है।unit_priceunit_price_measurementurlurl_to_removevariantvariant_idvendor
फ़ुलफ़िलमेंट
Shopify Order Printer में उपलब्ध फ़ुलफ़िलमेंट गुणों की निम्नलिखित सूची की समीक्षा करें:
created_at. टाइमस्टाम्प को फ़ॉर्मैट करने के लिएdateफ़िल्टर का इस्तेमाल करें, उदाहरण के लिए{{ fulfillment.created_at | date: "%B %e, %Y" }}के साथ।estimated_delivery_atfulfillment_line_itemsitem_countline_itemsrequires_shippingtracking_companytracking_numbertracking_numberstracking_urltracking_urlsupdated_at
पता
Shopify Order Printer में उपलब्ध पते के गुणों की निम्नलिखित सूची की समीक्षा करें:
address1address2citycompanycountrycountry_codecountry_uppererrorsfirst_nameidlast_namenamephoneprovinceprovince_codestreetsummarytranslated_country_nametranslated_province_nameurlzip
ग्राहक
Shopify Order Printer में उपलब्ध ग्राहक गुणों की निम्नलिखित सूची की समीक्षा करें:
accepts_marketingaccount_activation_urladdressesaddresses_countb2b?default_addressemailfirst_namehas_accountidlast_namelast_ordermetafieldsnamenew_addressordersorders_countpayment_methodsphonereset_password_urlsubscribe_urltagstax_exempttotal_spent
DiscountApplication
Shopify Order Printer में उपलब्ध DiscountApplication गुणों की निम्नलिखित सूची की समीक्षा करें:
target_selectiontarget_typetitletotal_allocated_amounttypevalue_typevalue
छूट प्रिंट करना
छूट पूरे ऑर्डर पर या खास लाइन आइटम पर लागू की जा सकती है:
- ऑर्डर स्तर की छूट: ये पूरे ऑर्डर पर लागू होती हैं। आप अपना ऑर्डर इनवॉइस प्रिंट करते समय इन छूट को नीचे अलग से दिखा सकते हैं।
- लाइन आइटम स्तर की छूट: ये अलग-अलग आइटम पर लागू होती हैं। आप लाइन आइटम सेक्शन में अलग-अलग आइटम का विवरण प्रिंट करते समय इन छूट का उल्लेख कर सकते हैं।
आप निम्नलिखित वेरिएबल का इस्तेमाल करके छूट की जानकारी एक्सेस कर सकते हैं:
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 %}- छूट के प्रकार और Liquid में छूट के साथ काम करने के बारे में ज़्यादा जानें।
DiscountAllocation
Shopify Order Printer में उपलब्ध DiscountAllocation गुणों की निम्नलिखित सूची की समीक्षा करें:
amountdiscount_application
छूट
Shopify Order Printer में उपलब्ध छूट गुणों की निम्नलिखित सूची की समीक्षा करें:
amountcodefree_shipping_discountidsavingstitletotal_amounttotal_savings
प्रोडक्ट
Shopify Order Printer में उपलब्ध प्रोडक्ट गुणों की निम्नलिखित सूची की समीक्षा करें:
as_jsonavailablecollectionscompare_at_pricecompare_at_price_maxcompare_at_price_mincompare_at_price_variescontentcreated_atdescriptionfeatured_imagefeatured_mediafirst_available_variantgift_card?handlehas_only_default_variantidimagesjson_filtermediametafieldsobject_typeoptionsoptions_by_nameoptions_with_valuespriceprice_maxprice_minprice_variespublished_atrequires_selling_planselected_or_first_available_selling_plan_allocationselected_or_first_available_variantselected_selling_planselected_selling_plan_allocationselected_variantselling_plan_groupstagstemplate_suffixtitletypeurlvariantsvendor
प्रकार
Shopify Order Printer में उपलब्ध प्रकार गुणों की नीचे दी गई सूची देखें:
as_jsonavailablebarcodecompare_at_pricefeatured_imagefeatured_mediaidimageincominginventory_managementinventory_policyinventory_quantityjson_filtermetafieldsnext_incoming_dateoption1option2option3optionspriceproductrequires_selling_planrequires_shippingselected_selling_plan_allocationselling_plan_allocationsskustore_availabilitiestaxabletitleunit_priceunit_price_measurementurlweightweight_in_unitweight_unit
रिफ़ंड
Shopify Order Printer में उपलब्ध रिफ़ंड गुणों की नीचे दी गई सूची देखें:
amountcreated_atidnoterefund_line_itemsrestocktransactions
शिपिंग लाइन
Shopify Order Printer में उपलब्ध शिपिंग लाइन गुणों की नीचे दी गई सूची देखें:
handleidoriginal_priceprice. इसे अब इस्तेमाल नहीं किया जाता, क्योंकि कीमत में ऑर्डर स्तर की छूट शामिल नहीं थी।shipping_line.priceप्रॉपर्टी कोshipping_line.price_with_discountsसे बदल दिया गया है।price_with_discountstax_linestitle
टैक्स लाइन
Shopify Order Printer में उपलब्ध टैक्स लाइन गुणों की नीचे दी गई सूची देखें:
priceraterate_percentagetitle
लेन-देन
Shopify Order Printer में उपलब्ध लेन-देन गुणों की नीचे दी गई सूची देखें:
amountbuyer_pending_payment_instructionsbuyer_pending_payment_noticecreated_atgatewaygateway_display_nameidkindnamepayment_detailsreceiptshow_buyer_pending_payment_instructionsstatusstatus_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 दस्तावेज़ देखें।
किसी भी टेक्स्ट / स्ट्रिंग पर लागू किए जाने वाले फ़िल्टर
camelcasecamelizeencode_url_componentformat_codehandlehighlightpad_spacesparagraphizepluralizeurl_escapeurl_param_escape
उपयोग के उदाहरणों के लिए, स्ट्रिंग फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.
पैसे के अर्थ वाली संख्याओं पर लागू किए जाने वाले फ़िल्टर
moneymoney_with_currencymoney_without_currencymoney_without_trailing_zeros
Shopify Order Printer, पैसे को फ़ॉर्मेट करने के लिए Shopify एडमिन में कॉन्फ़िगर किए गए ईमेल नोटिफ़िकेशन मुद्रा फ़ॉर्मेटिंग विकल्पों का उपयोग करता है।
आप मुद्रा फ़ॉर्मेटिंग बदल सकते हैं। Shopify Order Printer में मनी फ़िल्टर फ़ॉर्मेटिंग बदलने के लिए Shopify एडमिन में Email with currency और Email without currency मान सेट करें।
उपयोग के उदाहरणों के लिए, मनी फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.
ऑब्जेक्ट को json में रूपांतरित करने के लिए लागू किए जाने वाले फ़िल्टर
json
उपयोग के उदाहरणों के लिए, json फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.
वज़न के अर्थ वाली संख्याओं पर लागू किए जाने वाले फ़िल्टर
weightweight_with_unit
उपयोग के उदाहरणों के लिए, यूनिट के साथ वज़न के लिए Shopify थीम Liquid दस्तावेज़ देखें.
टैग पर लागू किए जाने वाले फ़िल्टर
highlight_active_taglink_to_add_taglink_to_remove_taglink_to_tag
उपयोग के उदाहरणों के लिए, टैग फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.
यूआरएल पर लागू किए जाने वाले फ़िल्टर
article_img_urlasset_img_urlasset_urlcdn_asset_urlcollection_img_urlfile_img_urlfile_urlglobal_asset_urlimage_urlimg_tagimg_urllink_topayment_icon_png_urlpayment_type_img_urlpayment_type_svg_tagplaceholder_svg_tagproduct_img_urlscript_tagshopify_asset_urlstylesheet_tag
समर्थित मिडिया फ़िल्टर के उपयोग के उदाहरणों के लिए, मिडिया फ़िल्टर का Shopify थीम Liquid दस्तावेज़ देखें।
संग्रहण पर लागू किए जाने वाले फ़िल्टर
link_to_typelink_to_vendorsort_byurl_for_typeurl_for_vendorwithin
उपयोग के उदाहरणों के लिए, संग्रहण फ़िल्टर के लिए Shopify थीम Liquid दस्तावेज़ देखें.