独立站Shopify如何更改产品页默认付款按钮文本和添加Pre Order预定按钮等

Last Updated: 15 11 月, 2024By

在使用Shopify独立站时,有时候我们需要预售产品,增加预定Pre Order Now按钮或者将默认的购买按钮文本Buy Now或者Pay with Paypal改成自定义按钮,比如Custom Now或Pre-Order Now。如何实现呢?

方法很简单:

1.打开“在线商店”-》“模板”-》“自定义”,进入到主题编辑页面,然后基于“默认产品”模板创建1个自定义的产品页面模板,如下图:

2.在左侧”Section”模板下的“模板”-》“Product Information”下添加块“Custom liquid”,

shopify自定义产品模板

Shopify自定义产品模板

打开的custom liquid区的右侧代码输入框中输入如下代码即可:

/**不带terms简洁版本*/
<form action=”/cart” method=”post” novalidate>
<div class=”m-cart__checkout”>
<div class=”m-cart__checkout-button”>
<button type=”submit” name=”checkout” class=”m:w-full m-button m-button–primary”>
<span>Pre Order Now</span>
</button>
</div>
</div>
</form>

/** 带terms版本*/
<form action=”/cart” method=”post” novalidate>
<div class=”m-cart__checkout”>

<div class=”m-terms-conditons”>
<label class=”form-field–checkbox”>
<input type=”checkbox” name=”agree_terms” value=”yes” required=””>
<span class=”form-field–checkbox__label”><p>I agree with the <a href=”#” title=”#”>Terms &amp; conditions</a></p></span>
<span class=”form-field–checkbox__icon”>
<svg class=”m-svg-icon–medium” xmlns=”http://www.w3.org/2000/svg” aria-hidden=”true” focusable=”false” fill=”none” viewBox=”0 0 20 20″>
<path d=”M18.5 1.5H1.5L1.5 18.5H18.5V1.5ZM1.5 0.5C0.947715 0.5 0.5 0.947715 0.5 1.5V18.5C0.5 19.0523 0.947715 19.5 1.5 19.5H18.5C19.0523 19.5 19.5 19.0523 19.5 18.5V1.5C19.5 0.947715 19.0523 0.5 18.5 0.5H1.5Z” fill-rule=”evenodd” fill=”currentColor”></path>
<path d=”M14.9975 6.09084C15.201 6.27746 15.2147 6.59375 15.0281 6.79728L8.91631 13.4627C8.82231 13.5652 8.68987 13.6239 8.55079 13.6247C8.41172 13.6256 8.27857 13.5684 8.18335 13.4671L4.99513 10.0731C4.80606 9.87179 4.81596 9.55536 5.01723 9.3663C5.21849 9.17723 5.53492 9.18713 5.72399 9.3884L8.54335 12.3897L14.291 6.12145C14.4776 5.91791 14.7939 5.90421 14.9975 6.09084Z” fill=”currentColor”></path>
</svg>
</span>
</label>
</div>

