国产五月色婷婷六月丁香视频_婷婷激情五月AV在线观看_丁香婷婷综合激情五月色_色六月婷婷亚洲婷婷六月_久久婷婷五月综合色国产_五月婷婷俺也去开心_婷婷综合亚洲爱久久

退出
Shopify新手指南
1998人已讀
1、本指南旨在幫助您打開思路、理清方向,順利開啟跨境之路。(持續(xù)更新中) 2、內(nèi)容來源于各個(gè)公開渠道整理匯總,版權(quán)歸原作者所有。 3、使用建議:可使用快捷鍵 Ctrl +D/Command +D 的形式收藏至瀏覽器,方便下次訪問。
收藏(1253)
目錄導(dǎo)航
Shopify 簡(jiǎn)介
定價(jià)計(jì)劃
概述
初始設(shè)置
商店設(shè)計(jì)清單
聘請(qǐng)幫助人員
遷移到 Shopify
開始使用
注意事項(xiàng)
Shopify 后臺(tái)
Shopify 后臺(tái)概述
支持的瀏覽器
備份和復(fù)制
搜索 Shopify 后臺(tái)
Shopify Mobile
生產(chǎn)力工具
Shopify 主頁
時(shí)間表
合規(guī)性
確保您的商店符合 Shopify 的政策
版權(quán)
在美國 (US) 的 Shopify 上銷售大麻二酚
隱私和安全
賬戶安全
隱私
您的賬戶
員工
登陸
管理賬單
管理賬戶
暫停或停用商店
已凍結(jié)的 Shopify 商店
選擇您的賬戶語言和地區(qū)
與 Shopify 合作伙伴合作
推薦創(chuàng)業(yè)家使用 Shopify
在線商店
設(shè)置
模板
菜單和鏈接
博客
動(dòng)態(tài)結(jié)賬按鈕
圖片
因假期關(guān)閉商店
Shopify Search & Discovery
搜索您的商店
速度
POS
開始使用 Shopify POS
通過 Shopify POS 當(dāng)面銷售
QuickBooks POS
B2B
B2B 設(shè)置清單
產(chǎn)品目錄
公司
客戶
支付條款
信用卡儲(chǔ)存
結(jié)賬和賬戶
草稿訂單
測(cè)試 B2B 設(shè)置
B2B 模板代碼
銷售渠道
Facebook and Instagram by Meta
Google & YouTube
Shop
Linkpop
Buy Button
Shopify Collective
Faire 批發(fā)市場(chǎng)
TikTok Shop
批發(fā)
Shopify Marketplace Connect 應(yīng)用
Shopify 結(jié)賬
結(jié)賬樣式
結(jié)賬表單選項(xiàng)
自定義和編輯結(jié)賬頁面
小費(fèi)選項(xiàng)
設(shè)置地址收集偏好設(shè)置
訂單處理流程
結(jié)賬頁面語言
商店政策
機(jī)器人保護(hù)
結(jié)賬自定義項(xiàng)
測(cè)試訂單
Script Editor 應(yīng)用
產(chǎn)品
產(chǎn)品套裝
添加產(chǎn)品
管理庫存
購買選項(xiàng)
產(chǎn)品詳細(xì)信息
數(shù)字產(chǎn)品
多屬性
產(chǎn)品媒體
產(chǎn)品系列
銷售禮品卡
導(dǎo)入和導(dǎo)出
搜索和篩選
為您的產(chǎn)品定價(jià)
Product Reviews
Handshake 批發(fā)市場(chǎng)
代發(fā)貨
暫時(shí)更改您的產(chǎn)品線
產(chǎn)品分析概述
域名
添加域名
更改域名類型和目標(biāo)
移除域名
管理域名的所有權(quán)
電子郵件托管和轉(zhuǎn)發(fā)
管理域名設(shè)置
域名術(shù)語
對(duì)域名問題進(jìn)行故障排除
收款
獲得收款
Shop Pay
Shopify Payments
PayPal Express
Shop Cash
Shop Pay 分期付款
快捷結(jié)賬
第三方提供商
其他付款方式
線下付款
支付授權(quán)和獲取款項(xiàng)
拒付和查詢
欺詐預(yù)防
Advanced Cash on Delivery
問題排查
地點(diǎn)
設(shè)置您的地點(diǎn)
將庫存分配給各個(gè)地點(diǎn)
設(shè)置您的地點(diǎn)發(fā)貨
發(fā)貨和配送
Shopify 發(fā)貨網(wǎng)絡(luò)
了解運(yùn)輸
設(shè)置和管理您的發(fā)貨和配送
Shopify Shipping
碳中和運(yùn)輸
發(fā)貨和代發(fā)貨服務(wù)
Shop Promise
客戶
管理客戶
客戶賬戶
搜索客戶資料
客戶細(xì)分
導(dǎo)入和導(dǎo)出客戶
從 MailChimp 導(dǎo)入
Bulk Account Inviter
提供在線客戶服務(wù)
解決客戶 CSV 文件錯(cuò)誤
Shopify Flow
創(chuàng)建工作流
監(jiān)視工作流
管理工作流
手動(dòng)運(yùn)行工作流
高級(jí)工作流
Shopify Flow 參考信息
訂單
訂單狀態(tài)頁面
發(fā)貨
處理訂單
創(chuàng)建草稿訂單
管理訂單
訂單狀態(tài)
導(dǎo)出為 CSV 文件
搜索、查看和打印訂單
自助退貨
Order Printer
創(chuàng)建退貨和退款
管理訂閱訂單
編輯訂單商品
入賬付款
延期付款
取消、存檔和刪除訂單
欺詐風(fēng)險(xiǎn)分析
恢復(fù)棄單
轉(zhuǎn)化跟蹤
通知
聯(lián)系 Shopify 商店以了解訂單
Fraud Filter
管理增加的銷售額
訂單分析概述
折扣
折扣類型
組合折扣
管理折扣碼
導(dǎo)出折扣碼
設(shè)置促銷價(jià)格
棄單電子郵件
禮品卡折扣
銷售渠道折扣
常見問題解答
Shopify Inbox
安裝和訪問 Shopify Inbox
管理客戶對(duì)話
配置 Shopify Inbox
聊天設(shè)置和外觀
對(duì)話指標(biāo)
自定義數(shù)據(jù)
Metafields
元對(duì)象
訪問選項(xiàng)
功能
復(fù)制到訂單
營銷和促銷
制定營銷計(jì)劃
內(nèi)容營銷
管理您的品牌資產(chǎn)
改進(jìn)SEO
Shopify 中的營銷
Shopify Audiences
分析在線營銷
遠(yuǎn)程購物體驗(yàn)
為季節(jié)性銷售做準(zhǔn)備
Shopify Collabs
限時(shí)搶購
像素代碼和客戶活動(dòng)
分析
Shopify 分析
Google Analytics
ShopifyQL Notebooks
分析差異
應(yīng)用
應(yīng)用類型
查找應(yīng)用
選擇應(yīng)用
安裝應(yīng)用
卸載應(yīng)用
管理應(yīng)用
獲取應(yīng)用幫助
不受支持的應(yīng)用
應(yīng)用權(quán)限和個(gè)人信息
對(duì)第三方應(yīng)用的支持
Shopify Markets
管理市場(chǎng)
以當(dāng)?shù)刎泿哦▋r(jià)
自動(dòng)重定向
國際域名
本地化和翻譯
關(guān)稅和進(jìn)口稅
收款
運(yùn)輸和市場(chǎng)
使用 Markets 發(fā)布產(chǎn)品
Shopify Markets Pro
專家市場(chǎng)
聘請(qǐng)幫助人員
與專家合作
向?qū)<腋犊?/div>
處理爭(zhēng)議
完成工作
合作伙伴目錄
聘請(qǐng)幫助人員
稅費(fèi)
一般稅款設(shè)置步驟
基于地點(diǎn)的稅費(fèi)設(shè)置
基于登記的稅費(fèi)設(shè)置
Shopify Tax
美國稅費(fèi)
加拿大稅費(fèi)
歐盟稅費(fèi)
英國稅費(fèi)
Shopify POS 稅費(fèi)
數(shù)字產(chǎn)品稅
手動(dòng)稅費(fèi)和免稅
運(yùn)費(fèi)稅
關(guān)稅和進(jìn)口稅
印度的 GST
Avalara AvaTax 提供的稅務(wù)服務(wù)
日本稅費(fèi)
Data Exporter
德國的 TSE 合規(guī)
稅務(wù)報(bào)告
組織設(shè)置
訪問“組織設(shè)置”
管理用戶
賬單
用戶安全
管理商店
組織分析
Shopify Plus Academy
自定義購物體驗(yàn)
自定義購物體驗(yàn)
資金
財(cái)務(wù)概述
Shopify Balance
Shopify Capital
Shopify Credit
Shopify Bill Pay
添加快速訂單列表

