This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css">@page { | |
margin: 12pt; | |
} | |
html { | |
min-height: 100vh; | |
} | |
body { | |
font-family: Roboto, Arial; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
@page { | |
margin: 0; | |
} | |
.body { | |
font-family: Roboto, Arial; | |
font-size: 9pt; | |
line-height: 13pt; | |
margin: 27pt 32pt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css">@page { | |
margin: 12pt; | |
} | |
html { | |
min-height: 100vh; | |
} | |
body { | |
font-family: Roboto, Arial; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="UTF-8"> | |
<div style="margin:0;font-family: Helvetica;font-size:12px;page-break-after:always;"> | |
<div> | |
<center> | |
<p>Ngày đặt hàng: {{ order_date | date: "%d/%m/%Y" }}</p> | |
<img class="print_barcode order" val="{{tracking_number}}"></img> | |
</center> | |
<script> | |
$(".print_barcode").each(function(){ | |
var barcode = $(this).attr("val"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="UTF-8"> | |
<div style="width:100%; text-align: center; padding-right:20px;margin-bottom:10px;"> | |
</div> | |
<div style="margin:0;font-family: Helvetica;font-size:12px;page-break-after:always;border: 1px solid #c0c0c0; border-bottom: none;"> | |
<div> | |
<script> | |
$(".print_barcode").each(function(){ | |
var barcode = $(this).attr("val"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="UTF-8"> | |
<div style="width:100%; text-align: center; padding-right:20px;margin-bottom:10px;"> | |
</div> | |
<div style="margin:0;font-family: Helvetica;font-size:12px;page-break-after:always;border: 1px solid #c0c0c0; border-bottom: none;"> | |
<div> | |
<script> | |
$(".print_barcode").each(function(){ | |
var barcode = $(this).attr("val"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WooCommerce Rename Checkout Fields | |
add_filter( 'woocommerce_checkout_fields' , 'custom_rename_wc_checkout_fields' ); | |
// Change placeholder and label text | |
function custom_rename_wc_checkout_fields( $fields ) { | |
$fields['billing']['billing_first_name']['placeholder'] = 'Wonka'; | |
$fields['billing']['billing_first_name']['label'] = 'Your Awesome First Name'; | |
return $fields; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign url_tag = canonical_url | split: '/' %} | |
{% assign tagged = url_tag.last%} | |
{% for tag in current_tags %} | |
{% assign tag2 = tag | handleize %} | |
{% if tag2 == tagged %} | |
{{tag}} | |
{% break %} | |
{% endif %} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta charset="UTF-8"> | |
<div style="margin:0;font-family: Helvetica;font-size:12px;page-break-after:always;"> | |
<div> | |
<div style="float: right; text-align: right; padding-right:20px;"> | |
<p>Ngày đặt hàng: {{ order_date | date: "%d/%m/%Y" }}</p> | |
<img style="margin-right:-10px" class="print_barcode order" val="{{tracking_number}}"></img> | |
</div> | |
<script> | |
$(".print_barcode").each(function(){ | |
var barcode = $(this).attr("val"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def change_file_ext(cur_dir, old_ext, new_ext, sub_dirs=False): | |
if sub_dirs: | |
for root, dirs, files in os.walk(cur_dir): | |
for filename in files: | |
file_ext = os.path.splitext(filename)[1] | |
if old_ext == file_ext: | |
oldname = os.path.join(root, filename) | |
newname = oldname.replace(old_ext, new_ext) |
NewerOlder