<div class=”m-cart__checkout-button show-terms-conditions” data-terms-action=”” disabled=””>
<button type=”submit” name=”checkout” class=”m:w-full m-button m-button–primary”>
<span>Pre Order Now</span>
</button>
</div><div class=”additional-checkout-buttons m:w-full”>
<div class=”dynamic-checkout__content” id=”dynamic-checkout-cart” data-shopify=”dynamic-checkout-cart”> <shopify-accelerated-checkout-cart wallet-configs=”[{&quot;name&quot;:&quot;paypal&quot;,&quot;wallet_params&quot;:{&quot;shopId&quot;:86508503331,&quot;countryCode&quot;:&quot;CN&quot;,&quot;merchantName&quot;:&quot; Audio&quot;,&quot;phoneRequired&quot;:true,&quot;companyRequired&quot;:false,&quot;shippingType&quot;:&quot;shipping&quot;,&quot;shopifyPaymentsEnabled&quot;:false,&quot;hasManagedSellingPlanState&quot;:null,&quot;merchantId&quot;:&quot;JY6W7H9NEY9WW&quot;,&quot;sdkUrl&quot;:&quot;https://www.paypal.com/sdk/js?components=buttons\u0026commit=false\u0026currency=USD\u0026locale=en_US\u0026client-id=AfUEYT7nO4BwZQERn9Vym5TbHAG08ptiKa9gm8OARBYgoqiAJIjllRjeIMI4g294KAH1JdTnkzubt1fr\u0026merchant-id=JY6W7H9NEY9WW\u0026intent=authorize&quot;}}]” access-token=”c26bd93f2a5de8276e79f0479b05acf5″ buyer-country=”SE” buyer-locale=”en” buyer-currency=”USD” shop-id=”86508503331″ cart-id=”Z2NwLWFzaWEtc291dGhlYXN0MTowMUo5TkRLTlAxTVJURkI3S1JEQURKNkVXUw” requires-shipping=””><shopify-paypal-button access-token=”c26bd93f2a5de8276e79f0479b05acf5″ buyer-country=”SE” buyer-currency=”USD” wallet-params=”{&quot;shopId&quot;:86508503331,&quot;countryCode&quot;:&quot;CN&quot;,&quot;merchantName&quot;:&quot; Audio&quot;,&quot;phoneRequired&quot;:true,&quot;companyRequired&quot;:false,&quot;shippingType&quot;:&quot;shipping&quot;,&quot;shopifyPaymentsEnabled&quot;:false,&quot;hasManagedSellingPlanState&quot;:null,&quot;merchantId&quot;:&quot;JY6W7H9NEY9WW&quot;,&quot;sdkUrl&quot;:&quot;https://www.paypal.com/sdk/js?components=buttons&amp;commit=false&amp;currency=USD&amp;locale=en_US&amp;client-id=AfUEYT7nO4BwZQERn9Vym5TbHAG08ptiKa9gm8OARBYgoqiAJIjllRjeIMI4g294KAH1JdTnkzubt1fr&amp;merchant-id=JY6W7H9NEY9WW&amp;intent=authorize&quot;}” page-type=”cart_page” slot=”button-PayPal” requires-shipping=””><style>shopify-paypal-button[disabled]{opacity:.5;cursor:not-allowed}shopify-paypal-button div.paypal-buttons>iframe{z-index:auto!important;border-radius:0!important;box-shadow:none}</style><div slot=”shadow-slot-uid_3df117a7b6_mdg6mjq6mti”><div id=”zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti” class=”paypal-buttons paypal-buttons-context-iframe paypal-buttons-label-paypal paypal-buttons-layout-horizontal” data-paypal-smart-button-version=”5.0.465″ style=”height: 54px; transition: 0.2s ease-in-out;”><style nonce=””>
#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti {
position: relative;
display: inline-block;
width: 100%;
min-height: 25px;
min-width: 150px;
font-size: 0;
}

#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti > iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti > iframe.component-frame {
z-index: 100;
}

#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti > iframe.prerender-frame {
transition: opacity .2s linear;
z-index: 200;
}

#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti > iframe.visible {
opacity: 1;
}

#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti > iframe.invisible {
opacity: 0;
pointer-events: none;
}

