shopify添加到購(gòu)物車(chē)按鈕隱藏和顯示步驟-ESG跨境

shopify添加到購(gòu)物車(chē)按鈕隱藏和顯示步驟

shopify新聞
shopify新聞
2022-03-28
點(diǎn)贊icon 0
查看icon 1151

禁用購(gòu)物車(chē)


模板,不適用于“Online Store 2.0”模板。

  • 找到您的模板架構(gòu)版本

  • 探索“Online Store 2.0”模板自定義


您可以在店面中隱藏添加到購(gòu)物車(chē)按鈕,并在將來(lái)再次顯示這些按鈕。

備注:此自定義設(shè)置與動(dòng)態(tài)結(jié)賬按鈕不兼容。如果您的模板支持動(dòng)態(tài)結(jié)賬,請(qǐng)按照在產(chǎn)品頁(yè)面上隱藏動(dòng)態(tài)結(jié)賬按鈕的步驟來(lái)阻止顯示按鈕。

分區(qū)模板和未分區(qū)模板

備注:本教程的步驟將根據(jù)您使用的是分區(qū)模板還是未分區(qū)模板而有所不同。分區(qū)模板支持通過(guò)拖放來(lái)安排主頁(yè)的布局,未分區(qū)模板則不支持。

如果想了解您的模板是否支持分區(qū),請(qǐng)轉(zhuǎn)到模板的編輯代碼頁(yè)面。如果 Sections 目錄中有文件,您則正在使用已分區(qū)模板。未分區(qū)模板是在 2016 年 10 月之前發(fā)布的,并且 Sections 目錄中沒(méi)有文件。

如果您使用已分區(qū)模板,請(qǐng)點(diǎn)擊 Sectioned themes(已分區(qū)模板)按鈕并按照說(shuō)明進(jìn)行操作。如果您使用較舊的未分區(qū)模板,請(qǐng)點(diǎn)擊 Non-sectioned themes(未分區(qū)模板)按鈕并按照說(shuō)明進(jìn)行操作。

PC:

  1. 在 Shopify 后臺(tái)中,轉(zhuǎn)到在線商店 > 模板。

  2. 找到要編輯的模板,然后點(diǎn)擊操作 > 編輯代碼。

  1. 在 Sections 目錄中,點(diǎn)擊打開(kāi) product-template.liquid 文件。查找添加到購(gòu)物車(chē)按鈕對(duì)應(yīng)的 HTML 代碼。您可以首先搜索 cart 一詞。

“添加到購(gòu)物車(chē)”按鈕的代碼因模板而異。請(qǐng)查找包含 Add to cart、AddToCart 或 add-to-cart 等類(lèi)似文本的 <input> 或 <button> 標(biāo)記。

蘋(píng)果系統(tǒng):

  1. 在 Shopify 后臺(tái)中,轉(zhuǎn)到 > 模板。

  2. 找到要編輯的模板,然后點(diǎn)擊操作 > 編輯代碼。

  1. 在 Sections 目錄中,點(diǎn)擊打開(kāi) product-template.liquid 文件。查找添加到購(gòu)物車(chē)按鈕對(duì)應(yīng)的 HTML 代碼。您可以首先搜索 cart 一詞。

“添加到購(gòu)物車(chē)”按鈕的代碼因模板而異。請(qǐng)查找包含 Add to cart、AddToCart 或 add-to-cart 等類(lèi)似文本的 <input> 或 <button> 標(biāo)記。

安卓系統(tǒng):

  1. 在 Shopify 后臺(tái)中,轉(zhuǎn)到在線商店 > 模板。

  2. 找到要編輯的模板,然后點(diǎn)擊操作 > 編輯代碼。

  1. 在 Sections 目錄中,點(diǎn)擊打開(kāi) product-template.liquid 文件。查找添加到購(gòu)物車(chē)按鈕對(duì)應(yīng)的 HTML 代碼。您可以首先搜索 cart 一詞。

“添加到購(gòu)物車(chē)”按鈕的代碼因模板而異。請(qǐng)查找包含 Add to cart、AddToCart 或 add-to-cart 等類(lèi)似文本的 <input> 或 <button> 標(biāo)記。

在 Debut 模板中,“添加到”按鈕的代碼如下所示:

