// Add custom Theme Functions here
//CODE LAY LUOT XEM
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
return "01 lượt xem";
}
return $count.' lượt xem';
}
// CODE DEM LUOT XEM
function setPostViews($postID) {
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
}else{
$count++;
update_post_meta($postID, $count_key, $count);
}
}
//CODE HIEN THI SO LUOT XEM BAI VIET TRONG DASHBOARDH
add_filter('manage_posts_columns', 'posts_column_views');
add_action('manage_posts_custom_column', 'posts_custom_column_views',5,2);
function posts_column_views($defaults){
$defaults['post_views'] = __('Views');
return $defaults;
}
function posts_custom_column_views($column_name, $id){
if($column_name === 'post_views'){
echo getPostViews(get_the_ID());
}
}
/*Sắp xếp lại thứ tự các field*/
add_filter("woocommerce_checkout_fields", "order_fields");
function order_fields($fields) {
//Shipping
$order_shipping = array(
"shipping_last_name",
"shipping_phone",
"shipping_address_1"
);
foreach($order_shipping as $field_shipping)
{
$ordered_fields2[$field_shipping] = $fields["shipping"][$field_shipping];
}
$fields["shipping"] = $ordered_fields2;
return $fields;
}
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields',99 );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_address_2']);
$fields['billing']['billing_last_name'] = array(
'label' => __('Họ và tên', 'devvn'),
'placeholder' => _x('Nhập đầy đủ họ và tên của bạn', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['billing']['billing_address_1']['placeholder'] = 'Ví dụ: Số xx Ngõ xx Phú Kiều, Bắc Từ Liêm, Hà Nội';
unset($fields['shipping']['shipping_company']);
unset($fields['shipping']['shipping_postcode']);
unset($fields['shipping']['shipping_country']);
unset($fields['shipping']['shipping_city']);
unset($fields['shipping']['shipping_state']);
unset($fields['shipping']['shipping_address_2']);
$fields['shipping']['shipping_phone'] = array(
'label' => __('Điện thoại', 'devvn'),
'placeholder' => _x('Số điện thoại người nhận hàng', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['shipping']['shipping_last_name'] = array(
'label' => __('Họ và tên', 'devvn'),
'placeholder' => _x('Nhập đầy đủ họ và tên của người nhận', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['shipping']['shipping_address_1']['placeholder'] = 'Ví dụ: Số xx Ngõ xx Phú Kiều, Bắc Từ Liêm, Hà Nội';
return $fields;
}
add_action( 'woocommerce_admin_order_data_after_shipping_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
function my_custom_checkout_field_display_admin_order_meta($order){
echo '
'.__('Số ĐT người nhận').': ' . get_post_meta( $order->get_id(), '_shipping_phone', true ) . '
';
}
Nước khoáng Lavie 500ml -24 chai - Nước khoáng
Skip to content
“Nước khoáng Vĩnh Hảo có gas 500ml” đã được thêm vào giỏ hàng.
Xem giỏ hàng
Nước khoáng Lavie 500ml -24 chai
La Vie được đóng chai với công nghệ hiện đại của Nestle Waters, chứa nhiều khoáng chất với hàm lượng nhẹ và giữ nguyên sự tinh khiết của nước từ các mạch nước ngầm rất sâu.
Vicente Somogye –
This web site is really a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely discover it.
https://www.zoritolerimol.com
miminwd login –
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how can we communicate?
https://miminwd.it.com/
วิดีโอแชท CooMeet –
Glad to be one of the visitants on this awful web site : D.
https://vibragame.biz/th/
29empire –
Precisely what I was searching for, thankyou for posting.
https://www.thegrandsouthseakhaolak.com/accommodation.html
slot depo 10k –
An impressive share, I just given this onto a colleague who was doing a little analysis on this. And he in fact bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If possible, as you become expertise, would you mind updating your blog with more details? It is highly helpful for me. Big thumb up for this blog post!
https://owlsdays.com/category/entertainment/
pengacara perceraian jakarta –
You have mentioned very interesting points! ps nice internet site.
https://www.legalkeluarga.id/
vigorjp slot –
F*ckin’ tremendous things here. I’m very glad to see your article. Thanks a lot and i am looking forward to contact you. Will you please drop me a mail?
https://www.gowireless.net/aboutus.html
slot online –
My spouse and I stumbled over here different page and thought I might check things out. I like what I see so now i’m following you. Look forward to looking into your web page for a second time.
https://alfutuh.ponpes.id/
qjoker123 –
It¦s in reality a great and useful piece of information. I am glad that you simply shared this useful information with us. Please stay us informed like this. Thank you for sharing.
https://surat.fh.unitomo.ac.id/
fdertolmrtokev –
I discovered your blog site on google and check a few of your early posts. Continue to keep up the very good operate. I just additional up your RSS feed to my MSN News Reader. Seeking forward to reading more from you later on!…
https://www.fdertolmrtokev.com
olxtoto –
I have been exploring for a bit for any high quality articles or blog posts on this kind of area . Exploring in Yahoo I at last stumbled upon this web site. Reading this info So i am happy to convey that I’ve a very good uncanny feeling I discovered exactly what I needed. I most certainly will make certain to don’t forget this site and give it a glance on a constant basis.
https://pizzarusticaweho.com/
scatter hitam –
As soon as I detected this web site I went on reddit to share some of the love with them.
https://macanempire.com/
bank guarantee provider –
As a Newbie, I am continuously browsing online for articles that can be of assistance to me. Thank you
https://www.wonderlandgmbh.com
slot dana –
Hi, I think your site might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, fantastic blog!
https://www.cavecitychristian.com/index.cfm