Để Custom Trang Checkout Woocommerce Thành 2 Cột chúng ta cần lập trình đoạn code sau:
- Mở file form-checkout.php ra và thêm <div class=”order-wrapper”> vào, mục đích để nó bao toàn bộ list sản phẩm và phương thức thanh toán lại nhằm phục vụ cho mục đích style của minh
Code nó như sau:
- Thêm title “Phương thức thanh toán vào”
- Cuối cùng là style như kết quả bên trên anh/chị có thể style theo phong cách của anh chị. Dưới đây là đoạn css style của mình
1
|
.woocommerce .checkout #customer_details {
width: 49% !important;
float: left !important;
}
.woocommerce .checkout .order-wrapper {
width: 49% !important;
float: right !important;
border: 1px solid #e1e1e1 !important;
}
.woocommerce .checkout #customer_details .col-1, .woocommerce .checkout #customer_details .col-2 {
width: 100% !important;
float: none !important;
}
.woocommerce .checkout .woocommerce-billing-fields h3 {
font-family: "Roboto",sans-serif !important;
font-size: 36px !important;
color: #484747 !important;
font-weight: lighter !important;
margin-top: 0 !important;
}
.woocommerce .checkout .form-row-wide {
clear: both !important;
}
.woocommerce .checkout .form-row {
padding: 0 !important;
margin: 0 0 20px !important;
}
.woocommerce .checkout label {
display: inline-block !important;
min-width: 180px !important;
color: #484747 !important;
font-weight: normal !important;
margin: 0 !important;
}
.woocommerce .checkout input.input-text {
width: 100% !important;
margin: 0 !important;
max-width: 370px !important;
height: 38px !important;
padding: 0 10px !important;
border: 1px solid #e1e1e1 !important;
border-radius: 0 !important;
font-family: "Open Sans", sans-serif !important;
}
.woocommerce .checkout textarea {
border: 1px solid #e1e1e1 !important;
border-radius: 0 !important;
font-family: "Open Sans", sans-serif !important;
height: 120px !important;
line-height: inherit !important;
display: inline-block !important;
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
width: 100% !important;
max-width: 370px !important;
padding: 10px !important;
}
.woocommerce .checkout #order_review_heading, .woocommerce .checkout #payment_heading {
background: #f8f8f8 !important;
font-family: "Open Sans",sans-serif !important;
font-size: 18px !important;
display: block !important;
text-align: left !important;
padding: 12px 15px !important;
font-weight: lighter !important;
border-bottom: 1px solid #e1e1e1 !important;
margin: 0;
}
.woocommerce table.shop_table {
border: none !important;
}
.woocommerce .checkout ul.payment_methods {
text-align: left !important;
border-bottom: 1px solid #e1e1e1 !important;
margin: 0 !important;
list-style: none outside !important;
padding: 15px 0 !important;
}
.woocommerce .checkout ul.payment_methods li {
margin: 0 0 15px 0 !important;
font-weight: normal !important;
list-style:none !important
}
.woocommerce .checkout ul.payment_methods li input {
margin: 0 1em 0 0 !important;
}
.woocommerce .checkout label {
display: inline-block !important;
min-width: 180px !important;
color: #484747 !important;
font-weight: normal !important;
margin: 0 !important;
}
.woocommerce .checkout div.payment_box {
width: 95% !important;
position: relative !important;
padding: 10px !important;
margin: 15px 0 0px 15px !important;
-webkit-border-radius: 2px !important;
border-radius: 2px !important;
background-clip: padding-box !important;
background: #f8f8f8 !important;
}
.woocommerce .checkout div.payment_box:after {
content: "" !important;
display: block !important;
border: 8px solid #f8f8f8 !important;
border-right-color: transparent !important;
border-left-color: transparent !important;
border-top-color: transparent !important;
position: absolute !important;
top: -16px !important;
left: 20px !important;
margin: 0 !important;
}
#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment {
background: none !important;
padding-left: 15px;
}
#add_payment_method #payment div.payment_box:before, .woocommerce-cart #payment div.payment_box:before, .woocommerce-checkout #payment div.payment_box:before {
content: none !important;
}
.woocommerce .checkout .form-row.place-order {
margin: 20px 0 !important;
text-align: center !important;
}
.woocommerce .checkout .form-row.place-order .button {
height: 38px !important;
line-height: 38px !important;
padding: 0 40px !important;
margin: 0 auto !important;
display: table !important;
float: none !important;
}
|
Kết quả sau khi custom đây anh chị:
0 nhận xét: