Skip to content

Instantly share code, notes, and snippets.

View gizalink's full-sized avatar

Nguyễn Phúc Gia Linh gizalink

View GitHub Profile
@gizalink
gizalink / in_don_hang_hrv_a6.html
Created April 1, 2022 10:38
In đơn hàng khổ a6 trên Haravan
<style type="text/css">@page {
margin: 12pt;
}
html {
min-height: 100vh;
}
body {
font-family: Roboto, Arial;
@gizalink
gizalink / donhang.html
Last active October 6, 2021 13:12
In đơn hàng HRV 2021
<style>
@page {
margin: 0;
}
.body {
font-family: Roboto, Arial;
font-size: 9pt;
line-height: 13pt;
margin: 27pt 32pt;
@gizalink
gizalink / in-van-don-hrv.html
Last active October 6, 2021 11:51
In vận đơn HRV 2021
<style type="text/css">@page {
margin: 12pt;
}
html {
min-height: 100vh;
}
body {
font-family: Roboto, Arial;
@gizalink
gizalink / in_van_don_k80_haravan.html
Created November 15, 2019 07:42
form in vận đơn mẫu in k80 trên haravan
<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");
@gizalink
gizalink / indonhang_k80.html
Last active November 15, 2019 07:22
phiếu in đơn khổ hoá đơn điện tử cho hệ thống haravan
<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");
@gizalink
gizalink / indonhang_k80.html
Created November 14, 2019 06:56
phiếu in đơn khổ hoá đơn điện tử cho hệ thống haravan
<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");
@gizalink
gizalink / woo_rename_checkout.php
Created July 16, 2019 15:48 — forked from cryptexvinci/woo_rename_checkout.php
Rename WooCommerce checkout field label & placeholder
// 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;
}
@gizalink
gizalink / tag-post-title.liquid
Last active November 24, 2018 04:16
Đặt file hoặc tạo file vào folder snipset của theme. Sau đó các bạn vào file theme.liquid thay đổi {{ current_tags | join: ', ' }} thành {% include 'tag-post-title' %}
{% 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 %}
@gizalink
gizalink / phieuinvanchuyen.liquid
Created July 17, 2018 08:29
Custom note on shipping preview print
<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");
@gizalink
gizalink / changeext.py
Created May 3, 2018 08:31
Change file extension for multi file in sub-folder
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)