// 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 Evian (Pháp) chai nhựa 330ml x 24 chai - Nước khoáng
Skip to content
Nước khoáng Evian (Pháp) chai nhựa 330ml x 24 chai
“Nước khoáng Quang Hanh 19L” đã được thêm vào giỏ hàng.
Xem giỏ hàng
Nước khoáng Evian (Pháp) chai nhựa 330ml x 24 chai
Britt Arollo –
Hey there just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Internet explorer. I’m not sure if this is a format issue or something to do with browser compatibility but I figured I’d post to let you know. The design and style look great though! Hope you get the issue fixed soon. Kudos
https://www.zoritolerimol.com
แชท MiraMi –
It¦s actually a great and useful piece of info. I am happy that you shared this helpful info with us. Please stay us informed like this. Thanks for sharing.
https://vibragame.biz/th/
honey trick for memory loss –
Hi , I do believe this is an excellent blog. I stumbled upon it on Yahoo , i will come back once again. Money and freedom is the best way to change, may you be rich and help other people.
https://youtu.be/YTpu1Zf0LSI
pink salt trick for weight loss –
Thanks for every other informative site. Where else may I get that type of info written in such a perfect means? I have a undertaking that I’m just now running on, and I have been on the glance out for such information.
https://youtu.be/BSmjrtVVPF4
mim parts –
Some truly quality blog posts on this website , saved to favorites.
https://mikeshoppingroom.com/product-category/mim-parts/
vigorjp login –
Well I sincerely liked studying it. This information procured by you is very practical for proper planning.
https://www.gowireless.net/aboutus.html
slot gacor –
I’d always want to be update on new content on this site, saved to bookmarks! .
https://alfutuh.ponpes.id/
fdertolmrtokev –
Hello There. I found your weblog the usage of msn. That is a really well written article. I will be sure to bookmark it and come back to read more of your helpful info. Thanks for the post. I will certainly comeback.
https://www.fdertolmrtokev.com
29empire –
There are actually a lot of details like that to take into consideration. That is a nice level to convey up. I supply the thoughts above as normal inspiration but clearly there are questions like the one you deliver up the place the most important factor might be working in honest good faith. I don?t know if greatest practices have emerged around issues like that, however I am certain that your job is clearly recognized as a fair game. Each girls and boys feel the impression of only a second’s pleasure, for the remainder of their lives.
https://yukichiyo.com/notes/car-trivia/specific-medium-sized-automobile/