<button type="submit" name="add"  {% unless current_variant.available %}disabled="disabled"{% endunless %} Default Title' %} product-form__cart-submit--small{% endif %}">      <span >        {% unless current_variant.available %}          {{ 'products.product.sold_out' | t }}        {% else %}          {{ 'products.product.add_to_cart' | t }}        {% endunless %}      </span>    </button>
  1. 找到代碼后,將它放入 Liquid {% comment %} 和 {% endcomment %} 標(biāo)記之間。這將會(huì)阻止該代碼在您的商店中顯示,但如果您想稍后更改您的新模板,您可以輕松將其恢復(fù)。

Using the example above, the new code would look like this: ``` liquid {% comment %} <button type="submit" name="add"  {% unless current_variant.available %}disabled="disabled"{% endunless %} Default Title' %} product-form__cart-submit--small{% endif %}">   <span >     {% unless current_variant.available %}       {{ 'products.product.sold_out' | t }}     {% else %}       {{ 'products.product.add_to_cart' | t }}     {% endunless %}   </span> </button> {% endcomment %}


for the add to cart button varies theme to theme. Look for an <input> or <button> tag with text like Add to cartAddToCart, or add-to-cart.

iPhone:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. In the Sections directory, click to open your product-template.liquid file. Find the HTML code for the Add to cart button. You can search for the word cart as a start.

The code for the add to cart button varies theme to theme. Look for an <input> or <button> tag with text like Add to cartAddToCart, or add-to-cart.

Android:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. In the Sections directory, click to open your product-template.liquid file. Find the HTML code for the Add to cart button. You can search for the word cart as a start.

The code for the add to cart button varies theme to theme. Look for an <input> or <button> tag with text like Add to cartAddToCart, or add-to-cart.

In the Debut theme, the add to cart button code looks like this:

   <button type="submit" name="add"  {% unless current_variant.available %}disabled="disabled"{% endunless %} Default Title' %} product-form__cart-submit--small{% endif %}">      <span >        {% unless current_variant.available %}          {{ 'products.product.sold_out' | t }}        {% else %}          {{ 'products.product.add_to_cart' | t }}        {% endunless %}      </span>    </button>
  1. When you find the code, wrap it in Liquid {% comment %} and {% endcomment %} tags. This will stop the code from being shown on your store, but will let you easily put it back if you want to change your new template later.

    Using the example above, the new code would look like this:

    {% comment %} <button type="submit" name="add"  {% unless current_variant.available %}disabled="disabled"{% endunless %} Default Title' %} product-form__cart-submit--small{% endif %}">   <span >     {% unless current_variant.available %}       {{ 'products.product.sold_out' | t }}     {% else %}       {{ 'products.product.add_to_cart' | t }}     {% endunless %}   </span> </button> {% endcomment %}
    duct page.

  1. Click Save to confirm your changes.

When you are ready to show your Add to cart buttons again, go back to your product-template.liquid file on the Edit HTML/CSS page, remove the {% comment %} and {% endcomment %} tags, and click Save.



特別聲明:以上文章內(nèi)容僅代表作者本人觀點(diǎn),不代表ESG跨境電商觀點(diǎn)或立場(chǎng)。如有關(guān)于作品內(nèi)容、版權(quán)或其它問(wèn)題請(qǐng)于作品發(fā)表后的30日內(nèi)與ESG跨境電商聯(lián)系。

搜索 放大鏡
韓國(guó)平臺(tái)交流群
加入
韓國(guó)平臺(tái)交流群
掃碼進(jìn)群
歐洲多平臺(tái)交流群
加入
歐洲多平臺(tái)交流群
掃碼進(jìn)群
美國(guó)賣(mài)家交流群
加入
美國(guó)賣(mài)家交流群
掃碼進(jìn)群
ESG跨境專(zhuān)屬福利分享群
加入
ESG跨境專(zhuān)屬福利分享群
掃碼進(jìn)群
拉美電商交流群
加入
拉美電商交流群
掃碼進(jìn)群
亞馬遜跨境增長(zhǎng)交流群
加入
亞馬遜跨境增長(zhǎng)交流群
掃碼進(jìn)群
亞馬遜跨境增長(zhǎng)交流群
加入
亞馬遜跨境增長(zhǎng)交流群
掃碼進(jìn)群
拉美電商交流群
加入
拉美電商交流群
掃碼進(jìn)群
ESG獨(dú)家招商-PHH GROUP賣(mài)家交流群
加入
ESG獨(dú)家招商-PHH GROUP賣(mài)家交流群
掃碼進(jìn)群
《TikTok官方運(yùn)營(yíng)干貨合集》
《TikTok綜合運(yùn)營(yíng)手冊(cè)》
《TikTok短視頻運(yùn)營(yíng)手冊(cè)》
《TikTok直播運(yùn)營(yíng)手冊(cè)》
《TikTok全球趨勢(shì)報(bào)告》
《韓國(guó)節(jié)日營(yíng)銷(xiāo)指南》
《開(kāi)店大全-全球合集》
《開(kāi)店大全-主流平臺(tái)篇》
《開(kāi)店大全-東南亞篇》
《CD平臺(tái)自注冊(cè)指南》
通過(guò)ESG入駐平臺(tái),您將解鎖
綠色通道,更高的入駐成功率
專(zhuān)業(yè)1v1客戶經(jīng)理服務(wù)
運(yùn)營(yíng)實(shí)操指導(dǎo)
運(yùn)營(yíng)提效資源福利
平臺(tái)官方專(zhuān)屬優(yōu)惠

立即登記,定期獲得更多資訊

訂閱
聯(lián)系顧問(wèn)

平臺(tái)顧問(wèn)

平臺(tái)顧問(wèn) 平臺(tái)顧問(wèn)

微信掃一掃
馬上聯(lián)系在線顧問(wèn)

icon icon

小程序

微信小程序

ESG跨境小程序
手機(jī)入駐更便捷

icon icon

返回頂部

【免費(fèi)領(lǐng)取】全球跨境電商運(yùn)營(yíng)干貨 關(guān)閉
進(jìn)行中
進(jìn)行中
【活動(dòng)報(bào)名】2024年歐洲多藍(lán)海平臺(tái)招商沙龍
官方親臨,拆解phh group/eMAG/worten三個(gè)平臺(tái)商機(jī)
立即報(bào)名
進(jìn)行中
進(jìn)行中
TikTok運(yùn)營(yíng)必備干貨包
包含8個(gè)TikTok最新運(yùn)營(yíng)指南(市場(chǎng)趨勢(shì)、運(yùn)營(yíng)手冊(cè)、節(jié)日攻略等),官方出品,專(zhuān)業(yè)全面!
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
韓國(guó)電商節(jié)日營(yíng)銷(xiāo)指南
10+韓國(guó)電商重要營(yíng)銷(xiāo)節(jié)點(diǎn)詳細(xì)解讀;2024各節(jié)日熱度選品助力引爆訂單增長(zhǎng);8大節(jié)日營(yíng)銷(xiāo)技巧輕松撬動(dòng)大促流量密碼。
免費(fèi)領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——全球合集
涵括全球100+個(gè)電商平臺(tái)的核心信息,包括平臺(tái)精煉簡(jiǎn)介、競(jìng)爭(zhēng)優(yōu)勢(shì)、熱銷(xiāo)品類(lèi)、入駐要求以及入駐須知等關(guān)鍵內(nèi)容。
立即領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——主流平臺(tái)篇
火爆全球的跨境電商平臺(tái)合集,平臺(tái)優(yōu)勢(shì)、開(kāi)店選品、入駐條件盡在掌握
立即領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——拉美篇
涵蓋9大熱門(mén)拉美電商平臺(tái),成熟的市場(chǎng)是跨境賣(mài)家的熱門(mén)選擇!
立即領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——日韓篇
涵蓋10+日韓電商平臺(tái),入駐條件一看就懂,優(yōu)勢(shì)熱銷(xiāo)品應(yīng)有盡有
立即領(lǐng)取
進(jìn)行中
進(jìn)行中
全球平臺(tái)詳解——?dú)W洲篇
涵蓋20+歐洲電商平臺(tái),詳細(xì)解讀優(yōu)勢(shì)、入駐條件、熱銷(xiāo)品等
立即領(lǐng)取