✏️ 正在编辑: form-checkout.php
路径:
/home/h359620/public_html/wp-content/themes/datis/woocommerce/checkout/form-checkout.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php if (! defined('ABSPATH')) { exit(); } do_action('woocommerce_before_checkout'); // ===== Dynamic WooCommerce values (structure unchanged) ===== $cart = WC()->cart; $items_count = $cart ? $cart->get_cart_contents_count() : 0; $subtotal = $cart ? $cart->get_subtotal() : 0; $discount_total = $cart ? $cart->get_discount_total() : 0; $discount_percent = ($subtotal > 0 && $discount_total > 0) ? round(($discount_total / $subtotal) * 100) : 0; $final_total_html = $cart ? $cart->get_total() : ''; // Customer fields $customer = WC()->customer; $b_first_name = $customer ? $customer->get_billing_first_name() : ''; $b_last_name = $customer ? $customer->get_billing_last_name() : ''; $b_phone = $customer ? $customer->get_billing_phone() : ''; $b_email = $customer ? $customer->get_billing_email() : ''; $b_postcode = $customer ? $customer->get_billing_postcode() : ''; $b_addr1 = $customer ? $customer->get_billing_address_1() : ''; $b_addr2 = $customer ? $customer->get_billing_address_2() : ''; $b_state = $customer ? $customer->get_billing_state() : ''; $b_city = $customer ? $customer->get_billing_city() : ''; $b_country = $customer ? $customer->get_billing_country() : (WC()->countries ? WC()->countries->get_base_country() : 'IR'); $b_name = trim($b_first_name . ' ' . $b_last_name); $b_address_ln = trim($b_addr1 . ($b_addr2 ? ' ' . $b_addr2 : '')); $b_company = $customer ? $customer->get_billing_company() : ''; // Shipping with fallback to billing $s_first_name = $customer && $customer->get_shipping_first_name() ? $customer->get_shipping_first_name() : $b_first_name; $s_last_name = $customer && $customer->get_shipping_last_name() ? $customer->get_shipping_last_name() : $b_last_name; $s_name = trim($s_first_name . ' ' . $s_last_name); $s_phone = ($customer && method_exists($customer, 'get_shipping_phone') && $customer->get_shipping_phone()) ? $customer->get_shipping_phone() : $b_phone; $s_postcode = $customer && $customer->get_shipping_postcode() ? $customer->get_shipping_postcode() : $b_postcode; $s_addr1 = $customer && $customer->get_shipping_address_1() ? $customer->get_shipping_address_1() : $b_addr1; $s_addr2 = $customer && $customer->get_shipping_address_2() ? $customer->get_shipping_address_2() : $b_addr2; $s_city = $customer && $customer->get_shipping_city() ? $customer->get_shipping_city() : $b_city; $s_state = $customer && $customer->get_shipping_state() ? $customer->get_shipping_state() : $b_state; $s_country = $customer && $customer->get_shipping_country() ? $customer->get_shipping_country() : $b_country; $s_address_ln = trim($s_addr1 . ($s_addr2 ? ' ' . $s_addr2 : '')); ?> <form name="checkout" method="post" class="checkout woocommerce-checkout checkout page-checkout d-flex mt-4 mt-lg-0 flex-column flex-lg-row align-items-start justify-content-between flex-wrap" action="<?php echo esc_url(wc_get_checkout_url()); ?>" enctype="multipart/form-data"> <!-- Hidden technical fields: keep Woo required billing fields satisfied; shipping fields to sync on choice --> <input type="hidden" name="datis_post_date" id="datis_post_date_hidden" value="" /> <!-- Billing (required by WooCommerce) --> <input type="hidden" name="billing_country" value="<?php echo esc_attr($b_country); ?>"> <!-- Shipping (will be updated via JS if shipping/custom is chosen) --> <input type="hidden" name="shipping_country" value="<?php echo esc_attr($s_country); ?>"> <div class="checkout-content col-12 col-lg-9 m-0 "> <div class="checkout-wrapper"> <p class="checkout-heading"> <?php esc_html_e('checkout', 'datis'); ?> </p> <div class="billing-wrapper d-flex flex-lg-row flex-wrap gap-3"> <h3 class="w-100 my-4"><?php esc_html_e('billing address', 'datis'); ?></h3> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="12" cy="6" r="4" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></circle> <path d="M15 20.6151C14.0907 20.8619 13.0736 21 12 21C8.13401 21 5 19.2091 5 17C5 14.7909 8.13401 13 12 13C15.866 13 19 14.7909 19 17C19 17.3453 18.9234 17.6804 18.7795 18" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_first_name" placeholder="<?php esc_html_e('Name', 'datis'); ?>" value="<?php echo esc_attr($b_first_name); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="12" cy="6" r="4" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></circle> <path d="M15 20.6151C14.0907 20.8619 13.0736 21 12 21C8.13401 21 5 19.2091 5 17C5 14.7909 8.13401 13 12 13C15.866 13 19 14.7909 19 17C19 17.3453 18.9234 17.6804 18.7795 18" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_last_name" placeholder="<?php esc_html_e('Last Name', 'datis'); ?>" value="<?php echo esc_attr($b_last_name); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="12" cy="12" r="3" stroke="currentColor" stroke-width="1.5" /> <path d="M3.66125 10.6392C4.1338 10.9361 4.43785 11.4419 4.43785 11.9999C4.43784 12.558 4.13379 13.0638 3.66125 13.3607C3.33969 13.5627 3.13252 13.7242 2.98511 13.9163C2.6622 14.3372 2.51969 14.869 2.58893 15.3949C2.64085 15.7893 2.87382 16.1928 3.33977 16.9999C3.80571 17.8069 4.03868 18.2104 4.35429 18.4526C4.77511 18.7755 5.30697 18.918 5.83287 18.8488C6.07291 18.8172 6.31631 18.7185 6.65199 18.5411C7.14547 18.2803 7.73562 18.2699 8.21898 18.549C8.7023 18.8281 8.9883 19.3443 9.00916 19.902C9.02335 20.2815 9.05961 20.5417 9.15227 20.7654C9.35526 21.2554 9.74461 21.6448 10.2347 21.8478C10.6022 22 11.0681 22 12 22C12.9319 22 13.3979 22 13.7654 21.8478C14.2555 21.6448 14.6448 21.2554 14.8478 20.7654C14.9404 20.5417 14.9767 20.2815 14.9909 19.9021C15.0118 19.3443 15.2978 18.8281 15.7811 18.549C16.2645 18.27 16.8545 18.2804 17.348 18.5412C17.6837 18.7186 17.9271 18.8173 18.1672 18.8489C18.6931 18.9182 19.2249 18.7756 19.6458 18.4527C19.9614 18.2106 20.1943 17.807 20.6603 17C20.8677 16.6407 21.029 16.3614 21.1487 16.1272M20.3388 13.3608C19.8662 13.0639 19.5622 12.5581 19.5622 12.0001C19.5621 11.442 19.8662 10.9361 20.3388 10.6392C20.6603 10.4372 20.8674 10.2757 21.0148 10.0836C21.3377 9.66278 21.4802 9.13092 21.411 8.60502C21.3591 8.2106 21.1261 7.80708 20.6602 7.00005C20.1942 6.19301 19.9613 5.7895 19.6456 5.54732C19.2248 5.22441 18.693 5.0819 18.1671 5.15113C17.927 5.18274 17.6836 5.2814 17.3479 5.45883C16.8544 5.71964 16.2643 5.73004 15.781 5.45096C15.2977 5.1719 15.0118 4.6557 14.9909 4.09803C14.9767 3.71852 14.9405 3.45835 14.8478 3.23463C14.6448 2.74458 14.2555 2.35523 13.7654 2.15224C13.3979 2 12.9319 2 12 2C11.0681 2 10.6022 2 10.2347 2.15224C9.74461 2.35523 9.35526 2.74458 9.15227 3.23463C9.05961 3.45833 9.02335 3.71848 9.00916 4.09794C8.9883 4.65566 8.70228 5.17191 8.21894 5.45096C7.7356 5.73002 7.14551 5.71959 6.65208 5.4588C6.31636 5.28136 6.07293 5.18269 5.83288 5.15108C5.30698 5.08185 4.77512 5.22436 4.3543 5.54727C4.03869 5.78945 3.80572 6.19297 3.33978 7C3.13234 7.35929 2.97108 7.63859 2.85141 7.87273" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" /> </svg> <input name="billing_company" placeholder="<?php esc_html_e('Company (optinal)', 'datis'); ?>" value="<?php echo esc_attr($b_company); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 22H2" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M21 22V14.5C21 13.6716 20.3284 13 19.5 13H16.5C15.6716 13 15 13.6716 15 14.5V22" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></path> <path d="M15 22V9M9 22V5C9 3.58579 9 2.87868 9.43934 2.43934C9.87868 2 10.5858 2 12 2C13.4142 2 14.1213 2 14.5607 2.43934C15 2.87868 15 3.58579 15 5V5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M9 22V9.5C9 8.67157 8.32843 8 7.5 8H4.5C3.67157 8 3 8.67157 3 9.5V16M3 22V19.75" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_state" placeholder="<?php esc_html_e('State', 'datis'); ?>" value="<?php echo esc_attr($b_state); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 22H2" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M21 22V14.5C21 13.6716 20.3284 13 19.5 13H16.5C15.6716 13 15 13.6716 15 14.5V22" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></path> <path d="M15 22V9M9 22V5C9 3.58579 9 2.87868 9.43934 2.43934C9.87868 2 10.5858 2 12 2C13.4142 2 14.1213 2 14.5607 2.43934C15 2.87868 15 3.58579 15 5V5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M9 22V9.5C9 8.67157 8.32843 8 7.5 8H4.5C3.67157 8 3 8.67157 3 9.5V16M3 22V19.75" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_city" placeholder="<?php esc_html_e('City', 'datis'); ?>" value="<?php echo esc_attr($b_city); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 22H2" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M21 22V14.5C21 13.6716 20.3284 13 19.5 13H16.5C15.6716 13 15 13.6716 15 14.5V22" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></path> <path d="M15 22V9M9 22V5C9 3.58579 9 2.87868 9.43934 2.43934C9.87868 2 10.5858 2 12 2C13.4142 2 14.1213 2 14.5607 2.43934C15 2.87868 15 3.58579 15 5V5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M9 22V9.5C9 8.67157 8.32843 8 7.5 8H4.5C3.67157 8 3 8.67157 3 9.5V16M3 22V19.75" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_address_1" placeholder="<?php esc_html_e('Address', 'datis'); ?>" value="<?php echo esc_attr($b_addr1); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.5 2.00012C13.5 2.00012 15.8335 2.21225 18.8033 5.1821C21.7731 8.15195 21.9853 10.4854 21.9853 10.4854" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M14.207 5.53564C14.207 5.53564 15.197 5.81849 16.6819 7.30341C18.1668 8.78834 18.4497 9.77829 18.4497 9.77829" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M15.1017 15.0272L15.6455 15.5437L15.6455 15.5437L15.1017 15.0272ZM15.5572 14.5477L15.0134 14.0312L15.0134 14.0312L15.5572 14.5477ZM17.9738 14.2123L17.5997 14.8623L17.5997 14.8623L17.9738 14.2123ZM19.8843 15.312L19.5102 15.962L19.8843 15.312ZM20.4227 18.7584L20.9665 19.2749L20.9665 19.2749L20.4227 18.7584ZM19.0021 20.254L18.4583 19.7375L18.4583 19.7375L19.0021 20.254ZM17.6773 20.9631L17.751 21.7095L17.751 21.7095L17.6773 20.9631ZM7.81638 16.4752L8.36017 15.9587L7.81638 16.4752ZM3.75283 6.92574C3.73063 6.51212 3.37733 6.19481 2.96371 6.21701C2.55009 6.23921 2.23278 6.59252 2.25498 7.00613L3.00391 6.96594L3.75283 6.92574ZM9.19172 8.80507L9.73552 9.32159L9.73552 9.32159L9.19172 8.80507ZM9.47854 8.50311L10.0223 9.01963L10.0223 9.01963L9.47854 8.50311ZM9.63526 5.6931L10.2477 5.26012L10.2477 5.26012L9.63526 5.6931ZM8.37427 3.90961L7.76188 4.3426L7.76188 4.3426L8.37427 3.90961ZM4.71868 3.09213C4.43341 3.39246 4.44562 3.86717 4.74595 4.15244C5.04628 4.4377 5.521 4.42549 5.80626 4.12516L5.26247 3.60864L4.71868 3.09213ZM11.0641 13.0559L11.6079 12.5394L11.6079 12.5394L11.0641 13.0559ZM10.6651 19.8123C11.0158 20.0327 11.4788 19.9271 11.6992 19.5764C11.9196 19.2257 11.8139 18.7627 11.4632 18.5423L11.0641 19.1773L10.6651 19.8123ZM15.114 20.0584C14.7085 19.9735 14.3111 20.2334 14.2262 20.6388C14.1413 21.0442 14.4011 21.4417 14.8065 21.5266L14.9602 20.7925L15.114 20.0584ZM15.1017 15.0272L15.6455 15.5437L16.101 15.0642L15.5572 14.5477L15.0134 14.0312L14.5579 14.5107L15.1017 15.0272ZM17.9738 14.2123L17.5997 14.8623L19.5102 15.962L19.8843 15.312L20.2585 14.662L18.348 13.5623L17.9738 14.2123ZM20.4227 18.7584L19.8789 18.2419L18.4583 19.7375L19.0021 20.254L19.5459 20.7705L20.9665 19.2749L20.4227 18.7584ZM7.81638 16.4752L8.36017 15.9587C4.48405 11.8778 3.83387 8.43556 3.75283 6.92574L3.00391 6.96594L2.25498 7.00613C2.35424 8.85536 3.13942 12.6403 7.27258 16.9917L7.81638 16.4752ZM9.19172 8.80507L9.73552 9.32159L10.0223 9.01963L9.47854 8.50311L8.93474 7.9866L8.64793 8.28856L9.19172 8.80507ZM9.63526 5.6931L10.2477 5.26012L8.98667 3.47663L8.37427 3.90961L7.76188 4.3426L9.02287 6.12608L9.63526 5.6931ZM9.19172 8.80507C8.64793 8.28856 8.64724 8.28929 8.64654 8.29002C8.6463 8.29028 8.6456 8.29102 8.64513 8.29152C8.64418 8.29254 8.64321 8.29357 8.64222 8.29463C8.64026 8.29675 8.63822 8.29896 8.63612 8.30127C8.63193 8.30588 8.62748 8.31087 8.6228 8.31625C8.61344 8.32701 8.60317 8.33931 8.59218 8.3532C8.5702 8.38098 8.54533 8.41511 8.51924 8.45588C8.46692 8.53764 8.41019 8.64531 8.36214 8.78033C8.26444 9.0549 8.2112 9.4185 8.27773 9.87257C8.40844 10.7647 8.993 11.9644 10.5203 13.5724L11.0641 13.0559L11.6079 12.5394C10.1803 11.0363 9.82863 10.1106 9.76188 9.65511C9.72968 9.43536 9.7624 9.31957 9.77534 9.28321C9.78261 9.26277 9.78737 9.25709 9.78271 9.26437C9.78045 9.26789 9.77596 9.27451 9.76839 9.28407C9.76461 9.28885 9.76005 9.29437 9.75461 9.30063C9.7519 9.30375 9.74895 9.30706 9.74578 9.31056C9.74419 9.31231 9.74254 9.3141 9.74083 9.31594C9.73997 9.31686 9.7391 9.31779 9.73822 9.31873C9.73778 9.3192 9.7371 9.31992 9.73688 9.32015C9.7362 9.32087 9.73552 9.32159 9.19172 8.80507ZM11.0641 13.0559L10.5203 13.5724C12.0432 15.1757 13.1933 15.806 14.0708 15.9485C14.5211 16.0216 14.8856 15.9632 15.1616 15.8544C15.2965 15.8012 15.4032 15.7387 15.4833 15.6819C15.5233 15.6535 15.5566 15.6266 15.5834 15.6031C15.5969 15.5913 15.6087 15.5803 15.6191 15.5703C15.6242 15.5654 15.629 15.5606 15.6334 15.5562C15.6356 15.554 15.6377 15.5518 15.6398 15.5497C15.6408 15.5487 15.6417 15.5477 15.6427 15.5467C15.6432 15.5462 15.6439 15.5454 15.6441 15.5452C15.6448 15.5444 15.6455 15.5437 15.1017 15.0272C14.5579 14.5107 14.5586 14.51 14.5593 14.5093C14.5595 14.509 14.5602 14.5083 14.5607 14.5078C14.5616 14.5069 14.5624 14.506 14.5633 14.5051C14.5651 14.5033 14.5668 14.5015 14.5685 14.4998C14.5718 14.4965 14.575 14.4933 14.578 14.4904C14.5841 14.4846 14.5895 14.4796 14.5943 14.4754C14.6038 14.467 14.611 14.4616 14.6156 14.4583C14.6249 14.4517 14.624 14.454 14.6112 14.459C14.5919 14.4666 14.501 14.4987 14.3113 14.4679C13.9088 14.4025 13.0401 14.0472 11.6079 12.5394L11.0641 13.0559ZM8.37427 3.90961L8.98667 3.47663C7.97308 2.04305 5.94486 1.80119 4.71868 3.09213L5.26247 3.60864L5.80626 4.12516C6.3291 3.57471 7.24953 3.61795 7.76188 4.3426L8.37427 3.90961ZM19.0021 20.254L18.4583 19.7375C18.1793 20.0313 17.8874 20.1887 17.6036 20.2167L17.6773 20.9631L17.751 21.7095C18.498 21.6357 19.1026 21.2373 19.5459 20.7705L19.0021 20.254ZM9.47854 8.50311L10.0223 9.01963C10.9899 8.00095 11.0584 6.40678 10.2477 5.26012L9.63526 5.6931L9.02287 6.12608C9.44501 6.72315 9.38028 7.51753 8.93474 7.9866L9.47854 8.50311ZM19.8843 15.312L19.5102 15.962C20.3311 16.4345 20.4917 17.5968 19.8789 18.2419L20.4227 18.7584L20.9665 19.2749C22.2715 17.901 21.8914 15.6019 20.2585 14.662L19.8843 15.312ZM15.5572 14.5477L16.101 15.0642C16.4864 14.6584 17.087 14.5672 17.5997 14.8623L17.9738 14.2123L18.348 13.5623C17.2495 12.93 15.8872 13.1113 15.0134 14.0312L15.5572 14.5477ZM11.0641 19.1773L11.4632 18.5423C10.4794 17.9241 9.43246 17.0876 8.36017 15.9587L7.81638 16.4752L7.27258 16.9917C8.42661 18.2067 9.56994 19.1241 10.6651 19.8123L11.0641 19.1773ZM17.6773 20.9631L17.6036 20.2167C17.0571 20.2707 16.1922 20.2842 15.114 20.0584L14.9602 20.7925L14.8065 21.5266C16.0551 21.788 17.0752 21.7762 17.751 21.7095L17.6773 20.9631Z" fill="currentColor" fill-opacity="0.6"></path> </svg> <input name="billing_phone" placeholder="<?php esc_html_e('Phone', 'datis'); ?>" value="<?php echo esc_attr($b_phone); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 12C22 15.7712 22 17.6569 20.8284 18.8284C19.6569 20 17.7712 20 14 20H10C6.22876 20 4.34315 20 3.17157 18.8284C2 17.6569 2 15.7712 2 12C2 8.22876 2 6.34315 3.17157 5.17157C4.34315 4 6.22876 4 10 4H14C17.7712 4 19.6569 4 20.8284 5.17157C21.4816 5.82475 21.7706 6.69989 21.8985 8" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M18 8L15.8411 9.79908C14.0045 11.3296 13.0861 12.0949 12 12.0949C11.3507 12.0949 10.7614 11.8214 10 11.2744M6 8L6.9 8.75L7.8 9.5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_email" placeholder="<?php esc_html_e('Email', 'datis'); ?>" value="<?php echo esc_attr($b_email); ?>"> </div> <div class="billing-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 12C22 15.7712 22 17.6569 20.8284 18.8284C19.6569 20 17.7712 20 14 20H10C6.22876 20 4.34315 20 3.17157 18.8284C2 17.6569 2 15.7712 2 12C2 8.22876 2 6.34315 3.17157 5.17157C4.34315 4 6.22876 4 10 4H14C17.7712 4 19.6569 4 20.8284 5.17157C21.4816 5.82475 21.7706 6.69989 21.8985 8" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M18 8L15.8411 9.79908C14.0045 11.3296 13.0861 12.0949 12 12.0949C11.3507 12.0949 10.7614 11.8214 10 11.2744M6 8L6.9 8.75L7.8 9.5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="billing_postcode" placeholder="<?php esc_html_e('Zip code', 'datis'); ?>" value="<?php echo esc_attr($b_postcode); ?>"> </div> </div> <div class="shipping-checkbox mt-4 w-100 d-flex flex-row gap-3 align-items-center"> <input hidden id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" type="checkbox" name="ship_to_different_address" value="0"> <span> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 12.9L10.1429 16.5L12.1071 14.25M18 7.5L14.0714 12" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> </svg> </span> حمل و نقل به یک ادرس متفاوت </div> <div class="shipping-wrapper flex-lg-row flex-wrap gap-3"> <h3 class="w-100 my-4"><?php esc_html_e('shipping address', 'datis'); ?></h3> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="12" cy="6" r="4" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></circle> <path d="M15 20.6151C14.0907 20.8619 13.0736 21 12 21C8.13401 21 5 19.2091 5 17C5 14.7909 8.13401 13 12 13C15.866 13 19 14.7909 19 17C19 17.3453 18.9234 17.6804 18.7795 18" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="shipping_first_name" placeholder="<?php esc_html_e('Name', 'datis'); ?>" value="<?php echo esc_attr($s_first_name); ?>"> </div> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="12" cy="6" r="4" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></circle> <path d="M15 20.6151C14.0907 20.8619 13.0736 21 12 21C8.13401 21 5 19.2091 5 17C5 14.7909 8.13401 13 12 13C15.866 13 19 14.7909 19 17C19 17.3453 18.9234 17.6804 18.7795 18" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="shipping_last_name" placeholder="<?php esc_html_e('Last Name', 'datis'); ?>" value="<?php echo esc_attr($s_last_name); ?>"> </div> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 22H2" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M21 22V14.5C21 13.6716 20.3284 13 19.5 13H16.5C15.6716 13 15 13.6716 15 14.5V22" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></path> <path d="M15 22V9M9 22V5C9 3.58579 9 2.87868 9.43934 2.43934C9.87868 2 10.5858 2 12 2C13.4142 2 14.1213 2 14.5607 2.43934C15 2.87868 15 3.58579 15 5V5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M9 22V9.5C9 8.67157 8.32843 8 7.5 8H4.5C3.67157 8 3 8.67157 3 9.5V16M3 22V19.75" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="shipping_state" placeholder="<?php esc_html_e('State', 'datis'); ?>" value="<?php echo esc_attr($s_state); ?>"> </div> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 22H2" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M21 22V14.5C21 13.6716 20.3284 13 19.5 13H16.5C15.6716 13 15 13.6716 15 14.5V22" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></path> <path d="M15 22V9M9 22V5C9 3.58579 9 2.87868 9.43934 2.43934C9.87868 2 10.5858 2 12 2C13.4142 2 14.1213 2 14.5607 2.43934C15 2.87868 15 3.58579 15 5V5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M9 22V9.5C9 8.67157 8.32843 8 7.5 8H4.5C3.67157 8 3 8.67157 3 9.5V16M3 22V19.75" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="shipping_city" placeholder="<?php esc_html_e('City', 'datis'); ?>" value="<?php echo esc_attr($s_city); ?>"> </div> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 22H2" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M21 22V14.5C21 13.6716 20.3284 13 19.5 13H16.5C15.6716 13 15 13.6716 15 14.5V22" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5"></path> <path d="M15 22V9M9 22V5C9 3.58579 9 2.87868 9.43934 2.43934C9.87868 2 10.5858 2 12 2C13.4142 2 14.1213 2 14.5607 2.43934C15 2.87868 15 3.58579 15 5V5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M9 22V9.5C9 8.67157 8.32843 8 7.5 8H4.5C3.67157 8 3 8.67157 3 9.5V16M3 22V19.75" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="shipping_address_1" placeholder="<?php esc_html_e('Address', 'datis'); ?>" value="<?php echo esc_attr($s_addr1); ?>"> </div> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.5 2.00012C13.5 2.00012 15.8335 2.21225 18.8033 5.1821C21.7731 8.15195 21.9853 10.4854 21.9853 10.4854" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M14.207 5.53564C14.207 5.53564 15.197 5.81849 16.6819 7.30341C18.1668 8.78834 18.4497 9.77829 18.4497 9.77829" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M15.1017 15.0272L15.6455 15.5437L15.6455 15.5437L15.1017 15.0272ZM15.5572 14.5477L15.0134 14.0312L15.0134 14.0312L15.5572 14.5477ZM17.9738 14.2123L17.5997 14.8623L17.5997 14.8623L17.9738 14.2123ZM19.8843 15.312L19.5102 15.962L19.8843 15.312ZM20.4227 18.7584L20.9665 19.2749L20.9665 19.2749L20.4227 18.7584ZM19.0021 20.254L18.4583 19.7375L18.4583 19.7375L19.0021 20.254ZM17.6773 20.9631L17.751 21.7095L17.751 21.7095L17.6773 20.9631ZM7.81638 16.4752L8.36017 15.9587L7.81638 16.4752ZM3.75283 6.92574C3.73063 6.51212 3.37733 6.19481 2.96371 6.21701C2.55009 6.23921 2.23278 6.59252 2.25498 7.00613L3.00391 6.96594L3.75283 6.92574ZM9.19172 8.80507L9.73552 9.32159L9.73552 9.32159L9.19172 8.80507ZM9.47854 8.50311L10.0223 9.01963L10.0223 9.01963L9.47854 8.50311ZM9.63526 5.6931L10.2477 5.26012L10.2477 5.26012L9.63526 5.6931ZM8.37427 3.90961L7.76188 4.3426L7.76188 4.3426L8.37427 3.90961ZM4.71868 3.09213C4.43341 3.39246 4.44562 3.86717 4.74595 4.15244C5.04628 4.4377 5.521 4.42549 5.80626 4.12516L5.26247 3.60864L4.71868 3.09213ZM11.0641 13.0559L11.6079 12.5394L11.6079 12.5394L11.0641 13.0559ZM10.6651 19.8123C11.0158 20.0327 11.4788 19.9271 11.6992 19.5764C11.9196 19.2257 11.8139 18.7627 11.4632 18.5423L11.0641 19.1773L10.6651 19.8123ZM15.114 20.0584C14.7085 19.9735 14.3111 20.2334 14.2262 20.6388C14.1413 21.0442 14.4011 21.4417 14.8065 21.5266L14.9602 20.7925L15.114 20.0584ZM15.1017 15.0272L15.6455 15.5437L16.101 15.0642L15.5572 14.5477L15.0134 14.0312L14.5579 14.5107L15.1017 15.0272ZM17.9738 14.2123L17.5997 14.8623L19.5102 15.962L19.8843 15.312L20.2585 14.662L18.348 13.5623L17.9738 14.2123ZM20.4227 18.7584L19.8789 18.2419L18.4583 19.7375L19.0021 20.254L19.5459 20.7705L20.9665 19.2749L20.4227 18.7584ZM7.81638 16.4752L8.36017 15.9587C4.48405 11.8778 3.83387 8.43556 3.75283 6.92574L3.00391 6.96594L2.25498 7.00613C2.35424 8.85536 3.13942 12.6403 7.27258 16.9917L7.81638 16.4752ZM9.19172 8.80507L9.73552 9.32159L10.0223 9.01963L9.47854 8.50311L8.93474 7.9866L8.64793 8.28856L9.19172 8.80507ZM9.63526 5.6931L10.2477 5.26012L8.98667 3.47663L8.37427 3.90961L7.76188 4.3426L9.02287 6.12608L9.63526 5.6931ZM9.19172 8.80507C8.64793 8.28856 8.64724 8.28929 8.64654 8.29002C8.6463 8.29028 8.6456 8.29102 8.64513 8.29152C8.64418 8.29254 8.64321 8.29357 8.64222 8.29463C8.64026 8.29675 8.63822 8.29896 8.63612 8.30127C8.63193 8.30588 8.62748 8.31087 8.6228 8.31625C8.61344 8.32701 8.60317 8.33931 8.59218 8.3532C8.5702 8.38098 8.54533 8.41511 8.51924 8.45588C8.46692 8.53764 8.41019 8.64531 8.36214 8.78033C8.26444 9.0549 8.2112 9.4185 8.27773 9.87257C8.40844 10.7647 8.993 11.9644 10.5203 13.5724L11.0641 13.0559L11.6079 12.5394C10.1803 11.0363 9.82863 10.1106 9.76188 9.65511C9.72968 9.43536 9.7624 9.31957 9.77534 9.28321C9.78261 9.26277 9.78737 9.25709 9.78271 9.26437C9.78045 9.26789 9.77596 9.27451 9.76839 9.28407C9.76461 9.28885 9.76005 9.29437 9.75461 9.30063C9.7519 9.30375 9.74895 9.30706 9.74578 9.31056C9.74419 9.31231 9.74254 9.3141 9.74083 9.31594C9.73997 9.31686 9.7391 9.31779 9.73822 9.31873C9.73778 9.3192 9.7371 9.31992 9.73688 9.32015C9.7362 9.32087 9.73552 9.32159 9.19172 8.80507ZM11.0641 13.0559L10.5203 13.5724C12.0432 15.1757 13.1933 15.806 14.0708 15.9485C14.5211 16.0216 14.8856 15.9632 15.1616 15.8544C15.2965 15.8012 15.4032 15.7387 15.4833 15.6819C15.5233 15.6535 15.5566 15.6266 15.5834 15.6031C15.5969 15.5913 15.6087 15.5803 15.6191 15.5703C15.6242 15.5654 15.629 15.5606 15.6334 15.5562C15.6356 15.554 15.6377 15.5518 15.6398 15.5497C15.6408 15.5487 15.6417 15.5477 15.6427 15.5467C15.6432 15.5462 15.6439 15.5454 15.6441 15.5452C15.6448 15.5444 15.6455 15.5437 15.1017 15.0272C14.5579 14.5107 14.5586 14.51 14.5593 14.5093C14.5595 14.509 14.5602 14.5083 14.5607 14.5078C14.5616 14.5069 14.5624 14.506 14.5633 14.5051C14.5651 14.5033 14.5668 14.5015 14.5685 14.4998C14.5718 14.4965 14.575 14.4933 14.578 14.4904C14.5841 14.4846 14.5895 14.4796 14.5943 14.4754C14.6038 14.467 14.611 14.4616 14.6156 14.4583C14.6249 14.4517 14.624 14.454 14.6112 14.459C14.5919 14.4666 14.501 14.4987 14.3113 14.4679C13.9088 14.4025 13.0401 14.0472 11.6079 12.5394L11.0641 13.0559ZM8.37427 3.90961L8.98667 3.47663C7.97308 2.04305 5.94486 1.80119 4.71868 3.09213L5.26247 3.60864L5.80626 4.12516C6.3291 3.57471 7.24953 3.61795 7.76188 4.3426L8.37427 3.90961ZM19.0021 20.254L18.4583 19.7375C18.1793 20.0313 17.8874 20.1887 17.6036 20.2167L17.6773 20.9631L17.751 21.7095C18.498 21.6357 19.1026 21.2373 19.5459 20.7705L19.0021 20.254ZM9.47854 8.50311L10.0223 9.01963C10.9899 8.00095 11.0584 6.40678 10.2477 5.26012L9.63526 5.6931L9.02287 6.12608C9.44501 6.72315 9.38028 7.51753 8.93474 7.9866L9.47854 8.50311ZM19.8843 15.312L19.5102 15.962C20.3311 16.4345 20.4917 17.5968 19.8789 18.2419L20.4227 18.7584L20.9665 19.2749C22.2715 17.901 21.8914 15.6019 20.2585 14.662L19.8843 15.312ZM15.5572 14.5477L16.101 15.0642C16.4864 14.6584 17.087 14.5672 17.5997 14.8623L17.9738 14.2123L18.348 13.5623C17.2495 12.93 15.8872 13.1113 15.0134 14.0312L15.5572 14.5477ZM11.0641 19.1773L11.4632 18.5423C10.4794 17.9241 9.43246 17.0876 8.36017 15.9587L7.81638 16.4752L7.27258 16.9917C8.42661 18.2067 9.56994 19.1241 10.6651 19.8123L11.0641 19.1773ZM17.6773 20.9631L17.6036 20.2167C17.0571 20.2707 16.1922 20.2842 15.114 20.0584L14.9602 20.7925L14.8065 21.5266C16.0551 21.788 17.0752 21.7762 17.751 21.7095L17.6773 20.9631Z" fill="currentColor" fill-opacity="0.6"></path> </svg> <input name="shipping_phone" placeholder="<?php esc_html_e('Phone', 'datis'); ?>" value="<?php echo esc_attr($s_phone); ?>"> </div> <div class="shipping-input"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M22 12C22 15.7712 22 17.6569 20.8284 18.8284C19.6569 20 17.7712 20 14 20H10C6.22876 20 4.34315 20 3.17157 18.8284C2 17.6569 2 15.7712 2 12C2 8.22876 2 6.34315 3.17157 5.17157C4.34315 4 6.22876 4 10 4H14C17.7712 4 19.6569 4 20.8284 5.17157C21.4816 5.82475 21.7706 6.69989 21.8985 8" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> <path d="M18 8L15.8411 9.79908C14.0045 11.3296 13.0861 12.0949 12 12.0949C11.3507 12.0949 10.7614 11.8214 10 11.2744M6 8L6.9 8.75L7.8 9.5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round"></path> </svg> <input name="shipping_postcode" placeholder="<?php esc_html_e('Zip code', 'datis'); ?>" value="<?php echo esc_attr($s_postcode); ?>"> </div> </div> </div> </div> <aside class="checkout-sidebar col-12 col-lg-3 d-flex flex-column gap-3"> <div class="checkout-wrapper "> <div class="price-details d-flex flex-column gap-3"> <div class="detail-items d-flex align-items-center justify-content-between"> <div class="detali-items-name"> <?php esc_html_e('Subtotal', 'datis'); ?> </div> <div class="detail-items-value"> <?php echo wc_price(WC()->cart->get_subtotal()); ?> </div> </div> <div class="detail-items d-flex align-items-center justify-content-between"> <div class="detali-items-name"> <?php esc_html_e('Shipping', 'datis'); ?> </div> <div class="detail-items-value"> <?php $shipping_total = WC()->cart->get_shipping_total(); echo $shipping_total !== '' ? wc_price((float) $shipping_total) : wc_price(0); ?> </div> </div> <div class="detail-items d-flex align-items-center justify-content-between"> <div class="detali-items-name"> <?php esc_html_e('Discount', 'datis'); ?> </div> <div class="detail-items-value"> <?php echo wc_price((float) WC()->cart->get_discount_total()); ?> </div> </div> <div class="detail-items d-flex align-items-center justify-content-between"> <div class="detali-items-name"> <?php esc_html_e('Total', 'datis'); ?> </div> <div class="detail-items-value"> <?php echo WC()->cart->get_total(); ?> </div> </div> </div> <?php $checkout = WC()->checkout(); wc_get_template('checkout/payment.php', ['checkout' => $checkout]); ?> <div class="wc-toc"> <?php do_action('woocommerce_checkout_before_terms_and_conditions'); ?> <?php do_action('woocommerce_checkout_terms_and_conditions'); ?> <?php do_action('woocommerce_checkout_after_terms_and_conditions'); ?> </div> <button class="check-out-btn button alt" id="place_order" type="submit" value="<?php esc_attr_e('Place order', 'woocommerce'); ?>"> <?php esc_html_e('Proceed to checkout', 'datis'); ?> </button> </div> <div class="discount-code"> <button type="button" class="discount-code-btn d-flex flex-row align-items-center justify-content-between" aria-expanded="false" aria-controls="coupon-panel"> <?php esc_html_e('Apply coupon code', 'datis'); ?> <div class="discount-code-btn-icon"> <svg width="24" height="24" datisBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 9L12 15L10.25 13.5M5 9L7.33333 11" stroke="var(--datis-secondary-color)" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> </button> </div> <div id="coupon-panel" class="discount-code-panel" hidden> <div class="discount-code-form"> <div class="d-flex flex-column gap-2 position-relative"> <input type="text" name="coupon_code" class="input-text" placeholder="<?php echo esc_attr__('Coupon code', 'datis'); ?>" autocomplete="off" /> <button type="submit" class="button" name="apply_coupon" value="1"> <?php esc_html_e('Apply', 'datis'); ?> </button> </div> </div> </div> </aside> <?php // این nonce برای wc-ajax=checkout ضروریه wp_nonce_field('woocommerce-process_checkout', 'woocommerce-process-checkout-nonce'); ?> </form> <?php do_action('woocommerce_after_checkout'); ?>
💾 保存文件
← 返回文件管理器