tag:blogger.com,1999:blog-81020218018317877772023-06-20T21:57:23.617-07:00自由之路數位學堂Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8102021801831787777.post-30556809687007146252017-10-15T05:45:00.001-07:002017-10-15T05:45:31.490-07:00woocommerce綠界整合顯示超商取貨
在/home/zenzoneg/public_html/goodwayservice.com/wp-content/themes/twentyseventeen/functions.php
增加以下
/**
* 免運自動選擇 Hide shipping rates when free shipping is available.
* Updated to support WooCommerce 2.6 Shipping Zones.
*
* @param array $rates Array of rates found for the package.
* @return array
*/
add_filter( 'woocommerce_package_rates', 'hide_shipping_when_free_is_available', 100 );
function hide_shipping_when_free_is_available( $rates ) {
$free = array();
foreach ( $rates as $rate_id => $rate ) {
if ( 'free_shipping' === $rate->method_id ) {
$free[ $rate_id ] = $rate;
break;
}
}
/* 以下為需要新增修正的部份 */
// 免運費時 仍顯示超商取貨
if (!empty($free)) {
foreach ( $rates as $rate_id => $rate ) {
if ( 'ecpay_shipping' === $rate->method_id ) {
$free[ $rate_id ] = $rate;
break;
}
}
}
/* 以上為需要新增修正的部份 */
return ! empty( $free ) ? $free : $rates;
}
/** 此段結束
*/
add_filter( 'excerpt_more', 'twentyseventeen_excerpt_more' );Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.com0tag:blogger.com,1999:blog-8102021801831787777.post-33492490707365775302017-10-14T20:54:00.003-07:002017-10-14T20:54:47.837-07:00如何在woocommerce的結帳頁面製作縣市區域下拉選項自動抓縣市區號,在主題下的functions.php加下面這段
路徑 : 網站//wp-cotent/themes/twentyseventeen-child/functions.php
add_filter("woocommerce_after_checkout_form", "twzipcodefield_shipping");
function twzipcodefield_shipping() {
$output = '
<script src="https://hellowp.cc/jquery.twzipcode-1.7.14.min.js"></script>
<script>
var $ = jQuery.noConflict();
function updateValue(field){
$("#"+field+"_state").val($(".woocommerce-"+field+"-fields select[name=\'county\']").val());
$("#"+field+"_city").val($(".woocommerce-"+field+"-fields select[name=\'district\']").val());
$("#"+field+"_postcode").val($(".woocommerce-"+field+"-fields input[name=\'zipcode\']").val());
}
$(document).ready(function(){
$(".woocommerce-billing-fields,.woocommerce-shipping-fields").twzipcode({
"detect": function (coords) {
updateValue("billing");
updateValue("shipping");
}
});
function updateField(field){
$(".woocommerce-"+field+"-fields select[name=\'county\']").appendTo($("#"+field+"_state_field"));
$(".woocommerce-"+field+"-fields select[name=\'district\']").appendTo($("#"+field+"_city_field"));
$(".woocommerce-"+field+"-fields input[name=\'zipcode\']").appendTo($("#"+field+"_postcode_field"));
}
updateField("billing");
updateField("shipping");
$("select[name=\'county\'],select[name=\'district\']").change(function(){updateValue("billing");updateValue("shipping");})
$("input[name=\'zipcode\']").keyup(function(){updateValue("billing");updateValue("shipping");})
$("#billing_postcode,#billing_state,#billing_city,#shipping_state,#shipping_city,#shipping_postcode").hide();
})
</script>';
echo $output;
}
下方這段要在布景主題-->自訂-->css 中加上,就可以不顯示某些欄位,但沒有移除掉
.woocommerce-billing-fields #billing_country_field {display: none;}
.woocommerce-billing-fields #billing_company_field {display: none;}
.woocommerce-billing-fields #billing_address_2_field {display: none;}
.woocommerce-shipping-fields #shipping_country_field {display: none;}
.woocommerce-shipping-fields #shipping_company_field {display: none;}
.woocommerce-shipping-fields #shipping_address_2_field {display: none;}
Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.com0tag:blogger.com,1999:blog-8102021801831787777.post-12109986549436262782017-09-10T06:24:00.001-07:002017-09-10T06:30:53.716-07:00如何在網頁上做出可以直接撥打的電話號碼如何在網頁上做出可以直接撥打的電話號碼<br />
因為現在大家都用手機上網了,所以若我們的網站可以做出直接可以撥打的電話號碼<br />
客戶可以直接點一下就播號非常方便,就會大幅的增加網站功效喔<br />
<br />
其實可以用我們平常用的<a>標籤就有這個功能了,在href裡面多加一個tel的值<br />
如下面的HTML寫法:<br />
<a href="tel:0926901221">0926901221</a><br />
你就可以輕鬆在手機網頁上播打電話囉<br />
<br />
在手機上試點看看 <a href="tel:0926901221">0926901221</a>Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.com0tag:blogger.com,1999:blog-8102021801831787777.post-69364387879176985902017-09-09T00:00:00.003-07:002017-09-09T00:00:41.156-07:00行銷漏斗銷售給別人之前,要先了解人購物的行為,其實很簡單,因為我們天天在買東西<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/sHTMt_huCQw/0.jpg" src="https://www.youtube.com/embed/sHTMt_huCQw?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.com0tag:blogger.com,1999:blog-8102021801831787777.post-84836889671766839702017-09-08T20:24:00.001-07:002017-09-08T23:58:48.200-07:00你知道用Power Point也可以製圖去背嗎?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /><iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/YIsoNKDZirk/0.jpg" src="https://www.youtube.com/embed/YIsoNKDZirk?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.com0tag:blogger.com,1999:blog-8102021801831787777.post-73690069174047837202017-09-08T19:18:00.001-07:002017-09-08T19:36:24.850-07:00團結引流術網路上增加觸擊率的方法之一可以讓大家的blog互相引流,以下是數位行銷班同學們的blog,每個人的blog都會互相引流喔<br />
<br />
<a href="https://alexsir.blogspot.tw/">https://alexsir.blogspot.tw </a> <a href="https://alexsir.blogspot.tw/">數位學習網</a><br />
<a href="https://healthseniorgroup.blogspot.tw/">https://healthseniorgroup.blogspot.tw </a> <a href="https://healthseniorgroup.blogspot.tw/">healthsenior</a><br />
<a href="https://oohking.blogspot.tw/">https://oohking.blogspot.tw/</a> <a href="https://oohking.blogspot.tw/">天上飛</a><br />
<a href="https://eatoutofhealth.blogspot.tw/%20%C2%A0">https://eatoutofhealth.blogspot.tw/ </a> <a href="https://eatoutofhealth.blogspot.tw/">保健鋪</a><br />
<a href="https://home0216.blogspot.tw/">https://home0216.blogspot.tw/</a> <a href="https://home0216.blogspot.tw/">鄭氏企業</a><br />
<a href="https://daycleantw.blogspot.tw/">https://daycleantw.blogspot.tw/</a> <a href="https://daycleantw.blogspot.tw/">窈窕管家</a><br />
<a href="https://judyhandwork.blogspot.tw/">https://judyhandwork.blogspot.tw/</a> <a href="https://judyhandwork.blogspot.tw/">茱蒂的手作小鋪</a><br />
<a href="https://imarketime.blogspot.tw/">https://imarketime.blogspot.tw/ </a> <a href="https://imarketime.blogspot.tw/">自由之路數位教室</a><br />
<a href="https://99lovelife99.blogspot.tw/">https://99lovelife99.blogspot.tw/</a> <a href="https://99lovelife99.blogspot.tw/">久久愛生活久久</a><br />
<a href="https://shieyayun26.blogspot.tw/">https://shieyayun26.blogspot.tw/</a> <a href="https://shieyayun26.blogspot.tw/">遊山玩水</a><br />
<a href="https://kikipasta.blogspot.tw/">https://kikipasta.blogspot.tw/</a> <a href="https://kikipasta.blogspot.tw/">微笑pasta</a><br />
<a href="http://www.quinli.com.tw/">http://www.quinli.com.tw/</a> <a href="http://www.quinli.com.tw/">昆利</a><br />
<a href="https://phoenix1022.blogspot.tw/">https://phoenix1022.blogspot.tw/</a> <a href="https://phoenix1022.blogspot.tw/">艦隊COLLECTION皆可萌</a><br />
<a href="http://changyihan.blogspot.tw/">http://changyihan.blogspot.tw/</a> <a href="http://changyihan.blogspot.tw/"> 哩哩$$挖寶舖</a><br />
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/07343733490490958857noreply@blogger.com0