#zoid-paypal-buttons-uid_72b2e97779_mdg6mjq6mti > .smart-menu {
position: absolute;
z-index: 300;
top: 0;
left: 0;
width: 100%;
}
</style><iframe allowtransparency=”true” name=”__zoid__paypal_buttons__eyJzZW5kZXIiOnsiZG9tYWluIjoiaHR0cHM6Ly9uaWNlaGNrLmNvbSJ9LCJtZXRhRGF0YSI6eyJ3aW5kb3dSZWYiOnsidHlwZSI6InBhcmVudCIsImRpc3RhbmNlIjowfX0sInJlZmVyZW5jZSI6eyJ0eXBlIjoicmF3IiwidmFsIjoie1widWlkXCI6XCJ6b2lkLXBheXBhbC1idXR0b25zLXVpZF83MmIyZTk3Nzc5X21kZzZtanE2bXRpXCIsXCJjb250ZXh0XCI6XCJpZnJhbWVcIixcInRhZ1wiOlwicGF5cGFsLWJ1dHRvbnNcIixcImNoaWxkRG9tYWluTWF0Y2hcIjp7XCJfX3R5cGVfX1wiOlwicmVnZXhcIixcIl9fdmFsX19cIjpcIlxcXFwucGF5cGFsXFxcXC4oY29tfGNuKSg6XFxcXGQrKT8kXCJ9LFwidmVyc2lvblwiOlwiMTBfM18zXCIsXCJwcm9wc1wiOntcImZ1bmRpbmdTb3VyY2VcIjpcInBheXBhbFwiLFwic3R5bGVcIjp7XCJsYWJlbFwiOlwicGF5cGFsXCIsXCJsYXlvdXRcIjpcImhvcml6b250YWxcIixcImNvbG9yXCI6XCJnb2xkXCIsXCJzaGFwZVwiOlwic2hhcnBcIixcInRhZ2xpbmVcIjpmYWxzZSxcImhlaWdodFwiOjU0LFwicGVyaW9kXCI6e1wiX190eXBlX19cIjpcInVuZGVmaW5lZFwifSxcIm1lbnVQbGFjZW1lbnRcIjpcImJlbG93XCIsXCJkaXNhYmxlTWF4V2lkdGhcIjp0cnVlLFwiZGlzYWJsZU1heEhlaWdodFwiOntcIl9fdHlwZV9fXCI6XCJ1bmRlZmluZWRcIn0sXCJib3JkZXJSYWRpdXNcIjo0fSxcImNyZWF0ZU9yZ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dW5jdGlvblwiLFwiX192YWxfX1wiOntcImlkXCI6XCJ1aWRfN2NjMzNlNWUwZF9tZGc2bWpxNm10aVwiLFwibmFtZVwiOlwicW5cIn19LFwic2hvd1wiOntcIl9fdHlwZV9fXCI6XCJjcm9zc19kb21haW5fZnVuY3Rpb25cIixcIl9fdmFsX19cIjp7XCJpZFwiOlwidWlkX2QyNGQ0NWMzNTBfbWRnNm1qcTZtdGlcIixcIm5hbWVcIjpcImduXCJ9fSxcImhpZGVcIjp7XCJfX3R5cGVfX1wiOlwiY3Jvc3NfZG9tYWluX2Z1bmN0aW9uXCIsXCJfX3ZhbF9fXCI6e1wiaWRcIjpcInVpZF85ODBlNzU1OTk4X21kZzZtanE2bXRpXCIsXCJuYW1lXCI6XCJ2blwifX0sXCJleHBvcnRcIjp7XCJfX3R5cGVfX1wiOlwiY3Jvc3NfZG9tYWluX2Z1bmN0aW9uXCIsXCJfX3ZhbF9fXCI6e1wiaWRcIjpcInVpZF9iNTUyMjRhZjMwX21kZzZtanE2bXRpXCIsXCJuYW1lXCI6XCJXblwifX19fSJ9fQ__” title=”PayPal” allowpaymentrequest=”allowpaymentrequest” scrolling=”no” id=”jsx-iframe-e4d095b5f1″ class=”component-frame visible” style=”background-color: transparent; border: none;”></iframe><div id=”smart-menu” class=”smart-menu”></div><div id=”installments-modal” class=”installments-modal”></div><iframe name=”__detect_close_uid_5a2038eb38_mdg6mjq6mti__” style=”display: none;”></iframe></div></div></shopify-paypal-button></shopify-accelerated-checkout-cart> <small id=”shopify-buyer-consent” class=”hidden” aria-hidden=”true”> One or more of the items in your cart is a recurring or deferred purchase. By continuing, I agree to the <span id=”shopify-subscription-policy-button”>cancellation policy</span> and authorize you to charge my payment method at the prices, frequency and dates listed on this page until my order is fulfilled or I cancel, if permitted. </small> </div>
</div></div></form>

 

如果需要实现自定义事件,可以用如下代码:

<button type=”button” class=”shopify-payment-button__button shopify-payment-button__button–unbranded” onclick=”自定义按钮事件”>Pre
Order Now你的自定义按钮文本</button>
<div style=”display:none;”>
{{ form | payment_button }}
</div>

 

 

3.效果如下图:

参考:https://community.shopify.com/c/technical-q-a/how-can-i-alter-the-buy-it-now-button-text-on-my-product-page/m-p/1703459

news via inbox

Nulla turp dis cursus. Integer liberos  euismod pretium faucibua

Leave A Comment