免費(fèi) Shopify 模板的版本 11.0.0 或更高版本中支持快速訂單列表分區(qū)。如果您想在商店中添加“快速訂單列表”分區(qū),則可將商店模板更新為最新版本。

如果您不想更改或更新模板,則可以使用 Liquid 或 Javascript 向您的模板中添加代碼,以在產(chǎn)品頁面上顯示“快速訂單列表”分區(qū)。

在更新您的模板文件之前,請(qǐng)確保復(fù)制您的模板以創(chuàng)建備份副本。


拓展您的業(yè)務(wù)

這屬于高級(jí)教程。如果您不擅長(zhǎng)查閱和編輯模板代碼,則您可以與開發(fā)人員合作或聘請(qǐng) Shopify 專家。


添加 Liquid 快速訂單列表代碼

您可以將代碼添加到您模板的以下文件中,以支持“快速訂單列表”分區(qū):

main-product.liquid 或等效文件 步驟: 在 Shopify 后臺(tái)中,轉(zhuǎn)至在線商店 > 模板。 找到要編輯的模板,點(diǎn)擊 ... 按鈕打開操作菜單,然后點(diǎn)擊編輯代碼。 打開要編輯的文件。 在文件底部創(chuàng)建新行,然后添加以下代碼: {%#theme-check-disable%}{%-assignitems_in_cart=cart|line_items_for:product|sum:'quantity'-%}{%#theme-check-enable%}<div class="color-background-1 gradient"> <quick-order-list class="page-width" id="quick-order-list" data-id="{{section.id}}" > <form action="{{routes.cart_update_url}}" class="quick-order-list__contents critical-hidden" method="post" id="QuickOrderList" > <div class="quick-order-list__container" id="main-variant-items"> <div class="js-contents"> <table class="quick-order-list__table"> <caption class="visually-hidden"> Quick Order List </caption> <thead> <tr> <th class="caption-with-letter-spacing" scope="col">{%-ifproduct.has_only_default_variant-%}Product{%-else-%}Variant{%-endif-%}</th> <th class="large-up-hide right caption-with-letter-spacing" scope="col">{%-ifproduct.has_only_default_variant-%}Product subtotal{%-else-%}Variant total{%-endif-%}</th> <th class="quick-order-list__table-heading--wide small-hide medium-hide caption-with-letter-spacing" scope="col" > Quantity </th> <th class="quick-order-list__table-heading--wide small-hide medium-hide caption-with-letter-spacing" scope="col" > Price </th> <th class="small-hide medium-hide right caption-with-letter-spacing" scope="col">{%-ifproduct.has_only_default_variant-%}Product subtotal{%-else-%}Variant total{%-endif-%}</th> </tr> </thead> <tbody>{%-ifproduct.has_only_default_variant-%}{%#theme-check-disable%}{%assigncart_qty=cart|item_count_for_variant:product.selected_or_first_available_variant.id%}{%#theme-check-enable%}<tr class="variant-item" id="Variant-{{product.selected_or_first_available_variant.id}}" data-variant-id="{{product.selected_or_first_available_variant.id}}" data-cart-qty="{{cart_qty}}" > <td class="variant-item__inner"> <div class="variant-item__media"> <div class="variant-item__image-container gradient global-media-settings{%unlessproduct.featured_media%}variant-item__image-container--no-img{%endunless%}">{%ifproduct.featured_media%}{%-assignimg_height=43|divided_by:product.featured_media.aspect_ratio|ceil-%}{{product.featured_media|image_url:width:86|image_tag:loading:'lazy',fetchpriority:'low',decoding:'async',class:'variant-item__image',width:43,height:img_height,widths:'86',alt:product.featured_media.alt|escape}}{%endif%}</div> </div> <div class="small-hide medium-hide"> <span class="variant-item__name h4 break">{{product.title|escape}}</span>{%-ifproduct.sku-%}<span class="variant-item__sku break">{{product.selected_or_first_available_variant.sku|escape}}</span>{%-endif-%}</div> </td> <td class="variant-item__details large-up-hide"> <div class="variant-item__info"> <span class="variant-item__name h4 break">{{variant.title|escape}}</span>{%-ifproduct.selected_or_first_available_variant.sku-%}<span class="variant-item__sku break">{{product.selected_or_first_available_variant.sku|escape}}</span>{%-endif-%}</div>{%-assignitem_price=product.selected_or_first_available_variant.price|money-%}{%-ifproduct.selected_or_first_available_variant.compare_at_price-%}<dl class="variant-item__discounted-prices"> <dt class="visually-hidden"> Regular price </dt> <dd> <s class="variant-item__old-price price price--end">{{product.selected_or_first_available_variant.compare_at_price|money}}</s> </dd> <dt class="visually-hidden"> Sale price </dt> <dd class="price"> <span class="price">{{item_price}}/ea </span> </dd> </dl>{%-else-%}<span class="price">{{item_price}}/ea </span>{%-endif-%}{%-ifproduct.selected_or_first_available_variant.availableandproduct.selected_or_first_available_variant.unit_price_measurement-%}<div class="unit-price caption"> <span class="visually-hidden">Unit price</span>{{product.selected_or_first_available_variant.unit_price|money}}<span aria-hidden="true">/</span> <span class="visually-hidden">&nbsp;per&nbsp;</span>{%-ifproduct.selected_or_first_available_variant.unit_price_measurement.reference_value!=1-%}{{-product.selected_or_first_available_variant.unit_price_measurement.reference_value-}}{%-endif-%}{{product.selected_or_first_available_variant.unit_price_measurement.reference_unit}}</div>{%-endif-%}</td> <td class="variant-item__totals right large-up-hide">{%-render'loading-overlay'-%}{%comment%}TODO: enable theme-check once `line_items_for` is accepted as valid filter{%endcomment%}{%#theme-check-disable%}<span class="price">{{cart|line_items_for:product.selected_or_first_available_variant|sum:'original_line_price'|money}}</span>{%#theme-check-enable%}</td> <td class="variant-item__quantity"> <quantity-popover> <div class="variant-item__quantity-wrapper quantity-popover-wrapper variant-item__quantity-wrapper--no-info"> <label class="visually-hidden" for="Quantity-{{variant.id}}"> Quantity </label> <div class="quantity-popover-container">{%-ifproduct.selected_or_first_available_variant.available==false-%}<span class="variant-item__sold-out h4"> Sold out </span>{%-else-%}{%comment%}TODO: Remove theme check{%endcomment%}{%#theme-check-disable%}{%assigncart_qty=cart|item_count_for_variant:product.selected_or_first_available_variant.id%}{%#theme-check-enable%}{%render'quantity-input',variant:product.selected_or_first_available_variant%}{%-endif-%}</div>{%-ifcart_qty>0-%}<quick-order-list-remove-button id="Remove-{{product.selected_or_first_available_variant.id}}" data-index="{{product.selected_or_first_available_variant.id}}" > <a href="{{product.selected_or_first_available_variant.url_to_remove}}" class="button button--tertiary" aria-label="Remove{{variant.title}}" >{%render'icon-remove'%}</a> </quick-order-list-remove-button>{%-endif-%}</div> <div class="variant-item__error large-up-hide" id="Quick-order-list-item-error-mobile-{{product.selected_or_first_available_variant.id}}" role="alert" > <small class="variant-item__error-text"></small>{%render'icon-error'%}</div> </quantity-popover> </td>{%-assignitem_price=product.selected_or_first_available_variant.price|money-%}<td class="variant-item__price small-hide medium-hide">{%-ifvariant.compare_at_price-%}<dl class="variant-item__discounted-prices"> <dt class="visually-hidden"> Regular price </dt> <dd> <s class="variant-item__old-price price price--end">{{product.selected_or_first_available_variant.compare_at_price|money}}</s> </dd> <dt class="visually-hidden"> Sale price </dt> <dd class="price"> <span class="price">{{item_price}}/ea </span> </dd> </dl>{%-else-%}<span class="price">{{item_price}}/ea </span>{%-endif-%}{%-ifproduct.selected_or_first_available_variant.availableandproduct.selected_or_first_available_variant.unit_price_measurement-%}<div class="unit-price caption"> <span class="visually-hidden">Unit price</span>{{variant.unit_price|money}}<span aria-hidden="true">/</span> <span class="visually-hidden">&nbsp;per&nbsp;</span>{%-ifproduct.selected_or_first_available_variant.unit_price_measurement.reference_value!=1-%}{{-product.selected_or_first_available_variant.unit_price_measurement.reference_value-}}{%-endif-%}{{product.selected_or_first_available_variant.unit_price_measurement.reference_unit}}</div>{%-endif-%}</td> <td class="variant-item__totals right small-hide medium-hide">{%-render'loading-overlay'-%}{%comment%}TODO: enable theme-check once `line_items_for` is accepted as valid filter{%endcomment%}{%#theme-check-disable%}<span class="price">{{cart|line_items_for:product.selected_or_first_available_variant|sum:'original_line_price'|money}}</span>{%#theme-check-enable%}</td> </tr> <tr class="small-hide medium-hide hidden desktop-row-error"> <td></td> <td> <div class="variant-item__error" id="Quick-order-list-item-error-desktop-{{variant.id}}" role="alert"> <small class="variant-item__error-text"></small>{%render'icon-error'%}</div> </td> <td></td> <td></td> </tr>{%-else-%}{%-forvariantinproduct.variants-%}{%#theme-check-disable%}{%assigncart_qty=cart|item_count_for_variant:variant.id%}{%#theme-check-enable%}<tr class="variant-item" id="Variant-{{variant.id}}" data-variant-id="{{variant.id}}" data-cart-qty="{{cart_qty}}" > <td class="variant-item__inner"> <div class="variant-item__media"> <div class="variant-item__image-container gradient global-media-settings{%unlessvariant.image%}variant-item__image-container--no-img{%endunless%}">{%ifvariant.image%}{%-assignimg_height=43|divided_by:variant.image.aspect_ratio|ceil-%}{{variant.image|image_url:width:86|image_tag:loading:'lazy',fetchpriority:'low',decoding:'async',class:'variant-item__image',width:43,height:img_height,widths:'86',alt:variant.image.alt|escape}}{%endif%}</div> </div> <div class="small-hide medium-hide"> <span class="variant-item__name h4 break">{{variant.title|escape}}</span>{%-ifvariant.sku-%}<span class="variant-item__sku break">{{variant.sku|escape}}</span>{%-endif-%}</div> </td> <td class="variant-item__details large-up-hide"> <div class="variant-item__info"> <span class="variant-item__name h4 break">{{variant.title|escape}}</span>{%-ifvariant.sku-%}<span class="variant-item__sku break">{{variant.sku|escape}}</span>{%-endif-%}</div>{%-assignitem_price=variant.price|money-%}{%-ifvariant.compare_at_price-%}<dl class="variant-item__discounted-prices"> <dt class="visually-hidden"> Regular price </dt> <dd> <s class="variant-item__old-price price price--end">{{variant.compare_at_price|money}}</s> </dd> <dt class="visually-hidden"> Sale price </dt> <dd class="price"> <span class="price">{{item_price}}/ea </span> </dd> </dl>{%-else-%}<span class="price">{{item_price}}/ea </span>{%-endif-%}{%-ifvariant.availableandvariant.unit_price_measurement-%}<div class="unit-price caption"> <span class="visually-hidden">Unit price</span>{{variant.unit_price|money}}<span aria-hidden="true">/</span> <span class="visually-hidden">&nbsp;per&nbsp;</span>{%-ifvariant.unit_price_measurement.reference_value!=1-%}{{-variant.unit_price_measurement.reference_value-}}{%-endif-%}{{variant.unit_price_measurement.reference_unit}}</div>{%-endif-%}</td> <td class="variant-item__totals right large-up-hide">{%-render'loading-overlay'-%}{%comment%}TODO: enable theme-check once `line_items_for` is accepted as valid filter{%endcomment%}{%#theme-check-disable%}<span class="price">{{cart|line_items_for:variant|sum:'original_line_price'|money}}</span>{%#theme-check-enable%}</td> <td class="variant-item__quantity"> <quantity-popover> <div class="variant-item__quantity-wrapper quantity-popover-wrapper variant-item__quantity-wrapper--no-info"> <label class="visually-hidden" for="Quantity-{{variant.id}}"> Quantity </label> <div class="quantity-popover-container">{%-ifvariant.available==false-%}<span class="variant-item__sold-out h4">Sold out</span>{%-else-%}{%comment%}TODO: Remove theme check{%endcomment%}{%#theme-check-disable%}{%assigncart_qty=cart|item_count_for_variant:variant.id%}{%#theme-check-enable%}{%render'quantity-input',variant:variant%}{%-endif-%}</div>{%-ifcart_qty>0-%}<quick-order-list-remove-button id="Remove-{{variant.id}}" data-index="{{variant.id}}" > <a href="{{variant.url_to_remove}}" class="button button--tertiary" aria-label="Remove{{variant.title}}" >{%render'icon-remove'%}</a> </quick-order-list-remove-button>{%-endif-%}</div> <div class="variant-item__error large-up-hide" id="Quick-order-list-item-error-mobile-{{variant.id}}" role="alert" > <small class="variant-item__error-text"></small>{%render'icon-error'%}</div> </quantity-popover> </td>{%-assignitem_price=variant.price|money-%}<td class="variant-item__price small-hide medium-hide">{%-ifvariant.compare_at_price-%}<dl class="variant-item__discounted-prices"> <dt class="visually-hidden"> Regular price </dt> <dd> <s class="variant-item__old-price price price--end">{{variant.compare_at_price|money}}</s> </dd> <dt class="visually-hidden"> Sale price </dt> <dd class="price"> <span class="price">{{item_price}}/ea </span> </dd> </dl>{%-else-%}<span class="price">{{item_price}}/ea </span>{%-endif-%}{%-ifvariant.availableandvariant.unit_price_measurement-%}<div class="unit-price caption"> <span class="visually-hidden">Unit price</span>{{variant.unit_price|money}}<span aria-hidden="true">/</span> <span class="visually-hidden">&nbsp;per&nbsp;</span>{%-ifvariant.unit_price_measurement.reference_value!=1-%}{{-variant.unit_price_measurement.reference_value-}}{%-endif-%}{{variant.unit_price_measurement.reference_unit}}</div>{%-endif-%}</td> <td class="variant-item__totals right small-hide medium-hide">{%-render'loading-overlay'-%}{%comment%}TODO: enable theme-check once `line_items_for` is accepted as valid filter{%endcomment%}{%#theme-check-disable%}<span class="price">{{cart|line_items_for:variant|sum:'original_line_price'|money}}</span>{%#theme-check-enable%}</td> </tr> <tr class="small-hide medium-hide hidden desktop-row-error"> <td></td> <td> <div class="variant-item__error" id="Quick-order-list-item-error-desktop-{{variant.id}}" role="alert"> <small class="variant-item__error-text"></small>{%render'icon-error'%}</div> </td> <td></td> <td></td> </tr>{%-endfor-%}{%-endif-%}</tbody> </table> </div> <noscript>{%-ifproduct.has_only_default_variantorproduct.variants.size==1-%}<button type="submit" class="button button--secondary right" formnovalidate form="QuickOrderList"> Update </button>{%-endif-%}</noscript> </div> <p class="visually-hidden" id="quick-order-list-live-region-text" aria-live="polite" role="status"></p> <p class="visually-hidden" id="shopping-cart-variant-item-status" aria-live="polite" aria-hidden="true" role="status" > Loading... </p> </form>{%-ifproduct.has_only_default_variantorproduct.variants.size==1-%}<span class="quick-order-list-error">{%comment%}Populated by JS{%endcomment%}</span>{%-else-%}<div class="quick-order-list__total gradient" id="quick-order-list-total"> <div class="quick-order-list-total__info"> <div class="quick-order-list-total__column small-hide medium-hide"> <div class="quick-order-list-buttons"> <a href="{{routes.cart_url}}" class="quick-order-list__button button button--secondary small-hide medium-hide" > <span class="quick-order-list__button-text">View cart</span> </a> <div class="variant-remove-total">{%-render'loading-overlay'-%}<quick-order-list-remove-all-button class="no-js-hidden" data-action="confirm" > <button class="button button--tertiary" type="button">{%render'icon-remove'%}<span class="text-body">Remove all</span> </button> </quick-order-list-remove-all-button> </div> </div> <span class="quick-order-list__message caption-large" role="status"> <span class="quick-order-list__message-icon hidden">{%-render'icon-checkmark'-%}</span> <span class="quick-order-list__message-text"></span> </span> <span class="quick-order-list-error">{%comment%}Populated by JS{%endcomment%}</span> </div> <div class="quick-order-list__total-items"> <h3>{{items_in_cart}}</h3> <p class="h5">Total items</p> </div> <div class="quick-order-list-total__price"> <noscript> <button type="submit" class="button button--secondary" formnovalidate form="QuickOrderList"> Update </button> </noscript> <div class="totals__product-total"> <h3 class="totals__subtotal-value">{%comment%}TODO: enable theme-check once `line_items_for` is accepted as valid filter{%endcomment%}{%#theme-check-disable%}{{cart|line_items_for:product|sum:'original_line_price'|money}}{%#theme-check-enable%}</h3> <p class="totals__subtotal h5">Product subtotal</p> </div> <small class="tax-note caption-large rte">{%-ifcart.taxes_includedandshop.shipping_policy.body!=blank-%}Tax included. <a href="{{shop.shipping_policy.url}}">Shipping</a> and discounts calculated at checkout.{%-elsifcart.taxes_included-%}Tax included and shipping and discounts calculated at checkout{%-elsifshop.shipping_policy.body!=blank-%}Taxes, Discounts and <a href="{{shop.shipping_policy.url}}">shipping</a> calculated at checkout{%-else-%}Taxes, discounts and shipping calculated at checkout{%-endif-%}</small> </div> <div class="quick-order-list-total__column large-up-hide"> <div class="quick-order-list-buttons"> <a href="{{routes.cart_url}}" class="quick-order-list__button button button--secondary button--full-width" > <span class="quick-order-list__button-text">View cart</span> </a> <div class="variant-remove-total">{%-render'loading-overlay'-%}<quick-order-list-remove-all-button class="no-js-hidden" data-action="confirm" > <button class="button button--tertiary" type="button">{%render'icon-remove'%}<span class="text-body">Remove all</span> </button> </quick-order-list-remove-all-button> </div> </div> <span class="quick-order-list__message caption-large" role="status"> <span class="quick-order-list__message-icon hidden">{%-render'icon-checkmark'-%}</span> <span class="quick-order-list__message-text"></span> </span> <span class="quick-order-list-error">{%comment%}Populated by JS{%endcomment%}</span> </div> </div> <div class="quick-order-list-total__confirmation hidden"> <span class="text-body"> Remove all{{items_in_cart}}items from your cart? </span> <quick-order-list-remove-all-button data-action="remove" > <button class="quick-order-list__button-confirm button button--secondary" type="button" > Remove all </button> </quick-order-list-remove-all-button> <quick-order-list-remove-all-button data-action="cancel" > <button class="quick-order-list__button-cancel button button--tertiary" type="button" > Cancel </button> </quick-order-list-remove-all-button> </div> </div>{%-endif-%}</quick-order-list> <template id="QuickOrderListErrorTemplate-{{section.id}}">{%render'icon-error'%}<span class="quick-order-list-error-message caption-large" role="alert"></span> </template> </div> 點(diǎn)擊保存。


添加 Javascript 快速訂單列表代碼

當(dāng)多屬性的購物車數(shù)量發(fā)生變化時(shí),產(chǎn)品小計(jì)、多屬性小計(jì)和可能出現(xiàn)的錯(cuò)誤狀態(tài)將會(huì)更新。可以使用 Javascript 代碼獲取更新后的值。

您可以向 theme.js 文件或等效文件中添加代碼。

步驟:

在 Shopify 后臺(tái)中,轉(zhuǎn)至在線商店 > 模板。 找到要編輯的模板,點(diǎn)擊 ... 按鈕打開操作菜單,然后點(diǎn)擊編輯代碼。 打開 theme.js 文件。 在文件底部創(chuàng)建新行,然后添加以下代碼: classQuickOrderListRemoveButtonextendsHTMLElement{constructor(){super();this.addEventListener('click',(event)=>{event.preventDefault();constquickOrderList=this.closest('quick-order-list');quickOrderList.updateQuantity(this.dataset.index,0);});}}customElements.define('quick-order-list-remove-button',QuickOrderListRemoveButton);classQuickOrderListRemoveAllButtonextendsHTMLElement{constructor(){super();constallVariants=Array.from(document.querySelectorAll('[data-variant-id]'));constitems={}lethasVariantsInCart=false;this.quickOrderList=this.closest('quick-order-list');allVariants.forEach((variant)=>{constcartQty=parseInt(variant.dataset.cartQty);if(cartQty>0){hasVariantsInCart=true;items[parseInt(variant.dataset.variantId)]=0;}});if(!hasVariantsInCart){this.classList.add('hidden');}this.actions={confirm:'confirm',remove:'remove',cancel:'cancel'}this.addEventListener('click',(event)=>{event.preventDefault();if(this.dataset.action===this.actions.confirm){this.toggleConfirmation(false,true);}elseif(this.dataset.action===this.actions.remove){this.quickOrderList.updateMultipleQty(items);this.toggleConfirmation(true,false);}elseif(this.dataset.action===this.actions.cancel){this.toggleConfirmation(true,false);}});}toggleConfirmation(showConfirmation,showInfo){this.quickOrderList.querySelector('.quick-order-list-total__confirmation').classList.toggle('hidden',showConfirmation);this.quickOrderList.querySelector('.quick-order-list-total__info').classList.toggle('hidden',showInfo)}}customElements.define('quick-order-list-remove-all-button',QuickOrderListRemoveAllButton);classQuickOrderListextendsHTMLElement{constructor(){super();this.cart=document.querySelector('cart-drawer');this.actions={add:'ADD',update:'UPDATE'}this.quickOrderListId='quick-order-list'this.variantItemStatusElement=document.getElementById('shopping-cart-variant-item-status');constform=this.querySelector('form');form.addEventListener('submit',this.onSubmit.bind(this));constdebouncedOnChange=debounce((event)=>{this.onChange(event);},ON_CHANGE_DEBOUNCE_TIMER);this.addEventListener('change',debouncedOnChange.bind(this));}cartUpdateUnsubscriber=undefined;onSubmit(event){event.preventDefault();}connectedCallback(){this.cartUpdateUnsubscriber=subscribe(PUB_SUB_EVENTS.cartUpdate,(event)=>{if(event.source===this.quickOrderListId){return;}// If its another section that made the updatethis.onCartUpdate();});this.sectionId=this.dataset.id;}disconnectedCallback(){if(this.cartUpdateUnsubscriber){this.cartUpdateUnsubscriber();}}onChange(event){constinputValue=parseInt(event.target.value);constcartQuantity=parseInt(event.target.dataset.cartQuantity);constindex=event.target.dataset.index;constname=document.activeElement.getAttribute('name');constquantity=inputValue-cartQuantity;if(cartQuantity>0){this.updateQuantity(index,inputValue,name,this.actions.update);}else{this.updateQuantity(index,quantity,name,this.actions.add);}}onCartUpdate(){fetch(`${window.location.pathname}?section_id=${this.sectionId}`).then((response)=>response.text()).then((responseText)=>{consthtml=newDOMParser().parseFromString(responseText,'text/html');constsourceQty=html.querySelector(this.quickOrderListId);this.innerHTML=sourceQty.innerHTML;}).catch(e=>{console.error(e);});}getSectionsToRender(){return[{id:this.quickOrderListId,section:document.getElementById(this.quickOrderListId).dataset.id,selector:'.js-contents'},{id:'cart-icon-bubble',section:'cart-icon-bubble',selector:'.shopify-section'},{id:'quick-order-list-live-region-text',section:'cart-live-region-text',selector:'.shopify-section'},{id:'quick-order-list-total',section:document.getElementById(this.quickOrderListId).dataset.id,selector:'.quick-order-list__total'},{id:'CartDrawer',selector:'#CartDrawer',section:'cart-drawer'}];}renderSections(parsedState){this.getSectionsToRender().forEach((section=>{constsectionElement=document.getElementById(section.id);if(sectionElement&&sectionElement.parentElement&&sectionElement.parentElement.classList.contains('drawer')){parsedState.items.length>0?sectionElement.parentElement.classList.remove('is-empty'):sectionElement.parentElement.classList.add('is-empty');setTimeout(()=>{document.querySelector('#CartDrawer-Overlay').addEventListener('click',this.cart.close.bind(this.cart));});}constelementToReplace=sectionElement&&sectionElement.querySelector(section.selector)?sectionElement.querySelector(section.selector):sectionElement;if(elementToReplace){elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector);}}));}updateMultipleQty(items){this.querySelector('.variant-remove-total .loading-overlay').classList.remove('hidden');constbody=JSON.stringify({updates:items,sections:this.getSectionsToRender().map((section)=>section.section),sections_url:window.location.pathname});this.updateMessage();this.setErrorMessage();fetch(`${routes.cart_update_url}`,{...fetchConfig(),...{body}}).then((response)=>{returnresponse.text();}).then((state)=>{constparsedState=JSON.parse(state);this.renderSections(parsedState);}).catch(()=>{this.setErrorMessage('There was an error while updating your cart. Please try again.');}).finally(()=>{this.querySelector('.variant-remove-total .loading-overlay').classList.add('hidden');});}updateQuantity(id,quantity,name,action){this.toggleLoading(id,true);letrouteUrl=routes.cart_change_url;letbody=JSON.stringify({quantity,id,sections:this.getSectionsToRender().map((section)=>section.section),sections_url:window.location.pathname});letfetchConfigType;if(action===this.actions.add){fetchConfigType='javascript';routeUrl=routes.cart_add_url;body=JSON.stringify({items:[{quantity:parseInt(quantity),id:parseInt(id)}],sections:this.getSectionsToRender().map((section)=>section.section),sections_url:window.location.pathname});}this.updateMessage();this.setErrorMessage();fetch(`${routeUrl}`,{...fetchConfig(fetchConfigType),...{body}}).then((response)=>{returnresponse.text();}).then((state)=>{constparsedState=JSON.parse(state);constquantityElement=document.getElementById(`Quantity-${id}`);constitems=document.querySelectorAll('.variant-item');if(parsedState.description||parsedState.errors){constvariantItem=document.querySelector(`[id^="Variant-${id}"] .variant-item__totals.small-hide .loading-overlay`);variantItem.classList.add('loading-overlay--error');this.resetQuantityInput(id,quantityElement);if(parsedState.errors){this.updateLiveRegions(id,parsedState.errors);}else{this.updateLiveRegions(id,parsedState.description);}return;}this.classList.toggle('is-empty',parsedState.item_count===0);this.renderSections(parsedState);lethasError=false;constcurrentItem=parsedState.items.find((item)=>item.variant_id===parseInt(id));constupdatedValue=currentItem?currentItem.quantity:undefined;if(updatedValue&&updatedValue!==quantity){this.updateError(updatedValue,id);hasError=true;}constvariantItem=document.getElementById(`Variant-${id}`);if(variantItem&&variantItem.querySelector(`[name="${name}"]`)){variantItem.querySelector(`[name="${name}"]`).focus();}publish(PUB_SUB_EVENTS.cartUpdate,{source:this.quickOrderListId,cartData:parsedState});if(hasError){this.updateMessage();}elseif(action===this.actions.add){this.updateMessage(parseInt(quantity))}elseif(action===this.actions.update){this.updateMessage(parseInt(quantity-quantityElement.dataset.cartQuantity))}else{this.updateMessage(-parseInt(quantityElement.dataset.cartQuantity))}}).catch((error)=>{this.querySelectorAll('.loading-overlay').forEach((overlay)=>overlay.classList.add('hidden'));this.resetQuantityInput(id);console.error(error);this.setErrorMessage('There was an error while updating your cart. Please try again.');}).finally(()=>{this.toggleLoading(id);});}resetQuantityInput(id,quantityElement){constinput=quantityElement??document.getElementById(`Quantity-${id}`);input.value=input.getAttribute('value');}setErrorMessage(message=null){this.errorMessageTemplate=this.errorMessageTemplate??document.getElementById(`QuickOrderListErrorTemplate-${this.sectionId}`).cloneNode(true);consterrorElements=document.querySelectorAll('.quick-order-list-error');errorElements.forEach((errorElement)=>{errorElement.innerHTML='';if(!message)return;constupdatedMessageElement=this.errorMessageTemplate.cloneNode(true);updatedMessageElement.content.querySelector('.quick-order-list-error-message').innerText=message;errorElement.appendChild(updatedMessageElement.content);});}updateMessage(quantity=null){constmessages=this.querySelectorAll('.quick-order-list__message-text');consticons=this.querySelectorAll('.quick-order-list__message-icon');if(quantity===null||isNaN(quantity)){messages.forEach(message=>message.innerHTML='');icons.forEach(icon=>icon.classList.add('hidden'));return;}constisQuantityNegative=quantity<0;constabsQuantity=Math.abs(quantity);consttextTemplate=isQuantityNegative?(absQuantity===1?`${absQuantity}item removed`:`${absQuantity}items removed`):(quantity===1?`${absQuantity}item added`:`${absQuantity}items added`)messages.forEach((msg)=>msg.innerHTML=textTemplate);if(!isQuantityNegative){icons.forEach((i)=>i.classList.remove('hidden'));}}updateError(updatedValue,id){letmessage='';if(typeofupdatedValue==='undefined'){message='There was an error while updating your cart. Please try again.';}else{message=`You can only add${updatedValue}of this item to your cart.`;}this.updateLiveRegions(id,message);}updateLiveRegions(id,message){constvariantItemErrorDesktop=document.getElementById(`Quick-order-list-item-error-desktop-${id}`);constvariantItemErrorMobile=document.getElementById(`Quick-order-list-item-error-mobile-${id}`);if(variantItemErrorDesktop){variantItemErrorDesktop.querySelector('.variant-item__error-text').innerHTML=message;variantItemErrorDesktop.closest('tr').classList.remove('hidden');}if(variantItemErrorMobile)variantItemErrorMobile.querySelector('.variant-item__error-text').innerHTML=message;this.variantItemStatusElement.setAttribute('aria-hidden',true);constcartStatus=document.getElementById('quick-order-list-live-region-text');cartStatus.setAttribute('aria-hidden',false);setTimeout(()=>{cartStatus.setAttribute('aria-hidden',true);},1000);}getSectionInnerHTML(html,selector){returnnewDOMParser().parseFromString(html,'text/html').querySelector(selector).innerHTML;}toggleLoading(id,enable){constquickOrderList=document.getElementById(this.quickOrderListId);constquickOrderListItems=this.querySelectorAll(`#Variant-${id}.loading-overlay`);if(enable){quickOrderList.classList.add('quick-order-list__container--disabled');[...quickOrderListItems].forEach((overlay)=>overlay.classList.remove('hidden'));document.activeElement.blur();this.variantItemStatusElement.setAttribute('aria-hidden',false);}else{quickOrderList.classList.remove('quick-order-list__container--disabled');quickOrderListItems.forEach((overlay)=>overlay.classList.add('hidden'));}}}customElements.define('quick-order-list',QuickOrderList); 點(diǎn)擊保存。

欧美毛片又粗又长又大电影| 娇喘激情嗯啊污文| 国产高清精品软件丝瓜软件| 亚洲AV成人无码久久精品A片| 亚洲 欧美 日韩中字幕| 亚洲AV无码一区东京热在线播放| 欧美精品久久久久久无码人妻| AV色蜜桃一区二区三区| 色戒汤唯梁朝伟七分频视频| 国产一区二区中文字幕| 国产AV国片偷人妻麻豆潘甜软件| 日本黄色高清一区|